From e8b0cfb32ef053eb4394fd41865e78a737918a81 Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Sat, 3 Feb 2024 00:31:03 +0600 Subject: [PATCH] Fix active menu on sidebar not getting highlighted in dark mode (#881) Signed-off-by: Emruz Hossain --- assets/styles/components/links.scss | 16 ++++++++++++++-- exampleSite/config.yaml | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/assets/styles/components/links.scss b/assets/styles/components/links.scss index 1dd63f86a..3b162e269 100644 --- a/assets/styles/components/links.scss +++ b/assets/styles/components/links.scss @@ -14,6 +14,7 @@ a { text-decoration: none !important; color: get-light-color('text-color'); @include transition(); + &.active { display: inline; color: get-light-color('accent-color'); @@ -29,6 +30,7 @@ a { a.header-anchor { text-decoration: none; color: get-light-color('heading-color'); + i, svg { font-size: 10pt; @@ -36,12 +38,15 @@ a.header-anchor { display: none; margin-left: 0.5rem; } + &:hover { + i, svg { display: inline-block; } } + code { color: get-light-color('inline-code-color'); } @@ -54,26 +59,33 @@ a.header-anchor { html[data-theme='dark'] { a { color: get-dark-color('accent-color'); + &:hover, &:focus { text-decoration: get-dark-color('hover-over-accent-color') underline; color: get-dark-color('hover-over-accent-color'); } } + .list-link { color: get-dark-color('text-color'); - &:hover { + + &:hover, + &.active { color: get-dark-color('accent-color'); } } + a.header-anchor { color: get-dark-color('heading-color'); + i, svg { color: get-dark-color('text-color'); } + code { color: get-dark-color('inline-code-color'); } } -} +} \ No newline at end of file diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 74db6cc9f..1db84ff64 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -98,6 +98,7 @@ params: # Enable and configure blog posts blog: enable: true + showAuthor: true # Share post on different social media shareButtons: facebook: true