From 79463f06a953de2f2c2ec877f34deaed658b3471 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 12 Aug 2021 14:49:26 +0200 Subject: Remove unused components, docs, change icon to new kotlin logo and add hamburger for mobile --- .../src/main/kotlin/renderers/html/HtmlRenderer.kt | 8 ++++---- .../main/kotlin/renderers/html/htmlPreprocessors.kt | 2 -- .../base/src/main/resources/dokka/images/docs_logo.svg | 7 ------- .../base/src/main/resources/dokka/images/logo-icon.svg | 13 ++++++++++--- .../src/main/resources/dokka/styles/logo-styles.css | 3 --- plugins/base/src/main/resources/dokka/styles/style.css | 18 +++++------------- 6 files changed, 19 insertions(+), 32 deletions(-) delete mode 100644 plugins/base/src/main/resources/dokka/images/docs_logo.svg delete mode 100644 plugins/base/src/main/resources/dokka/styles/logo-styles.css (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 77086695..362447d1 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -798,6 +798,10 @@ open class HtmlRenderer( body { div("navigation-wrapper") { id = "navigation-wrapper" + div { + id = "leftToggler" + span("icon-toggler") + } div("library-name") { clickableLogo(page, pathToRoot) } @@ -821,10 +825,6 @@ open class HtmlRenderer( } div { id = "main" - div { - id = "leftToggler" - span("icon-toggler") - } templateCommand(PathToRootSubstitutionCommand("###", default = pathToRoot)) { script(type = ScriptType.textJavaScript, src = "###scripts/main.js") {} } diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt index 70f1c1d6..992c5eba 100644 --- a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt +++ b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt @@ -134,7 +134,6 @@ class ScriptsInstaller(private val dokkaContext: DokkaContext) : PageTransformer class StylesInstaller(private val dokkaContext: DokkaContext) : PageTransformer { private val stylesPages = listOf( "styles/style.css", - "styles/logo-styles.css", "styles/jetbrains-mono.css", "styles/main.css" ) @@ -154,7 +153,6 @@ object AssetsInstaller : PageTransformer { private val imagesPages = listOf( "images/arrow_down.svg", "images/arrow_down_white.svg", - "images/docs_logo.svg", "images/logo-icon.svg", "images/go-to-top-icon.svg", "images/footer-go-to-link.svg", diff --git a/plugins/base/src/main/resources/dokka/images/docs_logo.svg b/plugins/base/src/main/resources/dokka/images/docs_logo.svg deleted file mode 100644 index 7c1e3ae8..00000000 --- a/plugins/base/src/main/resources/dokka/images/docs_logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/base/src/main/resources/dokka/images/logo-icon.svg b/plugins/base/src/main/resources/dokka/images/logo-icon.svg index 1b3b3670..1fea0877 100755 --- a/plugins/base/src/main/resources/dokka/images/logo-icon.svg +++ b/plugins/base/src/main/resources/dokka/images/logo-icon.svg @@ -1,3 +1,10 @@ - - - + + + + + + + + + + \ No newline at end of file diff --git a/plugins/base/src/main/resources/dokka/styles/logo-styles.css b/plugins/base/src/main/resources/dokka/styles/logo-styles.css deleted file mode 100644 index a3a07d75..00000000 --- a/plugins/base/src/main/resources/dokka/styles/logo-styles.css +++ /dev/null @@ -1,3 +0,0 @@ -#logo { - background-image: url(../images/docs_logo.svg); -} \ No newline at end of file diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css index 248bb531..d16b420d 100644 --- a/plugins/base/src/main/resources/dokka/styles/style.css +++ b/plugins/base/src/main/resources/dokka/styles/style.css @@ -694,6 +694,7 @@ small { align-self: flex-end; min-height: 30px; z-index: 0; + flex-wrap: wrap; } .platform-selector:hover { @@ -1110,21 +1111,12 @@ div.runnablesample { } #leftToggler { - display: unset; - position: fixed; - top: 50%; - transform: translateY(-50%); z-index: 5; font-size: 20px; transition: margin .2s ease-out; + margin-right: 16px; - color: var(--average-color); - border: 1px solid var(--average-color); - border-left: 0; - border-top-right-radius: 1em; - border-bottom-right-radius: 1em; - padding: 8px 4px 8px 8px; - background-color: white; + color: var(--background-color); } #leftToggler .icon-toggler:hover { @@ -1136,11 +1128,11 @@ div.runnablesample { } .icon-toggler::before { - content: "\232A"; + content: "\2630"; } #leftColumn.open ~ #main .icon-toggler::before { - content: "\2329"; + content: "\2630"; padding-right: 0.5em; margin-left: -0.5em; } -- cgit