From 257728c5dd9881ff0fb677724ae6e88e92c3ee6e Mon Sep 17 00:00:00 2001 From: lensferno Date: Sun, 25 Jun 2023 09:43:46 +0800 Subject: [PATCH] 2 --- layout/includes/_partials/information_card.pug | 5 +++++ layout/includes/_partials/titled_card.pug | 7 +++++++ layout/index.pug | 2 +- source/css/_partials/button.styl | 11 +++++------ source/css/_partials/titled_card.styl | 9 +++++++++ source/css/common.styl | 4 ++++ 6 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 layout/includes/_partials/information_card.pug create mode 100644 layout/includes/_partials/titled_card.pug create mode 100644 source/css/_partials/titled_card.styl diff --git a/layout/includes/_partials/information_card.pug b/layout/includes/_partials/information_card.pug new file mode 100644 index 0000000..835666a --- /dev/null +++ b/layout/includes/_partials/information_card.pug @@ -0,0 +1,5 @@ +include titled_card.pug + ++create_card("Information - 信息") + div 这是我 + div 随便写的文章 \ No newline at end of file diff --git a/layout/includes/_partials/titled_card.pug b/layout/includes/_partials/titled_card.pug new file mode 100644 index 0000000..d0800a1 --- /dev/null +++ b/layout/includes/_partials/titled_card.pug @@ -0,0 +1,7 @@ +mixin create_card(title) + .titled-block-compoment + .titled-block-container + .title-box + = title + .block-content + block \ No newline at end of file diff --git a/layout/index.pug b/layout/index.pug index 4d1bb48..42ead58 100644 --- a/layout/index.pug +++ b/layout/index.pug @@ -1,4 +1,4 @@ extends includes/layout.pug block content - + include includes/_partials/information_card.pug diff --git a/source/css/_partials/button.styl b/source/css/_partials/button.styl index 46d63bc..a1dfc07 100644 --- a/source/css/_partials/button.styl +++ b/source/css/_partials/button.styl @@ -3,7 +3,6 @@ .button-container a.active background-position: -100% center; - padding-bottom: 1.75rem; color: rgb(180, 175, 154) !important; &:hover::before content: none !important; @@ -16,9 +15,9 @@ text-decoration: none; display: flex; flex-direction: column; - color: rgb(87, 84, 74); + color: rgb(74, 71, 62); align-items: flex-start; - background-image: linear-gradient(90deg, rgb(180, 175, 154) 50%, rgb(180, 175, 154) 50%, rgb(87, 84, 74) 50%, rgb(87, 84, 74) 100%); + background-image: linear-gradient(90deg, rgb(180, 175, 154) 50%, rgb(180, 175, 154) 50%, rgb(74, 71, 62) 50%, rgb(74, 71, 62) 100%); background-size: 200%; transition: all 0.2s linear 0s; cursor: default; @@ -28,7 +27,7 @@ // line over the button &::before - background-color: rgb(87, 84, 74); + background-color: rgb(74, 71, 62); transition: all 0.2s ease 0s; &:hover::before height: 2px; @@ -40,7 +39,7 @@ // line under the button &::after - background-color: rgb(87, 84, 74); + background-color: rgb(74, 71, 62); transition: all 0.2s ease 0s; &:hover::after height: 2px; @@ -66,7 +65,7 @@ height: 5%; min-width: 20px; min-height: 20px; - background-image: linear-gradient(90deg, rgb(87, 84, 74) 50%, rgb(87, 84, 74) 50%, rgb(218, 212, 187) 50%, rgb(218, 212, 187) 100%); + background-image: linear-gradient(90deg, rgb(74, 71, 62) 50%, rgb(74, 71, 62) 50%, rgb(218, 212, 187) 50%, rgb(218, 212, 187) 100%); background-size: 200%; transition: all 0.1s linear 0s; diff --git a/source/css/_partials/titled_card.styl b/source/css/_partials/titled_card.styl new file mode 100644 index 0000000..073120a --- /dev/null +++ b/source/css/_partials/titled_card.styl @@ -0,0 +1,9 @@ +.titled-block-container + background-color: rgb(231, 225, 199); + .title-box + background-color: rgb(74, 71, 62); + color: rgb(231, 225, 199); + padding: 0.5% 1%; + .block-content + padding: 0.5% 1%; + color: rgb(74, 71, 62); \ No newline at end of file diff --git a/source/css/common.styl b/source/css/common.styl index 0a96419..9f5db1f 100644 --- a/source/css/common.styl +++ b/source/css/common.styl @@ -11,6 +11,9 @@ body #container padding: 1.5% 2% 2% 2% +#main + margin-top: 0.5% + .bottom-declaration // container左右各有2%的padding // 要突破这个container,所以要先往左边拉2%,然后width+=2%*2,也就是104% @@ -25,6 +28,7 @@ body background-size: 100px 4px; width: 100%; height: 4px; + margin: 0 -2% 0; * box-sizing: border-box