From 19cf3e8af04ebaf1c4913502852ab980e829819b Mon Sep 17 00:00:00 2001 From: ArthurFlag Date: Fri, 30 May 2025 11:06:37 +0200 Subject: [PATCH 1/5] harmonize sidebar --- assets/css/global.css | 3 ++ assets/css/utilities.css | 13 ++++++- layouts/partials/sidebar/sections.html | 54 ++++++++++++++------------ 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/assets/css/global.css b/assets/css/global.css index e1d27a0b3227..bd7d62c1cbff 100644 --- a/assets/css/global.css +++ b/assets/css/global.css @@ -104,3 +104,6 @@ input[type="search"]::-ms-clear { list-style-type: lower-roman; } } +.navbar-group:first-of-type { + margin-top: 0.2rem !important; +} diff --git a/assets/css/utilities.css b/assets/css/utilities.css index 5bd521f8f195..9141f145f05a 100644 --- a/assets/css/utilities.css +++ b/assets/css/utilities.css @@ -118,9 +118,20 @@ } } +@utility navbar-entry-margin { + @apply px-2 py-1; +} + +@utility navbar-group { + @apply mt-5; +} + +@utility navbar-entry-background-current { + @apply bg-gray-100 dark:bg-gray-900; +} @utility navbar-group-font-title { font-size: var(--color-navbar-group-font-title-size); - @apply font-semibold uppercase; + @apply pb-1.5 font-semibold uppercase; color: var(--color-navbar-text); .dark & { color: var(--color-navbar-text-dark); diff --git a/layouts/partials/sidebar/sections.html b/layouts/partials/sidebar/sections.html index db2b971ae5ee..ff7b3cb0eca4 100644 --- a/layouts/partials/sidebar/sections.html +++ b/layouts/partials/sidebar/sections.html @@ -32,32 +32,36 @@ {{- end }} {{- range .Params.sidebar.groups }} - - {{- range where $pages "Params.sidebar.group" . }} - {{- if .IsSection }} - {{- template "renderList" . }} - {{- else }} - {{- template "renderSingle" . }} + {{- end }} + {{ end }} {{/* Recursive template for sidebar items */}} {{ define "renderList" }} {{ $isCurrent := eq page . }} {{ $expanded := or $isCurrent (page.IsDescendant .) }} -
  • +
  • From 07a9c0d046628b202941335140980cd476615bca Mon Sep 17 00:00:00 2001 From: ArthurFlag Date: Fri, 30 May 2025 11:41:20 +0200 Subject: [PATCH 3/5] remove duplicated button --- layouts/guides/single.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/layouts/guides/single.html b/layouts/guides/single.html index 4cc1d8489ffe..27940dee77fa 100644 --- a/layouts/guides/single.html +++ b/layouts/guides/single.html @@ -6,9 +6,6 @@ {{ define "main" }} {{ partial "content-default.html" . }}
    - {{ if (.Store.Get "multipage") }} {{- with .PrevInSection }}