diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/go-to-top-icon.svg b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/go-to-top-icon.svg new file mode 100644 index 0000000000..62df4c7d57 --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/go-to-top-icon.svg @@ -0,0 +1,4 @@ + diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/index.ts b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/index.ts new file mode 100644 index 0000000000..ba170bf3d6 --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/index.ts @@ -0,0 +1,4 @@ +/* + * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ +import './styles.scss'; diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/styles.scss b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/styles.scss new file mode 100644 index 0000000000..9cf0612b56 --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/styles.scss @@ -0,0 +1,10 @@ +/*! + * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ +@import '../_tokens/index'; + +.footer { + &--button_go-to-top { + background-image: url('../_assets/go-to-top-icon.svg'); + } +} diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/index.ts b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/index.ts index 6903ab8045..cb4940644a 100644 --- a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/index.ts +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/index.ts @@ -5,6 +5,7 @@ import * as button from './button/index'; import * as checkbox from './checkbox/index'; import * as dropdown from './dropdown/index'; import * as filterSection from './filter-section/index'; +import * as footer from './footer/index'; import * as icon from './icon/index'; import * as libraryName from './library-name/index'; import * as libraryVersion from './library-version/index'; @@ -23,6 +24,7 @@ export { checkbox, dropdown, filterSection, + footer, icon, libraryName, libraryVersion, diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/styles.scss b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/styles.scss index 3456840cae..8126f2aafb 100644 --- a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/styles.scss +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/styles.scss @@ -85,3 +85,7 @@ background-image: url('../_assets/burger.svg'); } + +.navigation-controls--btn_go-to-top { + background-image: url('../_assets/go-to-top-icon.svg'); +} diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt index 80807de60a..a50e60d8f1 100644 --- a/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt +++ b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/htmlPreprocessors.kt @@ -116,6 +116,7 @@ public object AssetsInstaller : PageTransformer { "ui-kit/assets/class-kotlin.svg", "ui-kit/assets/class.svg", "ui-kit/assets/cross.svg", + "ui-kit/assets/go-to-top-icon.svg", "ui-kit/assets/enum-kotlin.svg", "ui-kit/assets/enum.svg", "ui-kit/assets/exception-class.svg", @@ -136,7 +137,6 @@ public object AssetsInstaller : PageTransformer { "images/copy-icon.svg", "images/copy-successful-icon.svg", "images/footer-go-to-link.svg", - "images/go-to-top-icon.svg", "images/logo-icon.svg", ) 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 deleted file mode 100644 index 2341ef26c6..0000000000 --- a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/go-to-top-icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - 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 index 496ffbf904..52df17d453 100644 --- 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 @@ -1,6 +1,6 @@ <#macro display>
=0)){var i=self.location.search.toLowerCase(),c=-1===i.indexOf("webpack-dev-server-hot=false"),s=-1===i.indexOf("webpack-dev-server-live-reload=false");if(t&&c)l.Rm.info("App hot update..."),N().emit("webpackHotUpdate",r.currentHash),"undefined"!=typeof self&&self.window&&self.postMessage("webpackHotUpdate".concat(r.currentHash),"*");else if(o&&s)var u=self,d=self.setInterval((function(){("about:"!==u.location.protocol||(u=u.parent).parent===u)&&function(e,r){clearInterval(r),l.Rm.info("App updated. Reloading..."),e.location.reload()}(u,d)}))}}};function P(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}var F=function(e){"object"==typeof e&&["warnings","errors","runtimeErrors"].forEach((function(r){if("string"==typeof e[r]){var t=decodeURIComponent(e[r]),o=new Function("message","var callback = ".concat(t,"\n return callback(message)"));e[r]=o}}))},H={isUnloading:!1,currentHash:t.h()},_={hot:!1,liveReload:!1,progress:!1,overlay:!1},B=function(e){var r={};if("string"==typeof e&&""!==e)for(var t=e.slice(1).split("&"),o=0;o