diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-05-13 16:20:44 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-14 11:33:06 +0200 |
commit | a440f0cb8756019131a2c15389e747aea3c585e7 (patch) | |
tree | 1c2e2b25464d540b8ce68fe8f14cd105c5268b27 /plugins/base/src/main/kotlin/renderers/html | |
parent | d6bfd213a2f363f0581bdc85a68e11c170c93071 (diff) | |
download | dokka-a440f0cb8756019131a2c15389e747aea3c585e7.tar.gz dokka-a440f0cb8756019131a2c15389e747aea3c585e7.tar.bz2 dokka-a440f0cb8756019131a2c15389e747aea3c585e7.zip |
Platform dependant comments
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 4f0c1e55..c061cabf 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -128,22 +128,32 @@ open class HtmlRenderer( ?.let { div(classes = "table-row") { it.filter { it.dci.kind != ContentKind.Symbol }.takeIf { it.isNotEmpty() }?.let { - div("main-subrow") { + div("main-subrow ${node.style.joinToString { it.toString().decapitalize() }}") { it.filter { platformRestriction == null || platformRestriction in it.platforms } .forEach { when(it.dci.kind){ - ContentKind.Main -> div("title") { - it.build(this, pageContext, platformRestriction) + ContentKind.PlatformDependantHint -> { + div("platform-dependant-row keyValue"){ + div() + div("title"){ + it.build(this, pageContext, platformRestriction) + } + } } - ContentKind.BriefComment, ContentKind.Comment -> div("brief") { - it.build(this, pageContext, platformRestriction) + ContentKind.Main -> { + div("title-row"){ + it.build(this, pageContext, platformRestriction) + div() + if (ContentKind.shouldBePlatformTagged(node.dci.kind) && node.platforms.size == 1) { + createPlatformTags(node) + } else { + div() + } + } } else -> div { it.build(this, pageContext, platformRestriction) } } } - if (ContentKind.shouldBePlatformTagged(node.dci.kind) && node.platforms.size == 1) { - createPlatformTags(node) - } } } it.filter { it.dci.kind == ContentKind.Symbol }.takeIf { it.isNotEmpty() }?.let { |