From 3ea1ee104bcb1ecf5eb229ff77633bdf80a2cbad Mon Sep 17 00:00:00 2001 From: Sangwon Lee Date: Sun, 17 Sep 2023 13:47:23 +0900 Subject: [PATCH] Design: navigation post counter --- _includes/navigation.html | 16 +++++++++--- _sass/include/_navigation.scss | 45 ++++++++++++++++++++++++---------- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/_includes/navigation.html b/_includes/navigation.html index b8820f7..fcd2cdd 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -37,7 +37,9 @@ {% assign categories = site.category | sort: "order" %} @@ -46,12 +48,18 @@ {% else %} {% endif %} {% endfor %} @@ -59,6 +67,8 @@ {% include octicons/tag.html %} All Tags + + {{ site.tags | size }} diff --git a/_sass/include/_navigation.scss b/_sass/include/_navigation.scss index e1d5ff6..5b3ec22 100644 --- a/_sass/include/_navigation.scss +++ b/_sass/include/_navigation.scss @@ -99,12 +99,12 @@ nav { } svg { - @include icon-size(0.8rem, rgba(117, 117, 117, .9)); + @include icon-size(0.8rem, #656d76); margin-right: 0.2rem; } span { - color: var(--text-color); + color: rgb(31, 35, 40); font-size: 0.8rem; } } @@ -133,44 +133,63 @@ nav { } a { - transition: background-color .3s ease-in-out; + display: flex; + align-items: center; + height: 2rem; overflow: hidden; text-overflow: ellipsis; + transition: background-color .3s ease-in-out; + &:hover { background-color: var(--sidebar-hover-bg); } &.nav-link { - display: block; - padding: 0 0.75rem; border-radius: .75rem; color: rgba(117, 117, 117, .9); font-weight: 500; - * { - vertical-align: middle; - } - svg { @include icon-size(0.85rem, rgba(117, 117, 117, .9)); - margin-right: 0.3rem; + margin-right: 0.6rem; } span { font-size: 0.85rem; - line-height: 2rem; letter-spacing: .2px; } + + .dots { + margin: 0 0.5rem; + flex: 1; + border-top: 2px dotted var(--post-list-dash-color); + } + + .counter { + padding: 0 0.375rem; + + font-size: 0.75rem; + font-weight: normal; + line-height: 1.125rem; + + background-color: rgba(175, 184, 193, 0.2); + color: rgb(31, 35, 40); + + border-radius: 1.5rem; + } } &.subcategory { + height: 1.5rem; padding-left: 2.75rem; - font-size: 0.8rem; - font-weight: normal; + span { + font-size: 0.8rem; + font-weight: normal; + } } &.active {