From 24aa269da26ffb3617f5ac99f57db1b45ff6cd2f Mon Sep 17 00:00:00 2001 From: Mykola Fant Date: Mon, 8 Jul 2024 16:07:21 +0300 Subject: [PATCH] DOC-85: title links css (#217) - style card-title links. You can use them like ```

Hazelcast Platform

``` - buttons get hidden for low-height screens ![image](https://github.com/hazelcast/hazelcast-docs-ui/assets/13898415/ab6aba52-8389-4f7e-94e8-504e9e4408e2) ![image](https://github.com/hazelcast/hazelcast-docs-ui/assets/13898415/b0cbfb53-7088-4faf-ab6c-6ea035e63814) - ![image](https://github.com/hazelcast/hazelcast-docs-ui/assets/13898415/35f9630a-5e20-406d-b437-ed66ab25aff8) --------- Co-authored-by: Oliver Howell --- src/css/feedback.css | 13 ++++++++++++- src/css/home.css | 5 +++++ src/css/search.css | 1 + src/css/toc.css | 9 ++++----- src/css/vars.css | 4 +++- src/partials/body-home.hbs | 18 +++++++++--------- src/partials/feedback-footer.hbs | 4 +++- src/partials/toc.hbs | 9 +++++---- 8 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/css/feedback.css b/src/css/feedback.css index 22467145..52870e4d 100644 --- a/src/css/feedback.css +++ b/src/css/feedback.css @@ -1,11 +1,22 @@ /* Feedback question and buttons */ .feedback-prompt { - width: 100%; + width: var(--toc-width); font-family: var(--body-font-family); color: var(--nav-muted-color); display: flex; flex-direction: column; + position: sticky; + top: calc(var(--toc-top) + var(--toc-height)); + margin-left: 5em; + margin-right: var(--toc-margin-right); + z-index: 999; +} + +@media screen and (max-height: 670px) { + .feedback-prompt { + display: none; + } } .feedback-prompt .hidden { diff --git a/src/css/home.css b/src/css/home.css index 1c5200b9..6b63a86d 100644 --- a/src/css/home.css +++ b/src/css/home.css @@ -137,6 +137,11 @@ text-align: center; } +.home .card-title a { + color: inherit !important; + text-decoration: none !important; +} + @media (min-width: 480px) { .home .card { flex-basis: calc(50% - calc(var(--cards-gap) * 1 / 2)); diff --git a/src/css/search.css b/src/css/search.css index a1aab236..dbafc2bc 100644 --- a/src/css/search.css +++ b/src/css/search.css @@ -1,5 +1,6 @@ .DocSearch-Container { z-index: 10000 !important; + position: fixed !important; } .DocSearch-Button-Keys { diff --git a/src/css/toc.css b/src/css/toc.css index e68cdeb7..0e05d061 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -1,15 +1,14 @@ .toc-menu { color: var(--toc-font-color); - margin-bottom: 50px; } .toc.sidebar { display: none; - margin-right: 0.75rem; position: sticky; top: var(--toc-top); align-self: flex-start; margin-left: 5em; + margin-right: var(--toc-margin-right); } .toc .toc-menu ul { @@ -18,7 +17,7 @@ list-style: none; margin: 0; padding: 0; - max-height: var(--toc-height); + max-height: var(--toc-content-height); overflow-y: auto; scrollbar-width: none; } @@ -35,9 +34,9 @@ .toc.sidebar { display: block; flex: 0 0 var(--toc-width); - min-width: 200px; + min-width: 222px; overflow-y: auto; - height: 500px; + height: var(--toc-height); overflow-x: hidden; } diff --git a/src/css/vars.css b/src/css/vars.css index 75b7601a..c2e455ff 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -149,8 +149,10 @@ --nav-panel-height--desktop: calc(var(--nav-height--desktop) - var(--drawer-height)); --nav-width: calc(270 / var(--rem-base) * 1rem); --toc-top: calc(var(--body-top) + var(--toolbar-height)); - --toc-height: calc(100vh - var(--toc-top) - 2.5rem); + --toc-content-height: calc(100vh - var(--toc-top) - 2.5rem); --toc-width: 14rem; + --toc-height: 400px; + --toc-margin-right: 0.75rem; --doc-max-width: calc(720 / var(--rem-base) * 1rem); --doc-max-width--desktop: calc(1500 / var(--rem-base) * 1rem); --border-radius: 5px; diff --git a/src/partials/body-home.hbs b/src/partials/body-home.hbs index 7162dc91..b7849846 100644 --- a/src/partials/body-home.hbs +++ b/src/partials/body-home.hbs @@ -35,7 +35,7 @@
-

Hazelcast Platform

+

Hazelcast Platform