summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-15 16:47:25 +0800
committerEltrac <hi@guhub.cn>2025-07-15 16:47:25 +0800
commitef16dffd81595af3bc03efea78d45032d0b467a2 (patch)
tree5f1588e9bab0a8ab8f18852fa26001cc11873412 /assets
parent6c76369a20223f1f67f75450a99cf7691c7e908a (diff)
refactor: replace _card.scss with UnoCSS
Diffstat (limited to 'assets')
-rw-r--r--assets/css/components/_card.scss139
-rw-r--r--assets/css/global.scss1
-rw-r--r--assets/css/utils/_utility.scss2
3 files changed, 1 insertions, 141 deletions
diff --git a/assets/css/components/_card.scss b/assets/css/components/_card.scss
deleted file mode 100644
index 9b89797e..00000000
--- a/assets/css/components/_card.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-/* 亮色模式(默认) */
-.card {
- @include card;
- margin: 1rem 0;
- position: relative;
-
- .card-corner {
- position: absolute;
- top: 0;
- right: 0;
- width: 50px;
- height: 50px;
- background: linear-gradient(-45deg, #f8f8f8 50%, #ddd 50%);
- clip-path: polygon(100% 0, 0 0, 100% 100%);
- }
-
- .card-tags {
- margin: 0;
- font-size: 1rem;
- a {
- text-decoration: none;
- color: inherit;
- }
- }
-
- .card-title {
- margin: 0;
- a {
- text-decoration: none;
- color: inherit;
- }
- }
-
- .card-content {
- font-size: 1.05rem;
- }
-
- /* 暗色模式 */
- @media (prefers-color-scheme: dark) {
- .card-corner {
- background: linear-gradient(-45deg, #444 50%, #666 50%);
- }
-
- .card-tags {
- a {
- color: #bbb;
- }
- }
- }
-}
-
-.card-page {
- .related-posts {
- h2 {
- font-size: 1.2rem;
- color: var(--secondary-text-color);
- margin: 0;
- }
- ul {
- margin: 0
- }
- }
-}
-
-.card-list {
- .pagination {
- display: flex;
- @media screen and (min-width: 768px) {
- padding: 1rem;
- }
- .pagination-prev, .pagination-next {
- font-size: 2rem;
- padding: 0.2rem 0.6rem;
- text-decoration: none;
- background-color: var(--block-background-color);
- border-radius: 50%;
- }
- }
-}
-
-.cards-grid {
- display: grid;
- grid-template-columns: 1fr;
- gap: 1rem;
- @media screen and (min-width: 768px) {
- grid-template-columns: 1fr 1fr;
- }
- .card {
- font-size: 85%;
- line-height: 1.8;
- margin: 0;
- h3 {
- font-size: 1.2rem;
- margin: 0;
- }
- }
-}
-
-.cards-list {
- display: flex;
- gap: 1rem;
- flex-wrap: wrap;
- justify-content: space-around;
- list-style: none;
- font-size: 1.2rem;
-}
-
-#latest-cards {
- margin: 1rem 0;
- .latest-cards-container {
- padding: 0 5px;
- display: flex;
- width: 100%;
- overflow-x: auto;
- gap: 1rem;
- .card {
- flex-shrink: 0;
- width: 50%;
- }
- }
-}
-
-article.card-page {
- position: relative;
- .title-image-container {
- --size: 4rem;
- @include roundSticker;
- position: absolute;
- top: -1rem;
- right: -1rem;
- width: var(--size);
- height: var(--size);
- z-index: 1;
- transform: rotate(-5deg);
- img {
- width: 100%;
- }
- }
-}
diff --git a/assets/css/global.scss b/assets/css/global.scss
index 950c24a3..9d05e7e0 100644
--- a/assets/css/global.scss
+++ b/assets/css/global.scss
@@ -7,5 +7,4 @@
@import "components/pages";
@import "components/taxonomy";
@import "components/postlist";
-@import "components/card";
@import "components/global-search";
diff --git a/assets/css/utils/_utility.scss b/assets/css/utils/_utility.scss
index 7a3b4a8a..16b6f8c3 100644
--- a/assets/css/utils/_utility.scss
+++ b/assets/css/utils/_utility.scss
@@ -54,7 +54,7 @@ figure {
}
.font-secondary {
- color: var(--secondary-text-color);
+ color: var(--secondary-text-color)!important;
}
.xerox {