diff options
author | Filip Zybała <fzybala@virtuslab.com> | 2020-07-08 13:50:01 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-13 16:44:20 +0200 |
commit | d9464bcf9583b21de6e9ec8fe70c3f959e972c73 (patch) | |
tree | ba034d59c3dbff3d987a67007355faf7a59e5ada /plugins | |
parent | 2ca99df241b0fe51f533c7b1d2da416677929867 (diff) | |
download | dokka-d9464bcf9583b21de6e9ec8fe70c3f959e972c73.tar.gz dokka-d9464bcf9583b21de6e9ec8fe70c3f959e972c73.tar.bz2 dokka-d9464bcf9583b21de6e9ec8fe70c3f959e972c73.zip |
WIP
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 9 | ||||
-rw-r--r-- | plugins/base/src/main/resources/dokka/styles/style.css | 5 |
2 files changed, 11 insertions, 3 deletions
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; } |