aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-05-13 16:20:44 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-05-14 11:33:06 +0200
commita440f0cb8756019131a2c15389e747aea3c585e7 (patch)
tree1c2e2b25464d540b8ce68fe8f14cd105c5268b27 /plugins/base/src/main/kotlin/renderers/html
parentd6bfd213a2f363f0581bdc85a68e11c170c93071 (diff)
downloaddokka-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.kt26
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 {