From c620ee6dc84113a6db3f3170f6355985b9f49999 Mon Sep 17 00:00:00 2001 From: Huy Tran Date: Mon, 13 Aug 2018 08:49:30 +0700 Subject: [PATCH] revises tags and categories styles -- with badges --- layouts/partials/page-single/post-meta.html | 4 +-- static-src/scss/hyde-hyde.scss | 1 + static-src/scss/hyde-hyde/_taxonomies.scss | 40 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 static-src/scss/hyde-hyde/_taxonomies.scss diff --git a/layouts/partials/page-single/post-meta.html b/layouts/partials/page-single/post-meta.html index 983d470..5f67790 100644 --- a/layouts/partials/page-single/post-meta.html +++ b/layouts/partials/page-single/post-meta.html @@ -11,7 +11,7 @@ in {{ $total := sub $total 1 }} {{ range $i, $cat := sort . }} - {{ $cat | upper }} + {{ $cat | upper }} {{ if lt $i $total }}•{{ end }} {{ end }} {{ end }} @@ -23,7 +23,7 @@
{{ $subtotal := sub $total 1 }} {{ range $i, $tag := . }} - {{ $tag | lower }} + {{ $tag | lower }} {{ if lt $i $subtotal }} {{ end }} {{ end }} {{ end }} diff --git a/static-src/scss/hyde-hyde.scss b/static-src/scss/hyde-hyde.scss index bc7336e..2ecbc78 100644 --- a/static-src/scss/hyde-hyde.scss +++ b/static-src/scss/hyde-hyde.scss @@ -11,6 +11,7 @@ @import 'hyde-hyde/post'; @import 'hyde-hyde/code'; @import 'hyde-hyde/gist'; +@import 'hyde-hyde/taxonomies'; @import 'hyde-hyde/project'; @import 'hyde-hyde/responsive'; @import 'hyde-hyde/misc'; diff --git a/static-src/scss/hyde-hyde/_taxonomies.scss b/static-src/scss/hyde-hyde/_taxonomies.scss new file mode 100644 index 0000000..ac6a6f6 --- /dev/null +++ b/static-src/scss/hyde-hyde/_taxonomies.scss @@ -0,0 +1,40 @@ +.badge-category, +a.badge-category { + color: #fff !important; + background-color: #0088cc; +} + +a.badge-category { + &:hover, &:focus { + color: #0088cc !important; + background: transparent; + background-color: transparent; + text-decoration: none; + border-bottom: none; + } +} + +.badge-tag, +a.badge-tag { + color: #fff !important; + background-color: #7766cc; + &:hover, &:focus { + color: #7766cc !important; + background: transparent; + background-color: transparent; + text-decoration: none; + border-bottom: none; + } +} + +.badge { + display: inline-block; + padding: 0.25em 0.4em; + font-size: 0.75rem; + font-weight: bold; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25rem; +}