aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt2
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt9
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt10
3 files changed, 13 insertions, 8 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index e7f027e3..8e1d01a7 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -221,7 +221,7 @@ enum class TextStyle : Style {
}
enum class ContentStyle : Style {
- KeyValue
+ RowTitle
}
object CommentTable: Style
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index d61c50b5..dd293e54 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -196,9 +196,14 @@ open class HtmlRenderer(
it.filter { it !is ContentLink }.takeIf { it.isNotEmpty() }?.let {
div("platform-dependent-row keyValue") {
- div()
+ val title = it.filter { it.style.contains(ContentStyle.RowTitle) }
+ div {
+ title.forEach {
+ it.build(this, pageContext, sourceSetRestriction)
+ }
+ }
div("title") {
- it.forEach {
+ (it - title).forEach {
it.build(this, pageContext, sourceSetRestriction)
}
}
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 4252de3b..296b0de6 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -220,16 +220,16 @@ open class DefaultPageCreator(
table(kind = ContentKind.Parameters) {
platforms.flatMap { platform ->
val receiverRow = receiver[platform]?.let {
- buildGroup(sourceSets = setOf(platform), kind = ContentKind.Parameters, styles = mainStyles + ContentStyle.KeyValue) {
- text("<receiver>")
+ buildGroup(sourceSets = setOf(platform), kind = ContentKind.Parameters) {
+ text("<receiver>", styles = mainStyles + ContentStyle.RowTitle)
comment(it.root)
}
}
val paramRows = params.mapNotNull { (_, param) ->
param[platform]?.let {
- buildGroup(sourceSets = setOf(platform), kind = ContentKind.Parameters, styles = mainStyles + ContentStyle.KeyValue) {
- text(it.name, kind = ContentKind.Parameters)
+ buildGroup(sourceSets = setOf(platform), kind = ContentKind.Parameters) {
+ text(it.name, kind = ContentKind.Parameters, styles = mainStyles + ContentStyle.RowTitle)
comment(it.root)
}
}
@@ -251,7 +251,7 @@ open class DefaultPageCreator(
platforms.flatMap { platform ->
seeAlsoTags.mapNotNull { (_, see) ->
see[platform]?.let {
- buildGroup(sourceSets = setOf(platform), kind = ContentKind.Comment, styles = mainStyles + ContentStyle.KeyValue) {
+ buildGroup(sourceSets = setOf(platform), kind = ContentKind.Comment, styles = mainStyles + ContentStyle.RowTitle) {
if (it.address != null) link(it.name, it.address!!, kind = ContentKind.Comment)
else text(it.name, kind = ContentKind.Comment)
comment(it.root)