diff --git a/source/css/_common/base.styl b/source/css/_common/base.styl index 4b2ef98..0152590 100644 --- a/source/css/_common/base.styl +++ b/source/css/_common/base.styl @@ -25,7 +25,7 @@ img li - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) @@ -41,7 +41,7 @@ table:not([class]) margin: 1rem 0 max-width: 100% vertical-align: text-top - --fsp: var(--fsp2) + --fsp: $fsp2 font-size: var(--fsp) th background: var(--block) diff --git a/source/css/_common/title.styl b/source/css/_common/title.styl index a76183e..78c780f 100644 --- a/source/css/_common/title.styl +++ b/source/css/_common/title.styl @@ -1,18 +1,19 @@ h1,.h1 - font-size: $fs-h1 + font-size: var(--fsh2) font-weight: 700 @media screen and (max-width: $device-mobile) - font-size: $fs-h1 + font-size: var(--fsh2) h2,.h2 - font-size: $fs-h2 + font-size: var(--fsh2) + margin-top: 1.5em h3,.h3 - font-size: $fs-h3 + font-size: var(--fsh3) h4,.h4 - font-size: $fs-h4 + font-size: var(--fsh4) h5 - font-size: $fs-h5 + font-size: 'calc(%s + 1px)' % var(--fsp) h6 - font-size: $fs-h6 + font-size: 'calc(%s + 0px)' % var(--fsp) // 次级段落字号 .fs15 diff --git a/source/css/_custom.styl b/source/css/_custom.styl index 73ad36b..4c8515c 100644 --- a/source/css/_custom.styl +++ b/source/css/_custom.styl @@ -44,16 +44,19 @@ $fs-14 = .875rem $fs-13 = .8125rem $fs-12 = .75rem -$fs-h1 = 2rem // 32px -$fs-h2 = 1.75rem // 28px -$fs-h3 = 1.375rem // 22px -$fs-h4 = 1.125rem // 18px -$fs-h5 = $fs-15 -$fs-h6 = $fs-12 $fs-body = convert(hexo-config('style.font-size.body')) $fs-code = convert(hexo-config('style.font-size.code')) $fs-codeblock = convert(hexo-config('style.font-size.codeblock')) +$fsh1 = 'calc(%s + 11px)' % $fs-body +$fsh2 = 'calc(%s + 11px)' % $fs-body +$fsh3 = 'calc(%s + 7px)' % $fs-body +$fsh4 = 'calc(%s + 4px)' % $fs-body + +$fsp0 = 'calc(%s - 0px)' % $fs-body +$fsp1 = 'calc(%s - 1px)' % $fs-body +$fsp2 = 'calc(%s - 2px)' % $fs-body +$fsp3 = 'calc(%s - 3px)' % $fs-body $border-card = convert(hexo-config('style.border-radius.card')) $border-block = convert(hexo-config('style.border-radius.block')) @@ -65,11 +68,11 @@ $border-button = 4px :root --width-left: 288px --width-main: 720px - --fs-body: $fs-body - --fsp: var(--fs-body) - --fsp1: 'calc(%s - 1px)' % var(--fsp) - --fsp2: 'calc(%s - 2px)' % var(--fsp) - --fsp3: 'calc(%s - 3px)' % var(--fsp) + --fsp: $fs-body + --fsh2: 'calc(%s + 11px)' % var(--fsp) + --fsh3: 'calc(%s + 7px)' % var(--fsp) + --fsh4: 'calc(%s + 4px)' % var(--fsp) + --gap-l: 16px --gap-p: 'calc(%s + 4px)' % $fs-body // gap for paragraph --gap-p-compact: 'calc(%s * 0.75)' % $fs-body diff --git a/source/css/_layout/list.styl b/source/css/_layout/list.styl index 1c3409c..542ff40 100644 --- a/source/css/_layout/list.styl +++ b/source/css/_layout/list.styl @@ -9,12 +9,12 @@ font-weight: 500 margin: 1.25rem 0 .75rem 0 line-height: 1.2 - font-size: $fs-h3 + font-size: $fsh3 border-bottom: none color: var(--text) trans1 color @media screen and (max-width: $device-mobile) - font-size: $fs-h4 + font-size: $fsh4 margin: 0.5rem 0 .wiki .post-title margin-top: 0.5rem @@ -52,7 +52,7 @@ flex-wrap: wrap margin: 0 line-height: 2 - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) svg height: 1em @@ -127,18 +127,18 @@ color: unset .title font-weight: 500 - font-size: $fs-h3 + font-size: $fsh3 @media screen and (max-width: $device-mobile) padding: 1rem div+div margin-top: 2px .title - font-size: $fs-h4 + font-size: $fsh4 .cap font-size: $fs-12 h2 margin: .25rem 0 - font-size: $fs-h4 + font-size: $fsh4 // wiki diff --git a/source/css/_layout/md.styl b/source/css/_layout/md.styl index ecbcbcf..a40e266 100644 --- a/source/css/_layout/md.styl +++ b/source/css/_layout/md.styl @@ -22,13 +22,13 @@ .l_body[text-indent] .md-text.content >p text-indent: 'calc(%s * 2)' % var(--fsp) - text-align: convert(hexo-config('style.text-align')) + text-align: justify h1,h2,h3,h4,h5,h6 text-align: center a.headerlink display: none - >h2:not([class]) - border-bottom: none + h2 + margin: 2em 0 1.5em .md-text ul:not(:last-child), @@ -37,7 +37,7 @@ margin: 0 blockquote,ul,ol p,ul,ol - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) line-height: 1.5 code @@ -59,7 +59,6 @@ // titles .md-text.content h1,h2,h3,h4,h5,h6 - margin-bottom: var(--gap-p) color: var(--text) line-height: 1.8 blockquote, .tag-plugin @@ -81,17 +80,10 @@ padding: 0 2px font-size: $fs-12 h2 - margin-top: 'calc(%s + 1rem)' % var(--gap-p) - font-weight: 400 + font-weight: 500 a.headerlink:before content: ':' - h3 - margin-top: 'calc(%s + 0.75rem)' % var(--gap-p) - font-weight: 400 - h4,h5,h6 - margin-top: 'calc(%s + 0.5rem)' % var(--gap-p) - font-weight: 500 - + .md-text.content:first-child .tag-plugin:first-child margin-top: 0 diff --git a/source/css/_layout/partial/article-banner.styl b/source/css/_layout/partial/article-banner.styl index deae8b4..842be34 100644 --- a/source/css/_layout/partial/article-banner.styl +++ b/source/css/_layout/partial/article-banner.styl @@ -15,7 +15,7 @@ align-items: flex-start margin: 1rem 'calc(1rem - 4px)' .title - font-size: $fs-h1 + font-size: $fsh1 color: var(--text-banner) .bottom padding: 1.5rem 1rem @@ -23,7 +23,8 @@ line-height: 1.2 margin: 0 - +.l_body[text-indent] .article.banner .content .bottom + justify-content: center // 动画配置 diff --git a/source/css/_layout/partial/article-footer.styl b/source/css/_layout/partial/article-footer.styl index 264efd7..dce2569 100644 --- a/source/css/_layout/partial/article-footer.styl +++ b/source/css/_layout/partial/article-footer.styl @@ -9,9 +9,9 @@ .header font-weight: 500 color: var(--text-p2) - font-size: $fs-h4 + font-size: $fsh4 .body - --fsp: var(--fsp2) + --fsp: $fsp2 input.copy-area margin: 0.75rem 0 padding: 0 @@ -29,7 +29,7 @@ line-height: 1.2 word-break: break-all p - --fsp: var(--fsp2) + --fsp: $fsp2 a text-decoration: none color: unset diff --git a/source/css/_layout/partial/related.styl b/source/css/_layout/partial/related.styl index 6b21b51..558dc8e 100644 --- a/source/css/_layout/partial/related.styl +++ b/source/css/_layout/partial/related.styl @@ -31,7 +31,7 @@ article.md-text.content+.related-wrap .title color: var(--text-p1) font-weight: 500 - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) trans2 color border position: relative @@ -40,7 +40,7 @@ article.md-text.content+.related-wrap line-height: 1.6 .excerpt color: var(--text-p3) - --fsp: var(--fsp3) + --fsp: $fsp3 font-size: var(--fsp) margin-top: 0.5rem display: -webkit-box @@ -74,7 +74,7 @@ article.md-text.content+.related-wrap margin: 0 line-height: 1.2 color: var(--text-p1) - font-size: $fs-h4 + font-size: $fsh4 &:hover color: $color-hover !important #next @@ -82,7 +82,7 @@ article.md-text.content+.related-wrap .wiki+.related-wrap#read-next .item a - font-size: $fs-h3 + font-size: $fsh3 &#prev a color: var(--text-p3) diff --git a/source/css/_layout/sidebar/search.styl b/source/css/_layout/sidebar/search.styl index 140f1b9..85eb0ca 100644 --- a/source/css/_layout/sidebar/search.styl +++ b/source/css/_layout/sidebar/search.styl @@ -18,29 +18,31 @@ background: var(--alpha100) .search-input width: 100% - line-height: 16px box-sizing: border-box font-family: $ff-body - font-size: $fs-13 + font-size: $fs-14 padding: 12px 0 color: var(--text) .search-button border-radius: $border-bar - line-height: 40px - .search-icon - width: 44px - margin-left: 4px - color: var(--text-p2) - margin-bottom: 2px - path[p-id="1562"] - color: $color-theme + display: flex + align-items: center + height: 40px + svg + width: 44px + margin-left: 4px + color: var(--text-p2) + font-size: 16px + margin-top: 1px + path[p-id="1562"] + color: $color-theme &[searching='true'] - .search-icon + .search-button path[p-id="1562"] color: $c-green &.noresult[searching='true'] - .search-icon + .search-button path[p-id="1562"] color: $c-red diff --git a/source/css/_layout/tag-plugins/folders.styl b/source/css/_layout/tag-plugins/folders.styl index 3e4b27f..fcf9256 100644 --- a/source/css/_layout/tag-plugins/folders.styl +++ b/source/css/_layout/tag-plugins/folders.styl @@ -1,6 +1,6 @@ .tag-plugin.folders margin: var(--gap-p) 0 - --fsp: var(--fsp2) + --fsp: $fsp2 font-size: var(--fsp) border-top: 1px solid var(--block-border) overflow: hidden @@ -43,7 +43,7 @@ content: '-' >div.body - --fsp: var(--fsp1) + --fsp: $fsp1 >:first-child margin-top: 1rem >:last-child diff --git a/source/css/_layout/tag-plugins/folding.styl b/source/css/_layout/tag-plugins/folding.styl index 67c337c..635cf3f 100644 --- a/source/css/_layout/tag-plugins/folding.styl +++ b/source/css/_layout/tag-plugins/folding.styl @@ -11,7 +11,7 @@ details.folding margin: -1rem color: var(--text-p2) font-weight: 500 - --fsp: var(--fsp2) + --fsp: $fsp2 font-size: var(--fsp) position: relative line-height: 1.2 @@ -45,7 +45,7 @@ details.folding[open] padding: 0 1rem 1rem margin: 0 -1rem -1rem color: var(--text-p1) - --fsp: var(--fsp1) + --fsp: $fsp1 >:first-child margin-top: 1rem >:last-child diff --git a/source/css/_layout/tag-plugins/hashtag.styl b/source/css/_layout/tag-plugins/hashtag.styl index db597e6..f6e4605 100644 --- a/source/css/_layout/tag-plugins/hashtag.styl +++ b/source/css/_layout/tag-plugins/hashtag.styl @@ -6,7 +6,7 @@ margin: 2px 0 display: inline-flex align-items: center - --fsp: var(--fsp2) + --fsp: $fsp2 font-size: var(--fsp) font-weight: 500 trans2 background color diff --git a/source/css/_layout/tag-plugins/note.styl b/source/css/_layout/tag-plugins/note.styl index d330d23..f5f1cf4 100644 --- a/source/css/_layout/tag-plugins/note.styl +++ b/source/css/_layout/tag-plugins/note.styl @@ -8,7 +8,7 @@ border: 1px solid var(--theme-border) color: var(--text-p1) >.title - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) line-height: 1.5 margin-top: var(--gap-p-compact) @@ -16,7 +16,7 @@ color: var(--text) >.body &,p - --fsp: var(--fsp2) + --fsp: $fsp2 font-size: var(--fsp) line-height: 1.5 margin-top: var(--gap-p-compact) diff --git a/source/css/_layout/tag-plugins/poetry.styl b/source/css/_layout/tag-plugins/poetry.styl index fd79d2c..c856c47 100644 --- a/source/css/_layout/tag-plugins/poetry.styl +++ b/source/css/_layout/tag-plugins/poetry.styl @@ -8,7 +8,7 @@ margin-top: var(--gap-p) >.meta color: var(--text-p2) - --fsp: var(--fsp3) + --fsp: $fsp3 font-size: var(--fsp) font-weight: 500 span+span @@ -22,7 +22,7 @@ font-style: italic color: var(--text-p4) margin: var(--gap-p) 0 - --fsp: var(--fsp3) + --fsp: $fsp3 font-size: var(--fsp) // 描边修饰 diff --git a/source/css/_layout/tag-plugins/quot.styl b/source/css/_layout/tag-plugins/quot.styl index ca5ee2b..00c7935 100644 --- a/source/css/_layout/tag-plugins/quot.styl +++ b/source/css/_layout/tag-plugins/quot.styl @@ -3,17 +3,17 @@ align-items: center display: flex flex-direction: column - + --gap-p: 2rem .content display: flex align-items: center border-bottom: none font-weight: 700 - padding: 16px 24px + padding: 0 24px a.headerlink display: none @media screen and (max-width: $device-mobile) - padding: 12px 20px + padding: 0 20px line-height: 1.2 .md-text .tag-plugin.quot .content @@ -21,18 +21,16 @@ position: relative // override .md-text.content .tag-plugin.quot - h1 - font-size: $fs-h1 + h1,h2 + font-size: $fsh2 font-weight: 900 - padding: 20px 32px 12px 32px + padding: 4px 32px 0 @media screen and (max-width: $device-mobile) - padding: 20px 24px 12px - h2,h3,h4,h5,h6 - font-size: $fs-h3 - margin-top: 1em - margin-bottom: 0 + padding: 4px 24px 0 + h3,h4,h5,h6 + font-size: $fsh3 p - font-size: $fs-h4 + --fsp: $fsh4 color: var(--text) // type=text @@ -44,13 +42,13 @@ width: 8px height: 14px &:before - top: 8px + top: -8px left: 0 border-top: 6px solid $color-accent border-left: 6px solid $color-accent &:after right: 0 - bottom: 8px + bottom: -8px border-right: 6px solid $color-accent border-bottom: 6px solid $color-accent h1.content[type=text] diff --git a/source/css/_layout/tag-plugins/tabs.styl b/source/css/_layout/tag-plugins/tabs.styl index c208fd8..47be1cb 100644 --- a/source/css/_layout/tag-plugins/tabs.styl +++ b/source/css/_layout/tag-plugins/tabs.styl @@ -42,7 +42,7 @@ display: block cursor: pointer padding: .25rem .75rem - --fsp: var(--fsp3) + --fsp: $fsp3 font-size: var(--fsp) line-height: inherit font-weight: 500 diff --git a/source/css/_layout/tag-plugins/timeline.styl b/source/css/_layout/tag-plugins/timeline.styl index 1866bb9..22cbdfd 100644 --- a/source/css/_layout/tag-plugins/timeline.styl +++ b/source/css/_layout/tag-plugins/timeline.styl @@ -1,6 +1,5 @@ .md-text .tag-plugin.timeline position: relative - margin-top: 0 padding-left: 16px &:before content: '' @@ -102,7 +101,7 @@ margin-top: 4px box-shadow: $boxshadow-block p - --fsp: var(--fsp1) + --fsp: $fsp1 img display: block &:empty @@ -123,7 +122,7 @@ color: var(--text-p1) line-height: 1.25 padding: 0.75rem 1rem - --fsp: var(--fsp1) + --fsp: $fsp1 font-size: var(--fsp) @@ -142,7 +141,7 @@ trans1 all &:hover border-bottom: 2px solid $color-hover - p:first-child:not([class]) a:not([class]) + >p:first-child:not([class]) a:not([class]) padding: 0 margin: 0 color: inherit @@ -205,7 +204,7 @@ padding: 0 0.5rem margin: 0.75rem 0 p - --fsp: var(--fsp2) + --fsp: $fsp2 margin: 0.25rem .tag-plugin.timeline .body diff --git a/source/css/_layout/widgets/ghuser.styl b/source/css/_layout/widgets/ghuser.styl index ca7262a..db68b28 100644 --- a/source/css/_layout/widgets/ghuser.styl +++ b/source/css/_layout/widgets/ghuser.styl @@ -22,7 +22,7 @@ p.username font-weight: 900 - font-size: $fs-h2 + font-size: $fsh2 color: var(--text) margin: 0 p.bio diff --git a/source/css/_layout/widgets/timeline.styl b/source/css/_layout/widgets/timeline.styl index d2fefd4..f95e7e8 100644 --- a/source/css/_layout/widgets/timeline.styl +++ b/source/css/_layout/widgets/timeline.styl @@ -1,6 +1,15 @@ .widget-wrapper.timeline .widget-body margin-top: 0.5rem + .body + a + trans1 all + border-bottom: 1px solid var(--text) + color: var(--text-p1) + --fsp: $fsp2 + &:hover + color: $color-hover + border-bottom: 1px solid $color-hover .tag-plugin.timeline .timenode .header margin: 0.5rem 16px @@ -20,14 +29,8 @@ border-radius: $border-card background: var(--alpha50) box-shadow: none - - a - trans1 all - border-bottom: 1px solid var(--text) - color: var(--text-p1) - &:hover - color: $color-hover - border-bottom: 1px solid $color-hover + p,li + --fsp: $fsp3 code background: none padding: 0 diff --git a/source/css/_layout/widgets/widgets.styl b/source/css/_layout/widgets/widgets.styl index 6d4472d..f854341 100644 --- a/source/css/_layout/widgets/widgets.styl +++ b/source/css/_layout/widgets/widgets.styl @@ -36,7 +36,7 @@ trans2: opacity background border-radius: 4px padding: 6px - margin-right: -5px + margin-right: -6px svg height: 1em width: auto