From 667b675aa3000b4b1be7b496b00447b534fc9d35 Mon Sep 17 00:00:00 2001 From: Simon C Date: Tue, 12 Mar 2024 10:46:33 +0100 Subject: [PATCH] feat: Add icon on sidebar menu --- assets/scss/common/_custom.scss | 16 ++++++++++++++++ .../partials/sidebar/render-section-menu.html | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/assets/scss/common/_custom.scss b/assets/scss/common/_custom.scss index cc4e2b5..71c69d7 100644 --- a/assets/scss/common/_custom.scss +++ b/assets/scss/common/_custom.scss @@ -1 +1,17 @@ // Put your custom SCSS code here +.docs-links { + overflow-y: inherit!important; + svg { + height: 24px!important; + width: 24px!important; + margin-bottom: 0!important; + } + .with-icon { + position: relative; + + svg { + position: absolute; + left: calc(-24px - 1rem); + } + } +} diff --git a/portails/shared/layouts/partials/sidebar/render-section-menu.html b/portails/shared/layouts/partials/sidebar/render-section-menu.html index 89b84f9..b78e6bb 100644 --- a/portails/shared/layouts/partials/sidebar/render-section-menu.html +++ b/portails/shared/layouts/partials/sidebar/render-section-menu.html @@ -88,7 +88,10 @@ skipped. To override this behavior, set $skipHome to false below.
  • {{- with $node.Page.Pages }} - {{ $linkContent }} + + {{ if $node.Page.Params.icon }}{{- partial "inline-svg" $node.Page.Params.icon -}}{{ end }} + {{ $linkContent }} +
      {{- range . }} {{- template "walk" (dict "node" . "currentPage" $currentPage) }}