From 64cce58f73f908909ba60da6005d7abb2572b2f0 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Tue, 7 Nov 2023 15:27:34 +0200 Subject: Add the link to GitHub repo to the header if there are source links defined (#3235) * Use URL from base plugin configuration * Add integration test for the multi-module project that the homepage link exists everywhere --- .../src/main/resources/dokka/images/homepage.svg | 5 ++++ .../base/src/main/resources/dokka/styles/style.css | 32 +++++++++++++++++++++- .../resources/dokka/templates/includes/header.ftl | 3 ++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 plugins/base/src/main/resources/dokka/images/homepage.svg (limited to 'plugins/base/src/main/resources') diff --git a/plugins/base/src/main/resources/dokka/images/homepage.svg b/plugins/base/src/main/resources/dokka/images/homepage.svg new file mode 100644 index 00000000..a3d7602b --- /dev/null +++ b/plugins/base/src/main/resources/dokka/images/homepage.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css index 67a899a5..62b0ddbd 100644 --- a/plugins/base/src/main/resources/dokka/styles/style.css +++ b/plugins/base/src/main/resources/dokka/styles/style.css @@ -342,6 +342,7 @@ td:first-child { /* --- Navigation controls --- */ .navigation-controls { display: flex; + margin-left: 4px; } @media (min-width: 760px) { @@ -365,7 +366,6 @@ td:first-child { display: block; border-radius: 50%; background-color: inherit; - margin-left: 4px; padding: 0; border: none; cursor: pointer; @@ -394,6 +394,36 @@ td:first-child { } /* /--- 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; } diff --git a/plugins/base/src/main/resources/dokka/templates/includes/header.ftl b/plugins/base/src/main/resources/dokka/templates/includes/header.ftl index d5c7a613..d399e633 100644 --- a/plugins/base/src/main/resources/dokka/templates/includes/header.ftl +++ b/plugins/base/src/main/resources/dokka/templates/includes/header.ftl @@ -21,6 +21,9 @@ <@source_set_selector.display/> -- cgit