summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-25 17:08:25 +0800
committerEltrac <hi@guhub.cn>2025-04-25 17:08:25 +0800
commit070a715031b2f47c6b73cc0c9a5e2a518cf20441 (patch)
tree234748f9a1c09c91a5d047c9b70375d661a475d7
parente17564453c6a7a78c757ccb9a8fd61bb00b99f00 (diff)
feat: better index page style
-rw-r--r--assets/css/components/_card.scss2
-rw-r--r--assets/css/components/_postlist.scss19
-rw-r--r--layouts/index.html4
3 files changed, 5 insertions, 20 deletions
diff --git a/assets/css/components/_card.scss b/assets/css/components/_card.scss
index a5f2468c..134bfdf9 100644
--- a/assets/css/components/_card.scss
+++ b/assets/css/components/_card.scss
@@ -75,7 +75,9 @@
}
#latest-cards {
+ margin: 1rem 0;
.latest-cards-container {
+ padding: 0 5px;
display: flex;
width: 100%;
overflow-x: auto;
diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss
index fc59dd2d..d3df207b 100644
--- a/assets/css/components/_postlist.scss
+++ b/assets/css/components/_postlist.scss
@@ -15,7 +15,6 @@
.posts-item {
overflow: hidden;
width: 100%;
- border-bottom: 1px solid var(--border-color);
margin: 0.5rem 0;
header {
width: 100%;
@@ -26,12 +25,12 @@
}
.posts-item-meta {
- filter: url(#xs);
time {
color: var(--secondary-text-color);
font-family: var(--mono-font-family);
}
.posts-item-title {
+ filter: url(#xs);
.posts-item-title-pill {
font-size: 1rem;
font-weight: normal;
@@ -134,19 +133,3 @@
@include postCategoryPill;
}
}
-
-/* Card List Styles */
-
-#latest-cards {
- margin: 1rem 0;
- .latest-cards-container {
- display: flex;
- width: 100%;
- overflow-x: auto;
- gap: 1rem;
- .card {
- flex-shrink: 0;
- width: 50%;
- }
- }
-}
diff --git a/layouts/index.html b/layouts/index.html
index 19ac50fa..6649f9ac 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -15,7 +15,7 @@
<time>
{{ .Date.Format "Jan 2" }}
</time>
- <h3 class="posts-item-title"
+ <h2 class="posts-item-title"
{{ if $firstPost }} style="margin-bottom: 0"{{ end }}>
<a
href="{{ .Permalink }}"
@@ -30,7 +30,7 @@
{{ if eq .Section "fictions" }}
<span class="posts-item-title-pill">小说</span>
{{ end }}
- </h3>
+ </h2>
</div>
{{ with .Params.categories }}
<div class="posts-item-category">