From b4e3a1e0637d70fb0408a03cb0c1d4126fe95df3 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 30 May 2025 19:43:08 +0800 Subject: refactor: remove redundant CSS and shortcodes Because images are centered by default, so there's no need to specify a "center" class. "small" class is replaced by "!small" url pattern. --- assets/css/components/_shortcodes.scss | 75 ---------------------------------- assets/css/utils/_utility.scss | 9 ---- 2 files changed, 84 deletions(-) (limited to 'assets/css') diff --git a/assets/css/components/_shortcodes.scss b/assets/css/components/_shortcodes.scss index f61295ed..725d5eb2 100644 --- a/assets/css/components/_shortcodes.scss +++ b/assets/css/components/_shortcodes.scss @@ -47,66 +47,6 @@ } } -/* blog links */ - -div.blog-links { - display: flex; - flex-wrap: wrap; - gap: 1rem; -} - -a.blog-link { - position: relative; - background-color: var(--block-background-color); - text-decoration: none; - color: var(--text-color); - padding: 1rem 2rem; - padding-right: 4rem; - border-radius: 1rem; - width: calc(50% - 2rem); - box-sizing: border-box; - overflow: hidden -} - -@media screen and (max-width: 768px) { - a.blog-link { - font-size: 1.2rem; - padding: 0.5rem 1rem; - padding-right: 2rem; - width: 100%; - } -} - -a.blog-link h4, -a.blog-link p { - margin: 0; - font-size: 1.2rem; -} - -a.blog-link p { - line-height: 1.5; -} - -a.blog-link .blog-link-content { - z-index: 10; -} - -a.blog-link-image { - z-index: 0; -} - -a.blog-link img { - --size: 5rem; - display: block; - position: absolute; - right: -1rem; - bottom: -1rem; - width: var(--size); - height: var(--size); - border-radius: 100%; - z-index: 0; -} - /* book showcase shortcode */ .book-showcase { @@ -152,21 +92,6 @@ a.blog-link img { & > p { display: none } } -/* gallery */ - -.gallery-img { - text-align: center; -} - -.gallery-img span { - text-align: center; -} - -.gallery-img-desc { - font-size: 0.8em; - font-weight: 800; -} - /* sidenote shortcode */ @media screen and (max-width: 1199px) { diff --git a/assets/css/utils/_utility.scss b/assets/css/utils/_utility.scss index 878ac8f2..d2110714 100644 --- a/assets/css/utils/_utility.scss +++ b/assets/css/utils/_utility.scss @@ -11,21 +11,12 @@ } figure { - &.small { - width: 300px; - } &.card { width: fit-content; img { height: 18rem; } } - &.center { - margin: 0 auto; - figcaption { - text-align: center - } - } } .outbox { -- cgit v1.2.3