From d9464bcf9583b21de6e9ec8fe70c3f959e972c73 Mon Sep 17 00:00:00 2001 From: Filip ZybaƂa Date: Wed, 8 Jul 2020 13:50:01 +0200 Subject: WIP --- plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 9 ++++++--- plugins/base/src/main/resources/dokka/styles/style.css | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'plugins/base/src/main') diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 50af53f0..dc211502 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -74,7 +74,7 @@ open class HtmlRenderer( node.extra.extraHtmlAttributes().forEach { attributes[it.extraKey] = it.extraValue } childrenCallback() } - node.dci.kind in setOf(ContentKind.Symbol, ContentKind.Sample) -> div("symbol $additionalClasses") { + node.dci.kind in setOf(ContentKind.Symbol) -> div("symbol $additionalClasses") { childrenCallback() if (node.hasStyle(TextStyle.Monospace)) copyButton() } @@ -548,8 +548,11 @@ open class HtmlRenderer( code: ContentCode, pageContext: ContentPage ) { - code(code.style.joinToString(" ") { it.toString().toLowerCase() }) { - code.children.forEach { buildContentNode(it, pageContext) } + div("sample-container") { + code(code.style.joinToString(" ") { it.toString().toLowerCase() }) { + attributes["theme"] = "idea" + code.children.forEach { buildContentNode(it, pageContext) } + } } } diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css index db42e3c0..bec590e6 100644 --- a/plugins/base/src/main/resources/dokka/styles/style.css +++ b/plugins/base/src/main/resources/dokka/styles/style.css @@ -212,6 +212,11 @@ font-family: monospace; } +.sample-container { + display: flex; + flex-direction: column; +} + code.paragraph { display: block; } -- cgit