From 25ebde1d7c4b9be864f5a0da74fa1c3b6d2d672a Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 9 Feb 2024 00:47:03 +0800 Subject: [PATCH] [opt] style --- source/css/_custom.styl | 2 ++ source/css/_layout/layout.styl | 6 ++++-- source/css/_layout/list.styl | 2 +- source/css/_layout/md.styl | 6 +++--- source/css/_layout/partial/footer.styl | 14 ++++++++------ source/css/_layout/widgets/timeline.styl | 5 ----- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/source/css/_custom.styl b/source/css/_custom.styl index 4187ff1..f429a5c 100644 --- a/source/css/_custom.styl +++ b/source/css/_custom.styl @@ -84,6 +84,8 @@ $border-button = 4px // iPad 竖屏 @media screen and (max-width: $device-tablet) --side-content-width: 188px + @media screen and (max-width: $device-mobile-max) + --side-content-width: 224px // 动态计算值 :root diff --git a/source/css/_layout/layout.styl b/source/css/_layout/layout.styl index 983f70f..8041c2e 100644 --- a/source/css/_layout/layout.styl +++ b/source/css/_layout/layout.styl @@ -20,6 +20,7 @@ .l_body .l_right justify-self: left --gap-margin: 0px + max-height: calc(100% - 8px * 2) .widgets height: 100% overflow visible @@ -34,7 +35,7 @@ .l_right top: 8px position: fixed - height: calc(100% - 8px * 2) + max-height: calc(100% - 8px * 2) transform: translateX(320px) transition: transform .38s ease-out margin: 0 @@ -44,7 +45,8 @@ background: var(--site-bg) overflow: auto scrollbar(0, 0) - --blur-bg: var(--alpha75) + --blur-bg: var(--alpha60) + --blur-px: 50px .l_body[rightbar] .l_right transform: translateX(0px) diff --git a/source/css/_layout/list.styl b/source/css/_layout/list.styl index e91d397..2d7327b 100644 --- a/source/css/_layout/list.styl +++ b/source/css/_layout/list.styl @@ -7,7 +7,7 @@ .l_main .post-list .post-title font-weight: 500 - margin: 1.25rem 0 .75rem 0 + margin: 1.25rem auto .75rem 0 line-height: 1.2 font-size: $fsh4 border-bottom: none diff --git a/source/css/_layout/md.styl b/source/css/_layout/md.styl index 5520196..75f00db 100644 --- a/source/css/_layout/md.styl +++ b/source/css/_layout/md.styl @@ -118,9 +118,9 @@ margin: auto display: block -.md-text li:not([class]) a:not([class]) -.md-text p:not([class]) a:not([class]) -.md-text table a:not([class]) +li:not([class]) a:not([class]) +p:not([class]) a:not([class]) +table a:not([class]) position: relative text-decoration: none trans1 all diff --git a/source/css/_layout/partial/footer.styl b/source/css/_layout/partial/footer.styl index ba61562..680b8e7 100644 --- a/source/css/_layout/partial/footer.styl +++ b/source/css/_layout/partial/footer.styl @@ -3,15 +3,19 @@ color: var(--text-p2) a color: var(--text-p2) + border-radius: 2px &:hover - color: $color-hover + color: var(--text) + background: var(--block-hover) .page-footer .sitemap - margin: .5rem 0 2rem + margin: .5rem -4px 2rem display: grid scrollbar-width: none grid-gap: 1rem 1rem grid-auto-flow: column dense + // grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) + grid-template-columns: repeat(4, 1fr) overflow: scroll scrollbar(0, 0) @@ -23,12 +27,11 @@ >span,>a text-decoration: none txt-ellipsis() + padding: 4px >span - margin: .5rem 0 font-weight: 500 color: var(--text-p1) - >a - margin: .2rem 0 + margin: 4px 0 .page-footer .text @@ -36,5 +39,4 @@ margin: 4px 0 line-height: 1.5 a:not([class]) - text-decoration: underline font-weight: 500 \ No newline at end of file diff --git a/source/css/_layout/widgets/timeline.styl b/source/css/_layout/widgets/timeline.styl index 05e9b99..dc791d5 100644 --- a/source/css/_layout/widgets/timeline.styl +++ b/source/css/_layout/widgets/timeline.styl @@ -4,13 +4,8 @@ .body a trans1 all - border-bottom: 1px solid var(--text) word-break: break-all - color: var(--text-p1) --fsp: $fsp2 - &:hover - color: $color-hover - border-bottom: 1px solid $color-hover .tag-plugin.timeline .timenode .header margin: 0.5rem var(--gap-padding)