From 8e5c63d035ef44a269b8c43430f43f5c8eebfb63 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Fri, 10 Nov 2023 11:46:54 +0100 Subject: Restructure the project to utilize included builds (#3174) * Refactor and simplify artifact publishing * Update Gradle to 8.4 * Refactor and simplify convention plugins and build scripts Fixes #3132 --------- Co-authored-by: Adam <897017+aSemy@users.noreply.github.com> Co-authored-by: Oleg Yukhnevich --- .../org.jetbrains.dokka.plugability.DokkaPlugin | 5 + .../dokka/docs/javadoc/EnumValueOf.java.template | 12 + .../dokka/docs/javadoc/EnumValues.java.template | 8 + .../dokka/docs/kdoc/EnumEntries.kt.template | 3 + .../dokka/docs/kdoc/EnumValueOf.kt.template | 4 + .../dokka/docs/kdoc/EnumValues.kt.template | 3 + .../src/main/resources/dokka/format/gfm.properties | 6 + .../resources/dokka/format/html-as-java.properties | 6 + .../main/resources/dokka/format/html.properties | 6 + .../dokka/format/java-layout-html.properties | 6 + .../main/resources/dokka/format/jekyll.properties | 6 + .../dokka/format/kotlin-website-html.properties | 6 + .../resources/dokka/format/markdown.properties | 6 + .../resources/dokka/images/anchor-copy-button.svg | 8 + .../src/main/resources/dokka/images/arrow_down.svg | 7 + .../src/main/resources/dokka/images/burger.svg | 9 + .../src/main/resources/dokka/images/copy-icon.svg | 7 + .../dokka/images/copy-successful-icon.svg | 7 + .../resources/dokka/images/footer-go-to-link.svg | 7 + .../main/resources/dokka/images/go-to-top-icon.svg | 8 + .../src/main/resources/dokka/images/homepage.svg | 5 + .../src/main/resources/dokka/images/logo-icon.svg | 14 + .../images/nav-icons/abstract-class-kotlin.svg | 26 + .../dokka/images/nav-icons/abstract-class.svg | 20 + .../dokka/images/nav-icons/annotation-kotlin.svg | 13 + .../dokka/images/nav-icons/annotation.svg | 7 + .../dokka/images/nav-icons/class-kotlin.svg | 13 + .../resources/dokka/images/nav-icons/class.svg | 7 + .../dokka/images/nav-icons/enum-kotlin.svg | 13 + .../main/resources/dokka/images/nav-icons/enum.svg | 7 + .../dokka/images/nav-icons/exception-class.svg | 7 + .../dokka/images/nav-icons/field-value.svg | 10 + .../dokka/images/nav-icons/field-variable.svg | 10 + .../resources/dokka/images/nav-icons/function.svg | 7 + .../dokka/images/nav-icons/interface-kotlin.svg | 13 + .../resources/dokka/images/nav-icons/interface.svg | 7 + .../resources/dokka/images/nav-icons/object.svg | 13 + .../dokka/images/nav-icons/typealias-kotlin.svg | 13 + .../main/resources/dokka/images/theme-toggle.svg | 7 + .../inbound-link-resolver/dokka-default.properties | 6 + .../java-layout-html.properties | 6 + .../dokka/inbound-link-resolver/javadoc.properties | 6 + .../src/main/resources/dokka/scripts/clipboard.js | 56 + .../resources/dokka/scripts/navigation-loader.js | 95 ++ .../dokka/scripts/platform-content-handler.js | 400 ++++++ .../src/main/resources/dokka/scripts/prism.js | 22 + .../scripts/symbol-parameters-wrapper_deferred.js | 64 + .../resources/dokka/styles/font-jb-sans-auto.css | 36 + .../main/resources/dokka/styles/logo-styles.css | 9 + .../src/main/resources/dokka/styles/prism.css | 217 +++ .../src/main/resources/dokka/styles/style.css | 1513 ++++++++++++++++++++ .../src/main/resources/dokka/templates/base.ftl | 44 + .../resources/dokka/templates/includes/footer.ftl | 7 + .../resources/dokka/templates/includes/header.ftl | 31 + .../dokka/templates/includes/page_metadata.ftl | 6 + .../templates/includes/source_set_selector.ftl | 9 + 56 files changed, 2869 insertions(+) create mode 100644 dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg create mode 100755 dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/homepage.svg create mode 100755 dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl create mode 100644 dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl (limited to 'dokka-subprojects/plugin-base/src/main/resources') diff --git a/dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin new file mode 100644 index 00000000..a014a209 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin @@ -0,0 +1,5 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +org.jetbrains.dokka.base.DokkaBase diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template new file mode 100644 index 00000000..233f8819 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValueOf.java.template @@ -0,0 +1,12 @@ +/** + * Returns the enum constant of this type with the specified + * name. + * The string must match exactly an identifier used to declare + * an enum constant in this type. (Extraneous whitespace + * characters are not permitted.) + * + * @return the enum constant with the specified name + * @throws IllegalArgumentException if this enum type has no + * constant with the specified name + */ + \ No newline at end of file diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template new file mode 100644 index 00000000..4aed38a6 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/javadoc/EnumValues.java.template @@ -0,0 +1,8 @@ +/** + * Returns an array containing the constants of this enum + * type, in the order they're declared. This method may be + * used to iterate over the constants. + * + * @return an array containing the constants of this enum + * type, in the order they're declared + */ diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template new file mode 100644 index 00000000..20d16421 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumEntries.kt.template @@ -0,0 +1,3 @@ +Returns a representation of an immutable list of all enum entries, in the order they're declared. + +This method may be used to iterate over the enum entries. diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template new file mode 100644 index 00000000..fbf8fa8d --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValueOf.kt.template @@ -0,0 +1,4 @@ +Returns the enum constant of this type with the specified name. The string must match exactly an identifier used +to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) + +@throws kotlin.IllegalArgumentException if this enum type has no constant with the specified name diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template new file mode 100644 index 00000000..c0e3559c --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/docs/kdoc/EnumValues.kt.template @@ -0,0 +1,3 @@ +Returns an array containing the constants of this enum type, in the order they're declared. + +This method may be used to iterate over the constants. diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties new file mode 100644 index 00000000..66b1ea8f --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/gfm.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.GFMFormatDescriptor +description=Produces documentation in GitHub-flavored markdown format diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties new file mode 100644 index 00000000..cbb5a399 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html-as-java.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.HtmlAsJavaFormatDescriptor +description=Produces output in HTML format using Java syntax diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties new file mode 100644 index 00000000..42438d16 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/html.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.HtmlFormatDescriptor +description=Produces output in HTML format diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties new file mode 100644 index 00000000..79925edd --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/java-layout-html.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.JavaLayoutHtmlFormatDescriptor +description=Produces Kotlin Style Docs with Javadoc like layout diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties new file mode 100644 index 00000000..28f55afc --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/jekyll.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.JekyllFormatDescriptor +description=Produces documentation in Jekyll format diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties new file mode 100644 index 00000000..4e8dea39 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/kotlin-website-html.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.KotlinWebsiteHtmlFormatDescriptor +description=Generates Kotlin website documentation diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties new file mode 100644 index 00000000..62a0f2b2 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/format/markdown.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.MarkdownFormatDescriptor +description=Produces documentation in markdown format diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg new file mode 100644 index 00000000..19c1fa3f --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/anchor-copy-button.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg new file mode 100755 index 00000000..639aaf12 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/arrow_down.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg new file mode 100644 index 00000000..fcca732b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/burger.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg new file mode 100644 index 00000000..2cb02ec6 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-icon.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg new file mode 100644 index 00000000..c4b95383 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/copy-successful-icon.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg new file mode 100644 index 00000000..a87add7a --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg new file mode 100644 index 00000000..abc3d1ce --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/homepage.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/homepage.svg new file mode 100644 index 00000000..a3d7602b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/homepage.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg new file mode 100755 index 00000000..e42f9570 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/logo-icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg new file mode 100644 index 00000000..19d6148c --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class-kotlin.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg new file mode 100644 index 00000000..60182030 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/abstract-class.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg new file mode 100644 index 00000000..b90f508c --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg new file mode 100644 index 00000000..b80c54b4 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/annotation.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg new file mode 100644 index 00000000..797a2423 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg new file mode 100644 index 00000000..3f1ad167 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/class.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg new file mode 100644 index 00000000..775a7cc9 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg new file mode 100644 index 00000000..fa7f2476 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/enum.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg new file mode 100644 index 00000000..c0b2bdeb --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/exception-class.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg new file mode 100644 index 00000000..2771ee56 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-value.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg new file mode 100644 index 00000000..e2d2bbd0 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/field-variable.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg new file mode 100644 index 00000000..f0da64a0 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/function.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg new file mode 100644 index 00000000..5e163260 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg new file mode 100644 index 00000000..32063ba2 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/interface.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg new file mode 100644 index 00000000..31f0ee3e --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/object.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg new file mode 100644 index 00000000..f4bb238b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/nav-icons/typealias-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg new file mode 100644 index 00000000..df86202b --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/theme-toggle.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties new file mode 100644 index 00000000..214fe8d7 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/dokka-default.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.InboundExternalLinkResolutionService$Dokka +description=Uses Dokka Default resolver diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties new file mode 100644 index 00000000..285fc11a --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/java-layout-html.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.Formats.JavaLayoutHtmlInboundLinkResolutionService +description=Resolver for JavaLayoutHtml diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties new file mode 100644 index 00000000..66fcc7c9 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/inbound-link-resolver/javadoc.properties @@ -0,0 +1,6 @@ +# +# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. +# + +class=org.jetbrains.dokka.InboundExternalLinkResolutionService$Javadoc +description=Uses Javadoc Default resolver diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js new file mode 100644 index 00000000..7a4f33c5 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/clipboard.js @@ -0,0 +1,56 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +window.addEventListener('load', () => { + document.querySelectorAll('span.copy-icon').forEach(element => { + element.addEventListener('click', (el) => copyElementsContentToClipboard(element)); + }) + + document.querySelectorAll('span.anchor-icon').forEach(element => { + element.addEventListener('click', (el) => { + if(element.hasAttribute('pointing-to')){ + const location = hrefWithoutCurrentlyUsedAnchor() + '#' + element.getAttribute('pointing-to') + copyTextToClipboard(element, location) + } + }); + }) +}) + +const copyElementsContentToClipboard = (element) => { + const selection = window.getSelection(); + const range = document.createRange(); + range.selectNodeContents(element.parentNode.parentNode); + selection.removeAllRanges(); + selection.addRange(range); + + copyAndShowPopup(element, () => selection.removeAllRanges()) +} + +const copyTextToClipboard = (element, text) => { + var textarea = document.createElement("textarea"); + textarea.textContent = text; + textarea.style.position = "fixed"; + document.body.appendChild(textarea); + textarea.select(); + + copyAndShowPopup(element, () => document.body.removeChild(textarea)) +} + +const copyAndShowPopup = (element, after) => { + try { + document.execCommand('copy'); + element.nextElementSibling.classList.add('active-popup'); + setTimeout(() => { + element.nextElementSibling.classList.remove('active-popup'); + }, 1200); + } catch (e) { + console.error('Failed to write to clipboard:', e) + } + finally { + if(after) after() + } +} + +const hrefWithoutCurrentlyUsedAnchor = () => window.location.href.split('#')[0] + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js new file mode 100644 index 00000000..3df7ac8c --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js @@ -0,0 +1,95 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +navigationPageText = fetch(pathToRoot + "navigation.html").then(response => response.text()) + +displayNavigationFromPage = () => { + navigationPageText.then(data => { + document.getElementById("sideMenu").innerHTML = data; + }).then(() => { + document.querySelectorAll(".overview > a").forEach(link => { + link.setAttribute("href", pathToRoot + link.getAttribute("href")); + }) + }).then(() => { + document.querySelectorAll(".sideMenuPart").forEach(nav => { + if (!nav.classList.contains("hidden")) + nav.classList.add("hidden") + }) + }).then(() => { + revealNavigationForCurrentPage() + }).then(() => { + scrollNavigationToSelectedElement() + }) + document.querySelectorAll('.footer a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); + }); +} + +revealNavigationForCurrentPage = () => { + let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); + let parts = document.querySelectorAll(".sideMenuPart"); + let found = 0; + do { + parts.forEach(part => { + if (part.attributes['pageId'].value.indexOf(pageId) !== -1 && found === 0) { + found = 1; + if (part.classList.contains("hidden")) { + part.classList.remove("hidden"); + part.setAttribute('data-active', ""); + } + revealParents(part) + } + }); + pageId = pageId.substring(0, pageId.lastIndexOf("/")) + } while (pageId.indexOf("/") !== -1 && found === 0) +}; +revealParents = (part) => { + if (part.classList.contains("sideMenuPart")) { + if (part.classList.contains("hidden")) + part.classList.remove("hidden"); + revealParents(part.parentNode) + } +}; + +scrollNavigationToSelectedElement = () => { + let selectedElement = document.querySelector('div.sideMenuPart[data-active]') + if (selectedElement == null) { // nothing selected, probably just the main page opened + return + } + + let hasIcon = selectedElement.querySelectorAll(":scope > div.overview span.nav-icon").length > 0 + + // for instance enums also have children and are expandable, but are not package/module elements + let isPackageElement = selectedElement.children.length > 1 && !hasIcon + if (isPackageElement) { + // if package is selected or linked, it makes sense to align it to top + // so that you can see all the members it contains + selectedElement.scrollIntoView(true) + } else { + // if a member within a package is linked, it makes sense to center it since it, + // this should make it easier to look at surrounding members + selectedElement.scrollIntoView({ + behavior: 'auto', + block: 'center', + inline: 'center' + }) + } +} + +/* + This is a work-around for safari being IE of our times. + It doesn't fire a DOMContentLoaded, presumabely because eventListener is added after it wants to do it +*/ +if (document.readyState == 'loading') { + window.addEventListener('DOMContentLoaded', () => { + displayNavigationFromPage() + }) +} else { + displayNavigationFromPage() +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js new file mode 100644 index 00000000..811c4788 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js @@ -0,0 +1,400 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +filteringContext = { + dependencies: {}, + restrictedDependencies: [], + activeFilters: [] +} +let highlightedAnchor; +let topNavbarOffset; +let instances = []; +let sourcesetNotification; + +const samplesDarkThemeName = 'darcula' +const samplesLightThemeName = 'idea' + +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event, elem))) + const filterSection = document.getElementById('filter-section') + if (filterSection) { + filterSection.addEventListener('click', (event) => filterButtonHandler(event)) + initializeFiltering() + } + initTabs() + handleAnchor() + initHidingLeftNavigation() + topNavbarOffset = document.getElementById('navigation-wrapper') + darkModeSwitch() +}) + +const darkModeSwitch = () => { + const localStorageKey = "dokka-dark-mode" + const storage = localStorage.getItem(localStorageKey) + const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches + const darkModeEnabled = storage ? JSON.parse(storage) : osDarkSchemePreferred + const element = document.getElementById("theme-toggle-button") + initPlayground(darkModeEnabled ? samplesDarkThemeName : samplesLightThemeName) + + element.addEventListener('click', () => { + const enabledClasses = document.getElementsByTagName("html")[0].classList + enabledClasses.toggle("theme-dark") + + //if previously we had saved dark theme then we set it to light as this is what we save in local storage + const darkModeEnabled = enabledClasses.contains("theme-dark") + if (darkModeEnabled) { + initPlayground(samplesDarkThemeName) + } else { + initPlayground(samplesLightThemeName) + } + localStorage.setItem(localStorageKey, JSON.stringify(darkModeEnabled)) + }) +} + +const initPlayground = (theme) => { + if (!samplesAreEnabled()) return + instances.forEach(instance => instance.destroy()) + instances = [] + + // Manually tag code fragments as not processed by playground since we also manually destroy all of its instances + document.querySelectorAll('code.runnablesample').forEach(node => { + node.removeAttribute("data-kotlin-playground-initialized"); + }) + + KotlinPlayground('code.runnablesample', { + getInstance: playgroundInstance => { + instances.push(playgroundInstance) + }, + theme: theme + }); +} + +// We check if type is accessible from the current scope to determine if samples script is present +// As an alternative we could extract this samples-specific script to new js file but then we would handle dark mode in 2 separate files which is not ideal +const samplesAreEnabled = () => { + try { + KotlinPlayground + return true + } catch (e) { + return false + } +} + + +const initHidingLeftNavigation = () => { + document.getElementById("menu-toggle").onclick = function (event) { + //Events need to be prevented from bubbling since they will trigger next handler + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + document.getElementById("leftColumn").classList.toggle("open"); + } + + document.getElementById("main").onclick = () => { + document.getElementById("leftColumn").classList.remove("open"); + } +} + +// Hash change is needed in order to allow for linking inside the same page with anchors +// If this is not present user is forced to refresh the site in order to use an anchor +window.onhashchange = handleAnchor + +function scrollToElementInContent(element) { + const scrollToElement = () => document.getElementById('main').scrollTo({ + top: element.offsetTop - topNavbarOffset.offsetHeight, + behavior: "smooth" + }) + + const waitAndScroll = () => { + setTimeout(() => { + if (topNavbarOffset) { + scrollToElement() + } else { + waitForScroll() + } + }, 50) + } + + if (topNavbarOffset) { + scrollToElement() + } else { + waitAndScroll() + } +} + + +function handleAnchor() { + if (highlightedAnchor) { + highlightedAnchor.classList.remove('anchor-highlight') + highlightedAnchor = null; + } + + let searchForContentTarget = function (element) { + if (element && element.hasAttribute) { + if (element.hasAttribute("data-togglable")) return element.getAttribute("data-togglable"); + else return searchForContentTarget(element.parentNode) + } else return null + } + + let findAnyTab = function (target) { + let result = null + document.querySelectorAll('div[tabs-section] > button[data-togglable]') + .forEach(node => { + if(node.getAttribute("data-togglable").split(",").includes(target)) { + result = node + } + }) + return result + } + + let anchor = window.location.hash + if (anchor != "") { + anchor = anchor.substring(1) + let element = document.querySelector('a[data-name="' + anchor + '"]') + + if (element) { + const content = element.nextElementSibling + const contentStyle = window.getComputedStyle(content) + if(contentStyle.display == 'none') { + let tab = findAnyTab(searchForContentTarget(content)) + if (tab) { + toggleSections(tab) + } + } + + if (content) { + content.classList.add('anchor-highlight') + highlightedAnchor = content + } + + scrollToElementInContent(element) + } + } +} + +function initTabs() { + // we could have only a single type of data - classlike or package + const mainContent = document.querySelector('.main-content'); + const type = mainContent ? mainContent.getAttribute("data-page-type") : null; + const localStorageKey = "active-tab-" + type; + document.querySelectorAll('div[tabs-section]').forEach(element => { + showCorrespondingTabBody(element); + element.addEventListener('click', ({target}) => { + const togglable = target ? target.getAttribute("data-togglable") : null; + if (!togglable) return; + + localStorage.setItem(localStorageKey, JSON.stringify(togglable)); + toggleSections(target); + }); + }); + + const cached = localStorage.getItem(localStorageKey); + if (!cached) return; + + const tab = document.querySelector( + 'div[tabs-section] > button[data-togglable="' + JSON.parse(cached) + '"]' + ); + if (!tab) return; + + toggleSections(tab); +} + +function showCorrespondingTabBody(element) { + const buttonWithKey = element.querySelector("button[data-active]") + if (buttonWithKey) { + toggleSections(buttonWithKey) + } +} + +function filterButtonHandler(event) { + if (event.target.tagName == "BUTTON" && event.target.hasAttribute("data-filter")) { + let sourceset = event.target.getAttribute("data-filter") + if (filteringContext.activeFilters.indexOf(sourceset) != -1) { + filterSourceset(sourceset) + } else { + unfilterSourceset(sourceset) + } + } +} + +function initializeFiltering() { + filteringContext.dependencies = JSON.parse(sourceset_dependencies) + document.querySelectorAll("#filter-section > button") + .forEach(p => filteringContext.restrictedDependencies.push(p.getAttribute("data-filter"))) + Object.keys(filteringContext.dependencies).forEach(p => { + filteringContext.dependencies[p] = filteringContext.dependencies[p] + .filter(q => -1 !== filteringContext.restrictedDependencies.indexOf(q)) + }) + let cached = window.localStorage.getItem('inactive-filters') + if (cached) { + let parsed = JSON.parse(cached) + filteringContext.activeFilters = filteringContext.restrictedDependencies + .filter(q => parsed.indexOf(q) == -1) + } else { + filteringContext.activeFilters = filteringContext.restrictedDependencies + } + refreshFiltering() +} + +function filterSourceset(sourceset) { + filteringContext.activeFilters = filteringContext.activeFilters.filter(p => p != sourceset) + refreshFiltering() + addSourcesetFilterToCache(sourceset) +} + +function unfilterSourceset(sourceset) { + if (filteringContext.activeFilters.length == 0) { + filteringContext.activeFilters = filteringContext.dependencies[sourceset].concat([sourceset]) + refreshFiltering() + filteringContext.dependencies[sourceset].concat([sourceset]).forEach(p => removeSourcesetFilterFromCache(p)) + } else { + filteringContext.activeFilters.push(sourceset) + refreshFiltering() + removeSourcesetFilterFromCache(sourceset) + } + +} + +function addSourcesetFilterToCache(sourceset) { + let cached = localStorage.getItem('inactive-filters') + if (cached) { + let parsed = JSON.parse(cached) + localStorage.setItem('inactive-filters', JSON.stringify(parsed.concat([sourceset]))) + } else { + localStorage.setItem('inactive-filters', JSON.stringify([sourceset])) + } +} + +function removeSourcesetFilterFromCache(sourceset) { + let cached = localStorage.getItem('inactive-filters') + if (cached) { + let parsed = JSON.parse(cached) + localStorage.setItem('inactive-filters', JSON.stringify(parsed.filter(p => p != sourceset))) + } +} + +function toggleSections(target) { + const activateTabs = (containerClass) => { + for (const element of document.getElementsByClassName(containerClass)) { + for (const child of element.children) { + if (child.getAttribute("data-togglable") === target.getAttribute("data-togglable")) { + child.setAttribute("data-active", "") + } else { + child.removeAttribute("data-active") + } + } + } + } + const toggleTargets = target.getAttribute("data-togglable").split(",") + const activateTabsBody = (containerClass) => { + document.querySelectorAll("." + containerClass + " *[data-togglable]") + .forEach(child => { + if (toggleTargets.includes(child.getAttribute("data-togglable"))) { + child.setAttribute("data-active", "") + } else if(!child.classList.contains("sourceset-dependent-content")) { // data-togglable is used to switch source set as well, ignore it + child.removeAttribute("data-active") + } + }) + } + activateTabs("tabs-section") + activateTabsBody("tabs-section-body") +} + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for (let child of container.children) { + if (child.hasAttribute('data-toggle-list')) { + for (let bm of child.children) { + if (bm == target) { + bm.setAttribute('data-active', "") + } else if (bm != target) { + bm.removeAttribute('data-active') + } + } + } else if (child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active', "") + } else { + child.removeAttribute('data-active') + } + } +} + +function refreshFiltering() { + let sourcesetList = filteringContext.activeFilters + document.querySelectorAll("[data-filterable-set]") + .forEach( + elem => { + let platformList = elem.getAttribute("data-filterable-set").split(',').filter(v => -1 !== sourcesetList.indexOf(v)) + elem.setAttribute("data-filterable-current", platformList.join(',')) + } + ) + refreshFilterButtons() + refreshPlatformTabs() + refreshNoContentNotification() + refreshPlaygroundSamples() +} + +function refreshPlaygroundSamples() { + document.querySelectorAll('code.runnablesample').forEach(node => { + const playground = node.KotlinPlayground; + /* Some samples may be hidden by filter, they have 0px height for visible code area + * after rendering. Call this method for re-calculate code area height */ + playground && playground.view.codemirror.refresh(); + }); +} + +function refreshNoContentNotification() { + const element = document.getElementsByClassName("main-content")[0] + if(filteringContext.activeFilters.length === 0){ + element.style.display = "none"; + + const appended = document.createElement("div") + appended.className = "filtered-message" + appended.innerText = "All documentation is filtered, please adjust your source set filters in top-right corner of the screen" + sourcesetNotification = appended + element.parentNode.prepend(appended) + } else { + if(sourcesetNotification) sourcesetNotification.remove() + element.style.display = "block" + } +} + +function refreshPlatformTabs() { + document.querySelectorAll(".platform-hinted > .platform-bookmarks-row").forEach( + p => { + let active = false; + let firstAvailable = null + p.childNodes.forEach( + element => { + if (element.getAttribute("data-filterable-current") != '') { + if (firstAvailable == null) { + firstAvailable = element + } + if (element.hasAttribute("data-active")) { + active = true; + } + } + } + ) + if (active == false && firstAvailable) { + firstAvailable.click() + } + } + ) +} + +function refreshFilterButtons() { + document.querySelectorAll("#filter-section > button") + .forEach(f => { + if (filteringContext.activeFilters.indexOf(f.getAttribute("data-filter")) != -1) { + f.setAttribute("data-active", "") + } else { + f.removeAttribute("data-active") + } + }) +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js new file mode 100644 index 00000000..07423626 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/prism.js @@ -0,0 +1,22 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+java+javadoc+javadoclike+kotlin&plugins=keep-markup */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; +!function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp("(^|[^\\w.])"+t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp("(^|[^\\w.])"+t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),lookbehind:!0,inside:s.inside},{pattern:RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)"+t+"[A-Z]\\w*\\b"),lookbehind:!0,inside:s.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp("(\\bimport\\s+)"+t+"(?:[A-Z]\\w*|\\*)(?=\\s*;)"),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp("(\\bimport\\s+static\\s+)"+t+"(?:\\w+|\\*)(?=\\s*;)"),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,(function(){return n.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism); +!function(a){var e=a.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(e,n){"string"==typeof e&&(e=[e]),e.forEach((function(e){!function(e,n){var t="doc-comment",r=a.languages[e];if(r){var o=r[t];if(o||(o=(r=a.languages.insertBefore(e,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[t]),o instanceof RegExp&&(o=r[t]={pattern:o}),Array.isArray(o))for(var i=0,s=o.length;i/g,(function(){return"#\\s*\\w+(?:\\s*\\([^()]*\\))?"}));a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp("(@(?:exception|link|linkplain|see|throws|value)\\s+(?:\\*\\s*)?)(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:a.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:a.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:a.languages.markup.tag,entity:a.languages.markup.entity,code:{pattern:/.+/,inside:a.languages.java,alias:"language-java"}}}}}],tag:a.languages.markup.tag,entity:a.languages.markup.entity}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism); +!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism); +"undefined"!=typeof Prism&&"undefined"!=typeof document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",(function(e){if(e.element.children.length&&Prism.util.isActive(e.element,"keep-markup",!0)){var n=Prism.util.isActive(e.element,"drop-tokens",!1),t=0,o=[];r(e.element),o.length&&(e.keepMarkup=o)}function d(e){if(function(e){return!n||"span"!==e.nodeName.toLowerCase()||!e.classList.contains("token")}(e)){var d={element:e,posOpen:t};o.push(d),r(e),d.posClose=t}else r(e)}function r(e){for(var n=0,o=e.childNodes.length;nt.node.posOpen&&(t.nodeStart=r,t.nodeStartPos=t.node.posOpen-t.pos),t.nodeStart&&t.pos+r.data.length>=t.node.posClose&&(t.nodeEnd=r,t.nodeEndPos=t.node.posClose-t.pos),t.pos+=r.data.length);if(t.nodeStart&&t.nodeEnd){var s=document.createRange();return s.setStart(t.nodeStart,t.nodeStartPos),s.setEnd(t.nodeEnd,t.nodeEndPos),t.node.element.innerHTML="",t.node.element.appendChild(s.extractContents()),s.insertNode(t.node.element),s.detach(),!1}}return!0};e.keepMarkup.forEach((function(t){n(e.element,{node:t,pos:0})})),e.highlightedCode=e.element.innerHTML}}))); + +/* + * This is NOT part of the prism.js main script, it's specific to Dokka. + * Dokka generates
tags for new lines inside
 blocks and it works visually,
+ * but it causes prism.js to incorrectly parse some tags (such as inline comments)
+ *
+ * This can be removed if there are no `
` tags inside `
` anymore, but
+ * if there still are - DO NOT remove this hook when upading prism.js to a newer version
+ */
+Prism.hooks.add('before-sanity-check', function (env){env.element.innerHTML = env.element.innerHTML.replace(/
/g, '\n');env.code = env.element.textContent;}); diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js new file mode 100644 index 00000000..7ecae7a6 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/symbol-parameters-wrapper_deferred.js @@ -0,0 +1,64 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +// helps with some corner cases where starts working already, +// but the signature is not yet long enough to be wrapped +(function() { + const leftPaddingPx = 60; + + function createNbspIndent() { + let indent = document.createElement("span"); + indent.append(document.createTextNode("\u00A0\u00A0\u00A0\u00A0")); + indent.classList.add("nbsp-indent"); + return indent; + } + + function wrapSymbolParameters(entry) { + const symbol = entry.target; + const symbolBlockWidth = entry.borderBoxSize && entry.borderBoxSize[0] && entry.borderBoxSize[0].inlineSize; + + // Even though the script is marked as `defer` and we wait for `DOMContentLoaded` event, + // or if this block is a part of hidden tab, it can happen that `symbolBlockWidth` is 0, + // indicating that something hasn't been loaded. + // In this case, observer will be triggered onсe again when it will be ready. + if (symbolBlockWidth > 0) { + const node = symbol.querySelector(".parameters"); + + if (node) { + // if window resize happened and observer was triggered, reset previously wrapped + // parameters as they might not need wrapping anymore, and check again + node.classList.remove("wrapped"); + node.querySelectorAll(".parameter .nbsp-indent") + .forEach(indent => indent.remove()); + + const innerTextWidth = Array.from(symbol.children) + .filter(it => !it.classList.contains("block")) // blocks are usually on their own (like annotations), so ignore it + .map(it => it.getBoundingClientRect().width) + .reduce((a, b) => a + b, 0); + + // if signature text takes up more than a single line, wrap params for readability + if (innerTextWidth > (symbolBlockWidth - leftPaddingPx)) { + node.classList.add("wrapped"); + node.querySelectorAll(".parameter").forEach(param => { + // has to be a physical indent so that it can be copied. styles like + // paddings and `::before { content: " " }` do not work for that + param.prepend(createNbspIndent()); + }); + } + } + } + } + + const symbolsObserver = new ResizeObserver(entries => entries.forEach(wrapSymbolParameters)); + + function initHandlers() { + document.querySelectorAll("div.symbol").forEach(symbol => symbolsObserver.observe(symbol)); + } + + if (document.readyState === 'loading') window.addEventListener('DOMContentLoaded', initHandlers); + else initHandlers(); + + // ToDo: Add `unobserve` if dokka will be SPA-like: + // https://github.com/w3c/csswg-drafts/issues/5155 +})(); diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css new file mode 100644 index 00000000..bdc68723 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/font-jb-sans-auto.css @@ -0,0 +1,36 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +/* Light weight */ +@font-face { + font-family: 'JetBrains Sans'; + src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff') format('woff'); + font-weight: 300; + font-style: normal; +} +/* Regular weight */ +@font-face { + font-family: 'JetBrains Sans'; + src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff') format('woff'); + font-weight: 400; + font-style: normal; +} +/* SemiBold weight */ +@font-face { + font-family: 'JetBrains Sans'; + src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff') format('woff'); + font-weight: 600; + font-style: normal; +} + +@supports (font-variation-settings: normal) { + @font-face { + font-family: 'JetBrains Sans'; + src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2 supports variations'), + url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2-variations'), + url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff') format('woff-variations'); + font-weight: 100 900; + font-style: normal; + } +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css new file mode 100644 index 00000000..69804e46 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/logo-styles.css @@ -0,0 +1,9 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +:root { + --dokka-logo-image-url: url('../images/logo-icon.svg'); + --dokka-logo-height: 50px; + --dokka-logo-width: 50px; +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css new file mode 100644 index 00000000..2d3a091e --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/prism.css @@ -0,0 +1,217 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +/* + * Custom Dokka styles + */ +code .token { + white-space: pre; +} + +/** + * Styles based on webhelp's prism.js styles + * Changes: + * - Since webhelp's styles are in .pcss, they use nesting which is not achievable in native CSS + * so nested css blocks have been unrolled (like dark theme). + * - Webhelp uses "Custom Class" prism.js plugin, so all of their prism classes are prefixed with "--prism". + * Dokka doesn't seem to need this plugin at the moment, so all "--prism" prefixes have been removed. + * - Removed all styles related to `pre` and `code` tags. Kotlinlang's resulting styles are so spread out and complicated + * that it's difficult to gather in one place. Instead use code styles defined in the main Dokka styles, + * which at the moment looks fairly similar. + * + * Based on prism.js default theme + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #8c8c8c; +} + +.token.punctuation { + color: #999; +} + +.token.namespace { + opacity: 0.7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #871094; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #067d17; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + /* This background color was intended by the author of this theme. */ + background: hsla(0, 0%, 100%, 0.5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + font-size: inherit; /* to override .keyword */ + color: #0033b3; +} + +.token.function { + color: #00627a; +} + +.token.class-name { + color: #000000; +} + +.token.regex, +.token.important, +.token.variable { + color: #871094; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.operator { + background: none; +} + +/* + * DARK THEME + */ +:root.theme-dark .token.comment, +:root.theme-dark .token.prolog, +:root.theme-dark .token.cdata { + color: #808080; +} + +:root.theme-dark .token.delimiter, +:root.theme-dark .token.boolean, +:root.theme-dark .token.keyword, +:root.theme-dark .token.selector, +:root.theme-dark .token.important, +:root.theme-dark .token.atrule { + color: #cc7832; +} + +:root.theme-dark .token.operator, +:root.theme-dark .token.punctuation, +:root.theme-dark .token.attr-name { + color: #a9b7c6; +} + +:root.theme-dark .token.tag, +:root.theme-dark .token.tag .punctuation, +:root.theme-dark .token.doctype, +:root.theme-dark .token.builtin { + color: #e8bf6a; +} + +:root.theme-dark .token.entity, +:root.theme-dark .token.number, +:root.theme-dark .token.symbol { + color: #6897bb; +} + +:root.theme-dark .token.property, +:root.theme-dark .token.constant, +:root.theme-dark .token.variable { + color: #9876aa; +} + +:root.theme-dark .token.string, +:root.theme-dark .token.char { + color: #6a8759; +} + +:root.theme-dark .token.attr-value, +:root.theme-dark .token.attr-value .punctuation { + color: #a5c261; +} + +:root.theme-dark .token.attr-value .punctuation:first-child { + color: #a9b7c6; +} + +:root.theme-dark .token.url { + text-decoration: underline; + + color: #287bde; + background: transparent; +} + +:root.theme-dark .token.function { + color: #ffc66d; +} + +:root.theme-dark .token.regex { + background: #364135; +} + +:root.theme-dark .token.deleted { + background: #484a4a; +} + +:root.theme-dark .token.inserted { + background: #294436; +} + +:root.theme-dark .token.class-name { + color: #a9b7c6; +} + +:root.theme-dark .token.function { + color: #ffc66d; +} + +:root.theme-darkcode .language-css .token.property, +:root.theme-darkcode .language-css, +:root.theme-dark .token.property + .token.punctuation { + color: #a9b7c6; +} + +code.language-css .token.id { + color: #ffc66d; +} + +:root.theme-dark code.language-css .token.selector > .token.class, +:root.theme-dark code.language-css .token.selector > .token.attribute, +:root.theme-dark code.language-css .token.selector > .token.pseudo-class, +:root.theme-dark code.language-css .token.selector > .token.pseudo-element { + color: #ffc66d; +} + +:root.theme-dark .language-plaintext .token { + /* plaintext code should be colored as article text */ + color: inherit !important; +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css new file mode 100644 index 00000000..62b0ddbd --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css @@ -0,0 +1,1513 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +@import url('./font-jb-sans-auto.css'); +@import url('https://fonts.googleapis.com/css?family=JetBrains+Mono'); + +/* --- root styles --- */ +:root { + --default-gray: #f4f4f4; + --default-font-color: black; + --header-font-color: var(--default-font-color); + + --breadcrumb-font-color: #637282; + --breadcrumb-margin: 24px; + --hover-link-color: #5B5DEF; + + --footer-height: 64px; + --footer-padding-top: 48px; + --footer-background: var(--default-gray); + --footer-font-color: var(--average-color); + --footer-go-to-top-color: white; + + --horizontal-spacing-for-content: 16px; + --bottom-spacing: 16px; + --color-scrollbar: rgba(39, 40, 44, 0.40); + --color-scrollbar-track: var(--default-gray); + --default-white: #fff; + --background-color: var(--default-white); + --dark-mode-and-search-icon-color: var(--default-white); + --color-dark: #27282c; + --default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,Roboto, Oxygen, Ubuntu,Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif; + --default-monospace-font-family: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace; + --default-font-size: 15px; + --average-color: var(--color-dark); + --brief-color: var(--average-color); + --copy-icon-color: rgba(39, 40, 44, .7); + --copy-icon-hover-color: var(--color-dark); + --code-background: rgba(39, 40, 44, .05); + --border-color: rgba(39, 40, 44, .2); + --navigation-highlight-color: rgba(39, 40, 44, 0.05); + --top-navigation-height: 73px; + --max-width: 1160px; + --white-10: hsla(0, 0%, 100%, .1); + + --active-tab-border-color: #7F52FF; + --inactive-tab-border-color: rgba(164, 164, 170, 0.7); + + --active-section-color: #7F52FF; + --inactive-section-color: rgba(25, 25, 28, .7); + + --sidebar-width: 280px; + --sidemenu-section-active-color: #7F52FF; +} + +html { + height: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + scrollbar-color: rgba(39, 40, 44, 0.40) #F4F4F4; + scrollbar-color: var(--color-scrollbar) var(--color-scrollbar-track); + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + color: var(--default-font-color); +} + +html ::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +html ::-webkit-scrollbar-track { + background-color: var(--color-scrollbar-track); +} + +html ::-webkit-scrollbar-thumb { + width: 8px; + border-radius: 6px; + background: rgba(39, 40, 44, 0.40); + background: var(--color-scrollbar); +} + +html, body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} +/* /--- root styles --- */ + +/* --- global tags styles --- */ +body, table { + background: var(--background-color); + font-family: var(--default-font-family); + font-style: normal; + font-weight: normal; + font-size: var(--default-font-size); + line-height: 1.6; + margin: 0; +} + +h1 { + font-size: 40px; + line-height: 48px; + letter-spacing: -1px; +} + +h2 { + font-size: 31px; + line-height: 40px; + letter-spacing: -0.5px; +} + +h3 { + font-size: 20px; + line-height: 28px; + letter-spacing: -0.2px; +} + +p, ul, ol, table, pre, dl { + margin: 0; +} + +a { + text-decoration: none; +} + +u { + text-decoration: none; + padding-bottom: 2px; + border-bottom: 1px solid var(--border-color); +} + +blockquote { + border-left: 1ch solid var(--default-gray); + margin: 0; + padding-left: 1ch; + font-style: italic; + color: var(--average-color); +} + +.theme-dark blockquote { + color: var(--default-font-color); + border-left-color: var(--code-background); +} + +pre { + display: block; +} + +dt { + color: #444; + font-weight: 530; +} + +img { + max-width: 100%; +} + +small { + font-size: 11px; +} + +table { + width: 100%; + border-collapse: collapse; + padding: 5px; +} + +th, td { + padding: 12px 10px 11px; + text-align: left; + vertical-align: top; +} + +tbody > tr { + min-height: 56px; +} + +td:first-child { + width: 20vw; +} +/* /--- global tags styles --- */ + +/* --- utils classes --- */ +.w-100 { + width: 100%; +} + +.no-gutters { + margin: 0; + padding: 0; +} + +.d-flex { + display: flex; +} + +.floating-right { + float: right; +} + +.pull-right { + float: right; + margin-left: auto +} + +.clearfix::after { + display: block; + content: ''; + clear: both; + height: 0; +} +/* /--- utils classes --- */ + +/* ---dark theme --- */ +.theme-dark { + --background-color: #27282c; + --color-dark: #3d3d41; + --default-font-color: hsla(0, 0%, 100%, 0.8); + --border-color: hsla(0, 0%, 100%, 0.2); + --code-background: hsla(0, 0%, 100%, 0.05); + --breadcrumb-font-color: #8c8c8e; + --brief-color: hsla(0, 0%, 100%, 0.4); + --copy-icon-color: hsla(0, 0%, 100%, 0.6); + --copy-icon-hover-color: #fff; + + --active-tab-border-color: var(--default-font-color); + --inactive-tab-border-color: hsla(0, 0%, 100%, 0.4); + + --active-section-color: var(--default-font-color); + --inactive-section-color: hsla(0, 0%, 100%, 0.4); + + --navigation-highlight-color: rgba(255, 255, 255, 0.05); + --footer-background: hsla(0, 0%, 100%, 0.05); + --footer-font-color: hsla(0, 0%, 100%, 0.6); + --footer-go-to-top-color: var(--footer-font-color); + + --sidemenu-section-active-color: var(--color-dark); +} +/* /---dark theme --- */ + +.root { + display: flex; + flex-direction: column; + height: 100%; +} + +/* --- Navigation styles --- */ +.navigation { + display: flex; + justify-content: space-between; + + color: #fff; + background-color: var(--color-dark); + font-family: var(--default-font-family); + letter-spacing: -0.1px; + + /* Reset margin and use padding for border */ + margin-left: 0; + margin-right: 0; + padding: 10px var(--horizontal-spacing-for-content); + + z-index: 4; +} + +.navigation--inner { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex: 1 1 auto; +} + +.navigation--inner, .navigation-title { + min-height: 40px; +} + +.navigation-title, .filter-section { + align-items: center; +} + +.navigation-title { + display: flex; + align-items: center; +} + +/* --- Navigation MENU --- */ +.menu-toggle { + color: var(--background-color); + line-height: 0; + font-size: 0; + text-indent: -9999px; + + background: transparent; + border: none; + padding: 0; + margin-right: 16px; + outline: none; + + transition: margin .2s ease-out; + z-index: 5; +} + +@media (min-width: 760px) { + .menu-toggle { + display: none; + } +} + +.menu-toggle::before { + display: block; + content: ''; + background: url('../images/burger.svg') no-repeat center; + height: 28px; + width: 28px; +} +/* /--- Navigation MENU --- */ + +.library-version { + position: relative; + top: -4px; + margin-left: 3px; + + color: rgba(255,255,255,.7); + font-size: 13px; + font-weight: normal; + line-height: 16px; +} + +.filter-section { + z-index: 0; +} + +.no-js .filter-section { + display: none; +} + +@media (min-width: 760px) { + .filter-section { + padding: 5px 0 5px; + } +} +/* --- Navigation controls --- */ +.navigation-controls { + display: flex; + margin-left: 4px; +} + +@media (min-width: 760px) { + .navigation-controls { + align-items: center; + } +} + +.no-js .navigation-controls { + display: none; +} + +/* --- Navigation THEME --- */ +.navigation-controls--search { + display: inline-flex; + font-size: 0; + line-height: 0; +} + +.navigation-controls--theme { + display: block; + border-radius: 50%; + background-color: inherit; + padding: 0; + border: none; + cursor: pointer; + font-size: 0; + line-height: 0; +} + +.navigation-controls--theme::before { + height: 40px; + width: 40px; +} + +.navigation-controls--theme:hover { + background: var(--white-10); +} + +.navigation-controls--theme::before { + display: block; + content: url("../images/theme-toggle.svg"); +} + +@media (max-width: 759px) { + .navigation-controls--theme { + display: none; + } +} +/* /--- Navigation THEME --- */ + +/* --- Navigation HOMEPAGE --- */ +.navigation-controls--homepage { + height: 40px; + width: 40px; + display: block; + border-radius: 50%; + cursor: pointer; +} + +.navigation-controls--homepage a::before { + height: 100%; + width: 20px; + margin-left: 10px; + display: block; + content: ""; + background: url("../images/homepage.svg"); + background-size: 100% 100%; +} + +.navigation-controls--homepage:hover { + background: var(--white-10); +} + +@media (max-width: 759px) { + .navigation-controls--homepage { + display: none; + } +} +/* /--- Navigation HOMEPAGE --- */ + +.navigation .platform-selector:not([data-active]) { + color: #fff; +} +/* /--- Navigation controls --- */ +/* /--- Navigation styles --- */ + +/* --- Layout styles --- */ + +#container { + display: flex; + flex: 1 1 auto; + min-height: 0; /* full height exclude header */ +} + +#container > .sidebar, #container > #main { + overflow: auto; +} + +#main { + display: flex; + flex-direction: column; + flex: 1 1 0; /* full width, but no affects for sidebar */ +} + +.sidebar { + display: flex; + flex-direction: column; + box-sizing: border-box; + border-right: 1px solid var(--border-color); + width: var(--sidebar-width); +} + +.no-js .sidebar { + display: none; +} + +@media (max-width: 759px) { + #container { + position: relative; + } + + .sidebar { + position: absolute; + top: 0; + bottom: 0; + box-sizing: border-box; + background: var(--background-color); + margin-left: calc(-1 * var(--sidebar-width)); + transition: margin .2s ease-out; + z-index: 4; + } + + .sidebar.open { + margin-left: 0; + } + + .sidebar.open ~ #main .navigation-controls--search { + display: none; + } + + .sidebar.open ~ #main .menu-toggle { + margin-left: var(--sidebar-width); + } +} + +.sidebar--inner { + font-size: 12px; + font-weight: 400; + line-height: 16px; + padding-top: 22px; + padding-bottom: 16px; +} +/* /--- Layout styles --- */ + +/* --- Main Content styles --- */ +.main-content { + padding-bottom: var(--bottom-spacing); + margin-left: auto; + margin-right: auto; + max-width: var(--max-width); + width: 100%; + z-index: 0; +} + +.main-content > * { + margin-left: var(--horizontal-spacing-for-content); + margin-right: var(--horizontal-spacing-for-content); +} + +.main-content .content > hr { + margin: 30px 0; + border-top: 3px double #8c8b8b; +} + +.main-content :is(h1, h2) { + font-weight: 530; +} +/* /--- Main Content styles --- */ + +/* /--- Breadcrumbs styles --- */ +.breadcrumbs, .breadcrumbs a, .breadcrumbs a:hover { + margin-top: var(--breadcrumb-margin); + color: var(--breadcrumb-font-color); + overflow-wrap: break-word; +} + +.breadcrumbs .delimiter { + margin: auto 2px; +} + +.breadcrumbs .current { + color: var(--default-font-color); +} +/* /--- Breadcrumbs styles --- */ + +.tabs-section, +.platform-hinted > .platform-bookmarks-row { + margin-left: -8px; + margin-right: -8px; +} + +.section-tab, +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + border: 0; + padding: 11px 3px; + margin: 0 8px; + cursor: pointer; + outline: none; + font-size: var(--default-font-size); + background-color: transparent; + color: var(--inactive-section-color); + border-bottom: 1px solid var(--inactive-tab-border-color); +} + +.platform-hinted > .platform-bookmarks-row { + margin-bottom: 16px; +} + +.no-js .platform-bookmarks-row + .sourceset-dependent-content { + margin-top: 8px; +} + +.no-js .platform-bookmarks-row + .sourceset-dependent-content:last-of-type { + margin-top: 0; +} + +.section-tab:hover { + color: var(--default-font-color); + border-bottom: 2px solid var(--default-font-color); +} + +.section-tab[data-active=''] { + color: var(--active-section-color); + border-bottom: 2px solid var(--active-tab-border-color); +} + +.tabs-section-body > div { + margin-top: 12px; +} + +.tabs-section-body .with-platform-tabs { + padding-top: 12px; + padding-bottom: 12px; +} + +.cover > .platform-hinted { + padding-bottom: 12px; +} + +.cover { + display: flex; + flex-direction: column; +} + +.cover .platform-hinted.with-platform-tabs .sourceset-dependent-content > .block ~ .symbol { + padding-top: 16px; + padding-left: 0; +} + +.cover .sourceset-dependent-content > .block { + padding: 16px 0; + font-size: 18px; + line-height: 28px; +} + +.cover .platform-hinted.with-platform-tabs .sourceset-dependent-content > .block { + padding: 0; + font-size: var(--default-font-size); +} + +.cover ~ .divergent-group { + margin-top: 24px; + padding: 24px 8px 8px 8px; +} + +.cover ~ .divergent-group .main-subrow .symbol { + width: 100%; +} + +.main-content p.paragraph, +.sample-container, blockquote, +.content > .symbol { + margin-top: 8px; +} + +blockquote, +.content > .symbol:first-of-type, +p.paragraph:first-child, +.brief p.paragraph { + margin-top: 0; +} + +.content .kdoc-tag > p.paragraph { + margin-top: 0; +} + +.content h4 { + margin-bottom: 0; +} + +.divergent-group { + background-color: var(--background-color); + padding: 16px 0 8px 0; + margin-bottom: 2px; +} + +.divergent-group .table-row, tbody > tr { + border-bottom: 1px solid var(--border-color); +} + +.divergent-group .table-row:last-of-type, tbody > tr:last-of-type { + border-bottom: none; +} + +.title > .divergent-group:first-of-type { + padding-top: 0; +} + +.sample-container, div.CodeMirror { + position: relative; + display: flex; + flex-direction: column; +} + +code.paragraph { + display: block; +} + +.overview > .navButton { + position: absolute; + align-items: center; + display: flex; + justify-content: flex-end; + padding: 2px 2px 2px 0; + margin-right: 5px; + cursor: pointer; +} + +.strikethrough { + text-decoration: line-through; +} + +.symbol:empty { + padding: 0; +} + +.symbol:not(.token), code { + background-color: var(--code-background); + align-items: center; + box-sizing: border-box; + white-space: pre-wrap; + font-family: var(--default-monospace-font-family); + font-size: var(--default-font-size); +} + +.symbol:not(.token), code.block { + display: block; + padding: 12px 32px 12px 12px; + border-radius: 8px; + line-height: 24px; + position: relative; +} + +code { + overflow-x: auto; + max-width: 100%; +} + +code:not(.block) { + display: inline-block; + vertical-align: middle; +} + +.symbol > a { + color: var(--hover-link-color); +} + +.copy-icon { + cursor: pointer; +} + +.sample-container span.copy-icon { + display: none; +} + +.js .sample-container:hover span.copy-icon { + display: inline-block; +} + +.sample-container span.copy-icon::before { + width: 24px; + height: 24px; + display: inline-block; + content: ''; + /* masks are required if you want to change color of the icon dynamically instead of using those provided with the SVG */ + -webkit-mask: url("../images/copy-icon.svg") no-repeat 50% 50%; + mask: url("../images/copy-icon.svg") no-repeat 50% 50%; + -webkit-mask-size: cover; + mask-size: cover; + background-color: var(--copy-icon-color); +} + +.sample-container span.copy-icon:hover::before { + background-color: var(--copy-icon-hover-color); +} + +.copy-popup-wrapper { + display: none; + align-items: center; + position: absolute; + z-index: 1000; + background: var(--background-color); + font-weight: normal; + font-family: var(--default-font-family); + width: max-content; + font-size: var(--default-font-size); + cursor: default; + border: 1px solid #D8DCE1; + box-sizing: border-box; + box-shadow: 0 5px 10px var(--ring-popup-shadow-color); + border-radius: 3px; + color: var(--default-font-color); +} + +.copy-popup-wrapper > .copy-popup-icon::before { + content: url("../images/copy-successful-icon.svg"); + padding: 8px; +} + +.copy-popup-wrapper > .copy-popup-icon { + position: relative; + top: 3px; +} + +.copy-popup-wrapper.popup-to-left { + /* since it is in position absolute we can just move it to the left to make it always appear on the left side of the icon */ + left: -15em; +} + +.table-row:hover .copy-popup-wrapper.active-popup, +.sample-container:hover .copy-popup-wrapper.active-popup { + display: flex !important; +} + +.copy-popup-wrapper:hover { + font-weight: normal; +} + +.copy-popup-wrapper > span:last-child { + padding-right: 14px; +} + +.symbol .top-right-position, .sample-container .top-right-position { + /* it is important for a parent to have a position: relative */ + position: absolute; + top: 8px; + right: 8px; +} + +.sideMenuPart > .overview { + display: flex; + align-items: center; + position: relative; + user-select: none; /* there's a weird bug with text selection */ + padding: 8px 0; +} + +.sideMenuPart a { + display: block; + align-items: center; + color: var(--default-font-color); + overflow: hidden; + padding-left: 23px; +} + +.sideMenuPart a:hover { + text-decoration: none; + color: var(--default-font-color); +} + +.sideMenuPart > .overview:before { + box-sizing: border-box; + content: ''; + top: 0; + width: var(--sidebar-width); + right: 0; + bottom: 0; + position: absolute; + z-index: -1; +} + +.overview:hover:before { + background-color: var(--navigation-highlight-color); +} + +#nav-submenu { + padding-left: 24px; +} + +.sideMenuPart { + padding-left: 12px; + box-sizing: border-box; +} + +.sideMenuPart.hidden > .overview .navButtonContent::before { + transform: rotate(0deg); +} + +.sideMenuPart > .overview .navButtonContent::before { + content: ''; + + -webkit-mask: url("../images/arrow_down.svg") no-repeat 50% 50%; + mask: url("../images/arrow_down.svg") no-repeat 50% 50%; + -webkit-mask-size: cover; + mask-size: cover; + background-color: var(--default-font-color); + + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + transform: rotate(90deg); + width: 16px; + height: 16px; +} + +.sideMenuPart[data-active] > .overview .navButtonContent::before { + background-color: var(--default-white); +} + +.sideMenuPart.hidden > .navButton .navButtonContent::after { + content: '\02192'; +} + +.sideMenuPart.hidden > .sideMenuPart { + display: none; +} + +.overview .nav-link-grid { + display: grid; + grid-template-columns: 16px auto; /* first is the icon, then name */ + grid-gap: 6px; + align-items: center; +} + +.nav-icon { + width: 16px; + height: 16px; +} + +.nav-icon.class::before { + content: url("../images/nav-icons/class.svg"); +} + +.nav-icon.class-kt::before { + content: url("../images/nav-icons/class-kotlin.svg"); +} + +.nav-icon.function::before { + content: url("../images/nav-icons/function.svg"); +} + +.nav-icon.enum-class::before { + content: url("../images/nav-icons/enum.svg"); +} + +.nav-icon.enum-class-kt::before { + content: url("../images/nav-icons/enum-kotlin.svg"); +} + +.nav-icon.annotation-class::before { + content: url("../images/nav-icons/annotation.svg"); +} + +.nav-icon.annotation-class-kt::before { + content: url("../images/nav-icons/annotation-kotlin.svg"); +} + +.nav-icon.abstract-class::before { + content: url("../images/nav-icons/abstract-class.svg"); +} + +.nav-icon.abstract-class-kt::before { + content: url("../images/nav-icons/abstract-class-kotlin.svg"); +} + +.nav-icon.exception-class::before { + content: url("../images/nav-icons/exception-class.svg"); +} + +.nav-icon.interface::before { + content: url("../images/nav-icons/interface.svg"); +} + +.nav-icon.interface-kt::before { + content: url("../images/nav-icons/interface-kotlin.svg"); +} + +.nav-icon.object::before { + content: url("../images/nav-icons/object.svg"); +} + +.nav-icon.typealias-kt::before { + content: url("../images/nav-icons/typealias-kotlin.svg"); +} + +.nav-icon.val::before { + content: url("../images/nav-icons/field-value.svg"); +} + +.nav-icon.var::before { + content: url("../images/nav-icons/field-variable.svg"); +} + +.filtered > a, .filtered > .navButton { + display: none; +} + + +.brief { + white-space: pre-wrap; + overflow: hidden; +} + +h1.cover { + font-size: 52px; + line-height: 56px; + letter-spacing: -1.5px; + margin-bottom: 0; + padding-bottom: 32px; + display: block; +} + +@media (max-width: 1119px) { + h1.cover { + font-size: 48px; + line-height: 48px; + padding-bottom: 8px; + } +} + +@media (max-width: 759px) { + h1.cover { + font-size: 32px; + line-height: 32px; + } +} + +.UnderCoverText { + font-size: 16px; + line-height: 28px; +} + +.UnderCoverText code { + font-size: inherit; +} + +.UnderCoverText table { + margin: 8px 0 8px 0; + word-break: break-word; +} + +@media (max-width: 960px) { + .UnderCoverText table { + display: block; + word-break: normal; + overflow: auto; + } +} + +.main-content a:not([data-name]) { + padding-bottom: 2px; + border-bottom: 1px solid var(--border-color); + cursor: pointer; + text-decoration: none; + color: inherit; + font-size: inherit; + line-height: inherit; + transition: color .1s, border-color .1s; +} + +.main-content a:hover { + border-bottom-color: unset; + color: inherit +} + +a small { + font-size: 11px; + margin-top: -0.6em; + display: block; +} + +p.paragraph img { + display: block; +} + +.deprecation-content { + margin: 20px 10px; + border:1px solid var(--border-color); + padding: 13px 15px 16px 15px; +} + +.deprecation-content > h3 { + margin-top: 0; + margin-bottom: 0; +} + +.deprecation-content > h4 { + font-size: 16px; + margin-top: 15px; + margin-bottom: 0; +} + +.deprecation-content code.block { + padding: 5px 10px; + display: inline-block; +} + +.deprecation-content .footnote { + margin-left: 25px; + font-size: 13px; + font-weight: bold; + display: block; +} + +.deprecation-content .footnote > p { + margin: 0; +} + +[data-filterable-current=''] { + display: none !important; +} + +.platform-tags, .filter-section { + display: flex; + flex-wrap: wrap; + margin-bottom: -8px; + margin-left: -4px; +} + +.platform-tag { + --platform-tag-color: #bababb; + border: 0 none; + margin-right: 4px; + margin-bottom: 8px; + + font-family: var(--default-font-family); + font-size: 13px; + line-height: 1.5; + text-transform: capitalize; +} + +.platform-tag.js-like, .platform-tag.jvm-like, .platform-tag.wasm-like { + text-transform: uppercase; +} + +.filter-section .platform-tag { + cursor: pointer; + border-radius: 4px; + padding: 2px 16px; +} + +.filter-section .platform-tag.jvm-like[data-active], .platform-tags .platform-tag.jvm-like { + --platform-tag-color: #4dbb5f; +} + +.filter-section .platform-tag.js-like[data-active], .platform-tags .platform-tag.js-like { + --platform-tag-color: #ffc700; +} + +.filter-section .platform-tag.native-like[data-active], .platform-tags .platform-tag.native-like { + --platform-tag-color: #E082F3; +} + +.filter-section .platform-tag.wasm-like[data-active], .platform-tags .platform-tag.wasm-like { + --platform-tag-color: #9585F9; +} + +.filter-section .platform-tag[data-active]:hover { + color: #fff; + background-color: rgba(186, 186, 187, .7); +} + +.filter-section .platform-tag:not([data-active]) { + color: #fff; + /* Safari doesn't work correctly for `outline` with `border-radius` */ + /* outline: 1px solid rgba(255,255,255,.6); */ + /* ...use `box-shadow` instead: */ + box-shadow: 0 0 0 1px rgb(255 255 255 / 60%); + background-color: rgba(255,255,255,.05); +} + +.filter-section .platform-tag[data-active] { + color: #19191c; + background-color: var(--platform-tag-color); +} + +.platform-tags .platform-tag { + display: flex; + align-items: center; +} + +.platform-tags .platform-tag::before { + display: inline-block; + content: ''; + border-radius: 50%; + background: var(--platform-tag-color); + margin: 0 4px 0 8px; + height: 8px; + width: 8px; + + font-size: 13px; + line-height: 1.6; +} + +td.content { + padding-left: 24px; + padding-top: 16px; + display: flex; + flex-direction: column; +} + +.main-subrow { + display: flex; + flex-direction: row; + padding: 0; + flex-wrap: wrap; +} + +.main-subrow > div { + margin-bottom: 8px; +} + +.main-subrow > div > span { + display: flex; + position: relative; +} + +.js .main-subrow:hover .anchor-icon { + opacity: 1; + transition: 0.2s; +} + +.main-subrow .anchor-icon { + opacity: 0; + transition: 0.2s 0.5s; +} + +.main-subrow .anchor-icon::before { + content: url("../images/anchor-copy-button.svg"); +} + +.main-subrow .anchor-icon:hover { + cursor: pointer; +} + +.main-subrow .anchor-icon:hover > svg path { + fill: var(--hover-link-color); +} + +@media (hover: none) { + .main-subrow .anchor-icon { + display: none; + } +} + +.main-subrow .anchor-wrapper { + position: relative; + width: 24px; + height: 16px; + margin-left: 3px; +} + +.inline-flex { + display: inline-flex; +} + +.platform-hinted { + flex: auto; + display: block; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + background: inherit; + flex: none; + order: 5; + align-self: flex-start; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:hover { + color: var(--default-font-color); + border-bottom: 2px solid var(--default-font-color); +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border-bottom: 2px solid var(--active-tab-border-color); + color: var(--active-section-color); +} + +.no-js .platform-bookmarks-row, .no-js .tabs-section { + display: none; +} + +.js .platform-hinted > .content:not([data-active]), +.js .tabs-section-body *[data-togglable]:not([data-active]) { + display: none; +} + +/* Work around an issue: https://github.com/JetBrains/kotlin-playground/issues/91 +Applies for main description blocks with platform tabs. +Just in case of possible performance degradation it excluding tabs with briefs on classlike page */ +#content > div:not(.tabbedcontent) .sourceset-dependent-content:not([data-active]) { + display: block !important; + visibility: hidden; + height: 0; + position: fixed; + top: 0; +} + +.with-platform-tags { + display: flex; +} + +.with-platform-tags ~ .main-subrow { + padding-top: 8px; +} + +.cover .with-platform-tabs { + font-size: var(--default-font-size); +} + +.cover > .with-platform-tabs > .content { + padding: 8px 16px; + border: 1px solid var(--border-color); +} + +.cover > .block { + padding-top: 48px; + padding-bottom: 24px; + font-size: 18px; + line-height: 28px; +} + +.cover > .block:empty { + padding-bottom: 0; +} + +.parameters.wrapped > .parameter { + display: block; +} + +.table-row .inline-comment { + padding-top: 8px; + padding-bottom: 8px; +} + +.table-row .platform-hinted .sourceset-dependent-content .brief, +.table-row .platform-hinted .sourceset-dependent-content .inline-comment { + padding: 8px; +} + +.sideMenuPart[data-active] > .overview:before { + background: var(--sidemenu-section-active-color); +} + +.sideMenuPart[data-active] > .overview > a { + color: var(--default-white); +} + +.table { + display: flex; + flex-direction: column; +} + +.table-row { + display: flex; + flex-direction: column; + border-bottom: 1px solid var(--border-color); + padding: 11px 0 12px 0; + background-color: var(--background-color); +} + +.table-row:last-of-type { + border-bottom: none; +} + +.table-row .brief-comment { + color: var(--brief-color); +} + +.platform-dependent-row { + display: grid; + padding-top: 8px; +} + +.title-row { + display: grid; + grid-template-columns: auto auto 7em; + width: 100%; +} + +@media print, (min-width: 960px) { + .title-row { + grid-template-columns: 20% auto 7em; + } +} + +.keyValue { + display: grid; + grid-gap: 8px; +} + +@media print, (min-width: 960px) { + .keyValue { + grid-template-columns: 20% 80%; + } + .keyValue > div:first-child { + word-break: break-word; + } +} + +@media print, (max-width: 960px) { + div.wrapper { + width: auto; + margin: 0; + } + + header, section, footer { + float: none; + position: static; + width: auto; + } + + header { + padding-right: 320px; + } + + section { + border: 1px solid #e5e5e5; + border-width: 1px 0; + padding: 20px 0; + margin: 0 0 20px; + } + + header a small { + display: inline; + } + + header ul { + position: absolute; + right: 50px; + top: 52px; + } +} + +.anchor-highlight { + border: 1px solid var(--hover-link-color) !important; + box-shadow: 0 0 0 0.2em #c8e1ff; + margin-top: 0.2em; + margin-bottom: 0.2em; +} + +.filtered-message { + margin: 25px; + font-size: 20px; + font-weight: bolder; +} + +div.runnablesample { + height: fit-content; +} + +/* --- footer --- */ +.footer { + clear: both; + display: flex; + align-items: center; + position: relative; + min-height: var(--footer-height); + font-size: 12px; + line-height: 16px; + letter-spacing: 0.2px; + color: var(--footer-font-color); + margin-top: auto; + background-color: var(--footer-background); +} + +.footer span.go-to-top-icon { + border-radius: 2em; + padding: 11px 10px !important; + background-color: var(--footer-go-to-top-color); +} + +.footer span.go-to-top-icon > a::before { + content: url("../images/go-to-top-icon.svg"); +} + +.footer > span:first-child { + margin-left: var(--horizontal-spacing-for-content); + padding-left: 0; +} + +.footer > span:last-child { + margin-right: var(--horizontal-spacing-for-content); + padding-right: 0; +} + +.footer > span { + padding: 0 16px; +} + +.footer a { + color: var(--breadcrumb-font-color); +} + +.footer span.go-to-top-icon > #go-to-top-link { + padding: 0; + border: none; +} + +.footer .padded-icon { + padding-left: 0.5em; +} + +.footer .padded-icon::before { + content: url("../images/footer-go-to-link.svg"); +} +/* /--- footer --- */ + +/* Logo styles */ +:root { + --dokka-logo-image-url: url('../images/logo-icon.svg'); + --dokka-logo-height: 50px; + --dokka-logo-width: 50px; +} + +.library-name--link { + display: flex; + align-items: center; + color: #fff; + font-weight: 530; +} + +.library-name--link::before { + content: ''; + background: var(--dokka-logo-image-url) center no-repeat; + background-size: var(--dokka-logo-height) var(--dokka-logo-width); + margin-right: 5px; + width: var(--dokka-logo-height); + height: var(--dokka-logo-width); +} + +@media (max-width: 759px) { + .library-name--link::before { + display: none; + } +} +/* / Logo styles */ + +/* +the hack to hide the headers inside tabs for a package page because each tab +has only one header, and the header text is the same as the tab name, so no point in showing it +*/ +.main-content[data-page-type="package"] .tabs-section-body h2 { + display: none; +} diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl new file mode 100644 index 00000000..0311f9f8 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl @@ -0,0 +1,44 @@ +<#import "includes/page_metadata.ftl" as page_metadata> +<#import "includes/header.ftl" as header> +<#import "includes/footer.ftl" as footer> + + + + + <@page_metadata.display/> + <@template_cmd name="pathToRoot"> + + <#-- This script doesn't need to be there but it is nice to have + since app in dark mode doesn't 'blink' (class is added before it is rendered) --> + + <#-- Resources (scripts, stylesheets) are handled by Dokka. + Use customStyleSheets and customAssets to change them. --> + <@resources/> + + +
+ <@header.display/> +
+ +
+ <@content/> + <@footer.display/> +
+
+
+ + \ No newline at end of file diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl new file mode 100644 index 00000000..461a8162 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/footer.ftl @@ -0,0 +1,7 @@ +<#macro display> + + \ No newline at end of file diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl new file mode 100644 index 00000000..d399e633 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl @@ -0,0 +1,31 @@ +<#import "source_set_selector.ftl" as source_set_selector> +<#macro display> + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl new file mode 100644 index 00000000..7cab4582 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/page_metadata.ftl @@ -0,0 +1,6 @@ +<#macro display> + ${pageName} + <@template_cmd name="pathToRoot"> + + + diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl new file mode 100644 index 00000000..2d848071 --- /dev/null +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/source_set_selector.ftl @@ -0,0 +1,9 @@ +<#macro display> + <#if sourceSets?has_content> +
+ <#list sourceSets as ss> + + +
+ + -- cgit