From b601113ed2ab0cc0d8bfc4bded7c2a5b90cc2394 Mon Sep 17 00:00:00 2001 From: vrifox Date: Thu, 16 Mar 2023 18:59:31 +0100 Subject: [PATCH] use icons instead of text; closes #6 --- assets/icons/blog.svg | 1 + assets/icons/home.svg | 10 ++++ assets/scss/partials/sidebar.scss | 78 ++++++++++++++++++------------- layouts/partials/sidebar.html | 10 ++-- 4 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 assets/icons/blog.svg create mode 100644 assets/icons/home.svg diff --git a/assets/icons/blog.svg b/assets/icons/blog.svg new file mode 100644 index 0000000..c966f12 --- /dev/null +++ b/assets/icons/blog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/home.svg b/assets/icons/home.svg new file mode 100644 index 0000000..5449cb4 --- /dev/null +++ b/assets/icons/home.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/assets/scss/partials/sidebar.scss b/assets/scss/partials/sidebar.scss index ca53cff..e046183 100644 --- a/assets/scss/partials/sidebar.scss +++ b/assets/scss/partials/sidebar.scss @@ -28,40 +28,42 @@ background-color: transparent; } - a.hint-text { - position: relative; + a { + &.hint-text { + position: relative; - &::before { - content: attr(data-title); - left: 100%; - position: absolute; - top: 50%; - transform: translateY(-50%); - background-color: var(--sidebar-accent-2); - color: var(--text-accent-900); - padding: 0.2rem 0.5rem; - border-radius: 0.5rem; - pointer-events: none; - opacity: 0%; - transition: opacity 0.3s ease-in-out; - } - &::after { - content: ""; - transform: translate(-100%, -50%); - border-left: 0.5rem solid transparent; - border-top: 0.5rem solid transparent; - border-bottom: 0.5rem solid transparent; - border-right: 0.7rem solid var(--sidebar-accent-2); - top: 50%; - position: absolute; - left: 100%; - pointer-events: none; - opacity: 0%; - transition: opacity 0.3s ease-in-out; - } - &:hover { - &::before, &::after { - opacity: 100%; + &::before { + content: attr(data-title); + left: 100%; + position: absolute; + top: 50%; + transform: translateY(-50%); + background-color: var(--sidebar-accent-2); + color: var(--text-accent-900); + padding: 0.2rem 0.5rem; + border-radius: 0.5rem; + pointer-events: none; + opacity: 0%; + transition: opacity 0.3s ease-in-out; + } + &::after { + content: ""; + transform: translate(-100%, -50%); + border-left: 0.5rem solid transparent; + border-top: 0.5rem solid transparent; + border-bottom: 0.5rem solid transparent; + border-right: 0.7rem solid var(--sidebar-accent-2); + top: 50%; + position: absolute; + left: 100%; + pointer-events: none; + opacity: 0%; + transition: opacity 0.3s ease-in-out; + } + &:hover { + &::before, &::after { + opacity: 100%; + } } } } @@ -172,6 +174,16 @@ } a { text-decoration: none; + display: flex; + place-content: center; + + svg { + height: 3rem; + width: 3rem; + fill: transparent; + stroke: var(--text-accent-300); + stroke-width: 20px; + } } } aside { diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 7a47ef5..77512df 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -11,11 +11,11 @@