diff --git a/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/external-link.svg b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/external-link.svg new file mode 100644 index 0000000000..ee7ab30cad --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/_assets/external-link.svg @@ -0,0 +1,3 @@ + + + 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..c342a16f1e --- /dev/null +++ b/dokka-subprojects/plugin-base-frontend/src/main/ui-kit/footer/styles.scss @@ -0,0 +1,77 @@ +/*! + * Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ +@import '../_tokens/index'; + +.footer { + position: relative; + + display: flex; + clear: both; + align-items: center; + + min-height: var(--footer-height); + margin-top: auto; + + padding: 0 var(--size-m3); + + letter-spacing: 0.2px; + + color: var(--footer-font-color); + background-color: var(--footer-background); + + font-size: 12px; + line-height: 16px; + + &--button_go-to-top { + background-image: url('../_assets/go-to-top-icon.svg'); + } + + &--button { + display: flex; + align-items: center; + justify-content: center; + + width: 40px; + height: 40px; + padding: 0; + + cursor: pointer; + transition: background-color 200ms ease-in-out; + + border: none; + border-radius: 50%; + background-color: var(--footer-go-to-top-color); + background-repeat: no-repeat; + background-position: 50% 50%; + + font-size: 0; + line-height: 0; + will-change: background-color; + } + + &--button:hover { + opacity: 0.9; + } + + &--link { + display: inline-flex; + align-items: center; + + color: var(--breadcrumb-font-color); + } + + &--link_external::after { + width: 12px; + height: 12px; + margin-right: var(--horizontal-spacing-for-content); + margin-left: 4px; + + content: ''; + + background-image: url('../_assets/external-link.svg'); + + background-repeat: no-repeat; + background-position: 50% 50%; + } +} 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..5a862f979d 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 @@ -119,10 +119,12 @@ public object AssetsInstaller : PageTransformer { "ui-kit/assets/enum-kotlin.svg", "ui-kit/assets/enum.svg", "ui-kit/assets/exception-class.svg", + "ui-kit/assets/external-link.svg", "ui-kit/assets/field-value.svg", "ui-kit/assets/field-variable.svg", "ui-kit/assets/filter.svg", "ui-kit/assets/function.svg", + "ui-kit/assets/go-to-top-icon.svg", "ui-kit/assets/homepage.svg", "ui-kit/assets/interface-kotlin.svg", "ui-kit/assets/interface.svg", @@ -135,8 +137,6 @@ public object AssetsInstaller : PageTransformer { "images/anchor-copy-button.svg", "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/footer-go-to-link.svg b/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg deleted file mode 100644 index c3199535a2..0000000000 --- a/dokka-subprojects/plugin-base/src/main/resources/dokka/images/footer-go-to-link.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - 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/styles/style.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css index c64fa37161..a541e97757 100644 --- a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css @@ -872,66 +872,3 @@ Just in case of possible performance degradation it excluding tabs with briefs o 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--button { - display: flex; - align-items: center; - justify-content: center; - width: 40px; - height: 40px; - border-radius: 50%; - background-color: var(--footer-go-to-top-color); - background-repeat: no-repeat; - background-position: 50% 50%; - padding: 0; - border: none; - cursor: pointer; - font-size: 0; - line-height: 0; - transition: background-color 200ms ease-in-out; - will-change: background-color; -} - -.footer--button:hover { - opacity: 0.9; -} - -.footer--button_go-to-top { - background-image: url("../images/go-to-top-icon.svg"); - margin-left: var(--horizontal-spacing-for-content); - margin-right: 8px; -} - -.footer--link { - display: inline-flex; - align-items: center; - color: var(--breadcrumb-font-color); -} - -.footer--link_external:after { - content: ''; - width: 12px; - height: 12px; - margin-left: 4px; - margin-right: var(--horizontal-spacing-for-content); - background-image: url("../images/footer-go-to-link.svg"); - background-repeat: no-repeat; - background-position: 50% 50%; -} - -/* /--- footer --- */ 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>