aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-09-08 10:41:50 +0200
committerGitHub <noreply@github.com>2021-09-08 10:41:50 +0200
commitab9040a94d5635e18194469cd217282b4d819b9d (patch)
tree523641d0d14b205be1070d65ea8669cedbd04d70 /plugins/base/src/main/kotlin/renderers
parent539cfb503d48f26c39237b12293f6f72c9ac50c1 (diff)
downloaddokka-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.kt7
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()
}
}