diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-09-08 10:41:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 10:41:50 +0200 |
commit | ab9040a94d5635e18194469cd217282b4d819b9d (patch) | |
tree | 523641d0d14b205be1070d65ea8669cedbd04d70 /plugins/base/src/main/kotlin/renderers | |
parent | 539cfb503d48f26c39237b12293f6f72c9ac50c1 (diff) | |
download | dokka-ab9040a94d5635e18194469cd217282b4d819b9d.tar.gz dokka-ab9040a94d5635e18194469cd217282b4d819b9d.tar.bz2 dokka-ab9040a94d5635e18194469cd217282b4d819b9d.zip |
Dark mode on samples (#2116)
* Dark mode on samples
* Fix samples script firing even when samples were not defined on current page
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 31753332..a6c7e326 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -685,7 +685,12 @@ open class HtmlRenderer( code.children.forEach { buildContentNode(it, pageContext) } } } - copyButton() + /* + Disable copy button on samples as: + - it is useless + - it overflows with playground's run button + */ + if(!code.style.contains(ContentStyle.RunnableSample)) copyButton() } } |