From 7f314ceecd2df405950419f6cc2ca2dc18d23cd4 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Tue, 6 Nov 2018 16:07:46 +0800 Subject: refactor(terms): remove tags and categories class --- src/css/_partial/_categories.scss | 43 ------------------------------ src/css/_partial/_post/_admonition.scss | 2 -- src/css/_partial/_tags.scss | 46 --------------------------------- src/css/_partial/_terms.scss | 46 +++++++++++++++++++++++++++++++++ src/css/_variables.scss | 30 +++++++-------------- src/css/style.scss | 3 +-- 6 files changed, 56 insertions(+), 114 deletions(-) delete mode 100644 src/css/_partial/_categories.scss delete mode 100644 src/css/_partial/_tags.scss create mode 100644 src/css/_partial/_terms.scss (limited to 'src') diff --git a/src/css/_partial/_categories.scss b/src/css/_partial/_categories.scss deleted file mode 100644 index f9c413d..0000000 --- a/src/css/_partial/_categories.scss +++ /dev/null @@ -1,43 +0,0 @@ - -.categories { - margin: 2em 0 3em; - text-align: center; - font-family: $global-serif-font-family; - - .categories-title { - display: inline-block; - font-size: $categories-title-size; - color: $theme-color; - border-bottom: $categories-title-border-bottom; - } - - .categories-tags { - margin: 10px 0; - - .category-link { - display: inline-block; - position: relative; - margin: $categories-tags-link-margin; - word-wrap: break-word; - transition-duration: 0.2s; - transition-property: transform; - transition-timing-function: ease-out; - - .category-count { - display: inline-block; - position: relative; - top: -8px; - right: -2px; - color: $theme-color; - font-size: $category-count-font-size; - } - - &:active, - &:focus, - &:hover { - color: $theme-color; - transform: scale(1.1); - } - } - } -} \ No newline at end of file diff --git a/src/css/_partial/_post/_admonition.scss b/src/css/_partial/_post/_admonition.scss index 99fdc5e..75444d6 100644 --- a/src/css/_partial/_post/_admonition.scss +++ b/src/css/_partial/_post/_admonition.scss @@ -1,5 +1,3 @@ -@import "../../iconfont"; - .admonition { box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12), diff --git a/src/css/_partial/_tags.scss b/src/css/_partial/_tags.scss deleted file mode 100644 index e32a90e..0000000 --- a/src/css/_partial/_tags.scss +++ /dev/null @@ -1,46 +0,0 @@ -// ============================== -// Tags -// ============================= - -.tag-cloud { - margin: 2em 0 3em; - text-align: center; - font-family: $global-serif-font-family; - - .tag-cloud-title { - display: inline-block; - font-size: $tag-cloud-title-size; - color: $theme-color; - border-bottom: $tag-cloud-title-border-bottom; - } - - .tag-cloud-tags { - margin: 10px 0; - - a { - display: inline-block; - position: relative; - margin: $tag-cloud-tags-link-margin; - word-wrap: break-word; - transition-duration: 0.2s; - transition-property: transform; - transition-timing-function: ease-out; - - .tag-count { - display: inline-block; - position: relative; - top: -8px; - right: -2px; - color: $theme-color; - font-size: $category-count-font-size; - } - - &:active, - &:focus, - &:hover { - color: $theme-color; - transform: scale(1.1); - } - } - } -} \ No newline at end of file diff --git a/src/css/_partial/_terms.scss b/src/css/_partial/_terms.scss new file mode 100644 index 0000000..f498ffe --- /dev/null +++ b/src/css/_partial/_terms.scss @@ -0,0 +1,46 @@ +// ============================== +// General Terms(tags, categories, etc.) +// ============================= + +.terms { + margin: 2em 0 3em; + text-align: center; + font-family: $global-serif-font-family; + + .terms-title { + display: inline-block; + font-size: $terms-title-size; + color: $theme-color; + border-bottom: $terms-title-border-bottom; + } + + .terms-tags { + margin: 10px 0; + + .terms-link { + display: inline-block; + position: relative; + margin: $terms-link-margin; + word-wrap: break-word; + transition-duration: 0.2s; + transition-property: transform; + transition-timing-function: ease-out; + + .terms-count { + display: inline-block; + position: relative; + top: -8px; + right: -2px; + color: $theme-color; + font-size: $terms-count-font-size; + } + + &:active, + &:focus, + &:hover { + color: $theme-color; + transform: scale(1.1); + } + } + } +} \ No newline at end of file diff --git a/src/css/_variables.scss b/src/css/_variables.scss index 9b7c166..c9d9765 100644 --- a/src/css/_variables.scss +++ b/src/css/_variables.scss @@ -312,27 +312,15 @@ $archive-post-hover-transition: 0.2s ease-out !default; // Transform of the archive post when hover it. $archive-post-hover-transform: translateX(4px) !default; +// ========== General Terms ========== // +// Font size of the terms title. +$terms-title-size: 18px !default; -// ========== Tags ========== // -// Font soze of the tag cloud title. -$tag-cloud-title-size: 18px !default; +// Border bottom of the terms title. +$terms-title-border-bottom: 2px solid $theme-color !default; -// Border bottom of the tag cloud title. -$tag-cloud-title-border-bottom: 2px solid $theme-color !default; +// Margin of the terms link. +$terms-link-margin: 5px 10px !default; -// Margin of the tag cloud tags link. -$tag-cloud-tags-link-margin: 5px 10px !default; - - -// ========== Categories ========== // -// Font soze of the categories title. -$categories-title-size: 18px !default; - -// Border bottom of the categories title. -$categories-title-border-bottom: 2px solid $theme-color !default; - -// Margin of the categories tags link. -$categories-tags-link-margin: 5px 10px !default; - -// Font size of the category count -$category-count-font-size: 12px !default; +// Font size of the terms count +$terms-count-font-size: 12px !default; diff --git a/src/css/style.scss b/src/css/style.scss index 50fcf7a..5bdac04 100644 --- a/src/css/style.scss +++ b/src/css/style.scss @@ -11,8 +11,7 @@ @import "_partial/pagination"; @import "_partial/footer"; @import "_partial/archive"; -@import "_partial/tags"; -@import "_partial/categories"; +@import "_partial/terms"; @import "_partial/slideout"; @import "_partial/mobile"; @import "_partial/back-to-top"; -- cgit v1.2.3