From 1e306653b6a8e884a8b9b22d323efe88a4370d28 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 17 Sep 2020 19:34:32 +0200 Subject: [PATCH] Make logo replaceable #1339 --- .idea/codeStyles/Project.xml | 17 ++- core/build.gradle.kts | 1 + core/src/main/kotlin/configuration.kt | 15 ++- core/src/main/kotlin/defaultConfiguration.kt | 8 +- .../main/kotlin/plugability/DokkaPlugin.kt | 42 +++---- .../TestDokkaConfigurationBuilder.kt | 2 +- .../docs/user_guide/base-specific/frontend.md | 29 +++++ docs/src/doc/docs/user_guide/cli/usage.md | 1 + docs/src/doc/docs/user_guide/gradle/usage.md | 19 ++++ docs/src/doc/docs/user_guide/maven/usage.md | 23 ++++ integration-tests/gradle/build.gradle.kts | 2 + .../projects/it-basic-groovy/build.gradle | 1 - .../gradle/projects/it-basic/build.gradle.kts | 9 ++ .../customResources/custom-resource.svg | 3 + .../customResources/custom-style-to-add.css | 1 + .../it-basic/customResources/logo-styles.css | 3 + .../it/gradle/BasicGradleIntegrationTest.kt | 13 +++ .../customResources/custom-resource.svg | 3 + .../customResources/custom-style-to-add.css | 1 + .../it-maven/customResources/logo-styles.css | 3 + .../maven/projects/it-maven/pom.xml | 11 ++ .../dokka/it/maven/MavenIntegrationTest.kt | 15 +++ plugins/base/src/main/kotlin/DokkaBase.kt | 12 +- .../src/main/kotlin/DokkaBaseConfiguration.kt | 14 +++ .../main/kotlin/renderers/DefaultRenderer.kt | 8 +- .../src/main/kotlin/renderers/FileWriter.kt | 13 ++- .../kotlin/renderers/contentTypeChecking.kt | 16 +++ .../kotlin/renderers/html/HtmlRenderer.kt | 2 +- .../renderers/html/htmlPreprocessors.kt | 103 +++++++++--------- .../main/resources/dokka/images/logo-text.svg | 6 - ...vigationLoader.js => navigation-loader.js} | 0 ...Handler.js => platform-content-handler.js} | 0 .../main/resources/dokka/scripts/search.js | 7 -- .../resources/dokka/styles/logo-styles.css | 3 + .../src/main/resources/dokka/styles/style.css | 1 - runners/cli/src/main/kotlin/cli/main.kt | 24 ++-- .../dokka/gradle/AbstractDokkaTask.kt | 39 ++++++- .../dokka/gradle/DokkaCollectorTask.kt | 1 + .../dokka/gradle/DokkaMultiModuleTask.kt | 3 +- .../org/jetbrains/dokka/gradle/DokkaTask.kt | 11 +- .../org/jetbrains/dokka/gradle/utils.kt | 1 - .../gradle/DokkaConfigurationJsonTest.kt | 4 +- .../DokkaConfigurationSerializableTest.kt | 5 +- .../dokka/gradle/DokkaMultiModuleTaskTest.kt | 8 +- .../maven-plugin/src/main/kotlin/DokkaMojo.kt | 15 ++- 45 files changed, 373 insertions(+), 145 deletions(-) create mode 100644 docs/src/doc/docs/user_guide/base-specific/frontend.md create mode 100644 integration-tests/gradle/projects/it-basic/customResources/custom-resource.svg create mode 100644 integration-tests/gradle/projects/it-basic/customResources/custom-style-to-add.css create mode 100644 integration-tests/gradle/projects/it-basic/customResources/logo-styles.css create mode 100644 integration-tests/maven/projects/it-maven/customResources/custom-resource.svg create mode 100644 integration-tests/maven/projects/it-maven/customResources/custom-style-to-add.css create mode 100644 integration-tests/maven/projects/it-maven/customResources/logo-styles.css create mode 100644 plugins/base/src/main/kotlin/DokkaBaseConfiguration.kt create mode 100644 plugins/base/src/main/kotlin/renderers/contentTypeChecking.kt delete mode 100755 plugins/base/src/main/resources/dokka/images/logo-text.svg rename plugins/base/src/main/resources/dokka/scripts/{navigationLoader.js => navigation-loader.js} (100%) rename plugins/base/src/main/resources/dokka/scripts/{platformContentHandler.js => platform-content-handler.js} (100%) delete mode 100644 plugins/base/src/main/resources/dokka/scripts/search.js create mode 100644 plugins/base/src/main/resources/dokka/styles/logo-styles.css diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index f063496ed6..31d977a0b2 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -3,9 +3,18 @@ +