summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-24 16:35:26 +0800
committerEltrac <hi@guhub.cn>2025-04-24 16:35:26 +0800
commit3f40452f01277fda4345376be37575f0853f6f52 (patch)
treed71ea2b0cbebf3b62df8988d98aec0ea58e07fdc
parent3f3f5bf059cf92af0d7e55f86d6c151558c2bd31 (diff)
feat: display fictions in index page
Former-commit-id: d8e62892c512c013ff4af462efac37482467380b
-rw-r--r--assets/css/components/_postlist.scss21
-rw-r--r--content/about.md3
-rw-r--r--content/posts/weekly/稻草人周刊-vol-26.md6
-rw-r--r--hugo.yaml1
-rw-r--r--layouts/index.html12
-rw-r--r--static/img/skull-slices.svg2
6 files changed, 42 insertions, 3 deletions
diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss
index 5deae15a..68adca84 100644
--- a/assets/css/components/_postlist.scss
+++ b/assets/css/components/_postlist.scss
@@ -29,6 +29,13 @@
color: var(--secondary-text-color);
font-family: var(--mono-font-family);
}
+ .posts-item-title {
+ .posts-item-title-pill {
+ font-size: 1rem;
+ font-weight: normal;
+ color: var(--secondary-text-color)
+ }
+ }
}
.posts-item-category {
@@ -41,6 +48,20 @@
}
font-size: 1em;
}
+
+ position: relative;
+ .posts-item-icon {
+ position: absolute;
+ top: 0;
+ right: 0;
+ opacity: 0.25;
+ z-index: -1;
+ transform: rotateY(180deg);
+ img {
+ width: 8rem;
+ height: 8rem;
+ }
+ }
}
}
diff --git a/content/about.md b/content/about.md
index 64ce9550..824e8279 100644
--- a/content/about.md
+++ b/content/about.md
@@ -86,4 +86,5 @@ related_cards:
- <a target="_blank" href="https://icons8.com/icon/dFh2MtWbG5FC/skull">Skull</a> icon by <a target="_blank" href="https://icons8.com">Icons8</a>
- Skull with flowers, <a href="http://www.freepik.com">designed by Freepik</a>
-- [Halloween Pot Of Horror Food Vector SVG Icon - SVG Repo](https://www.svgrepo.com/svg/11985/halloween-pot-of-horror-food) \ No newline at end of file
+- [Halloween Pot Of Horror Food Vector SVG Icon - SVG Repo](https://www.svgrepo.com/svg/11985/halloween-pot-of-horror-food)
+- [Skull Slices SVG Vector](https://www.svgrepo.com/svg/321390/skull-slices)
diff --git a/content/posts/weekly/稻草人周刊-vol-26.md b/content/posts/weekly/稻草人周刊-vol-26.md
index 2e6a86da..d95c27df 100644
--- a/content/posts/weekly/稻草人周刊-vol-26.md
+++ b/content/posts/weekly/稻草人周刊-vol-26.md
@@ -11,7 +11,9 @@ draft: true
toc: true
---
-random shit, maybe music and stuff
+<iframe allow="autoplay *; encrypted-media *;" frameborder="0" height="150" style="width:100%;max-width:660px;overflow:hidden;background:transparent;" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-storage-access-by-user-activation allow-top-navigation-by-user-activation" src="https://embed.music.apple.com/cn/album/what-was-that/1809638073?i=1809638075"></iframe>
+
+Lady Gaga 的《Mayhem》和 Coachella 音乐节表现之后,Lorde 就发布了新单曲,欧美乐迷今年也吃得太好了吧。[^1]
## 🙋 在做什么
@@ -37,3 +39,5 @@ content here
## 🗣️ 碎碎念
- 当我偶尔意识到自己的行为、情绪和表达方式,都还有些像个小孩子的时候,我便会感受到一股像蟑螂一般爬上我脊背的、存在主义的恐惧感。这可能是因为我从小都没有机会心安理得地当一个小孩子。
+
+[^1]: 建议 Taylor Swift 立马惊喜释出《reputation》重录版 \ No newline at end of file
diff --git a/hugo.yaml b/hugo.yaml
index 6da65859..2c720960 100644
--- a/hugo.yaml
+++ b/hugo.yaml
@@ -84,6 +84,7 @@ markup:
params:
mainSections:
- posts
+ - fictions
favicon: /favicon.png
extraCSSFiles:
- /pagefind/pagefind-ui.css
diff --git a/layouts/index.html b/layouts/index.html
index 9b2de377..8ec76d08 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -15,11 +15,15 @@
<time>
{{ .Date.Format "Jan 2" }}
</time>
- <h3{{ if $firstPost }} style="margin-bottom: 0"{{ end }}>
+ <h3 class="posts-item-title"
+ {{ if $firstPost }} style="margin-bottom: 0"{{ end }}>
<a
href="{{ .Permalink }}"
data-umami-event="Click post link from index"
>{{ .Title }}</a>
+ {{ if eq .Section "fictions" }}
+ <span class="posts-item-title-pill">小说</span>
+ {{ end }}
</h3>
</div>
{{ with .Params.categories }}
@@ -38,6 +42,12 @@
</div>
{{ $firstPost = false }} <!-- 更新为非第一篇 -->
{{ end }}
+ <!-- 如果是小说,则显示图标 -->
+ {{ if eq .Section "fictions" }}
+ <div class="posts-item-icon invert-if-dark">
+ <img src="/img/skull-slices.svg" />
+ </div>
+ {{ end }}
</div>
{{ end }}
</div>
diff --git a/static/img/skull-slices.svg b/static/img/skull-slices.svg
new file mode 100644
index 00000000..2e994cbd
--- /dev/null
+++ b/static/img/skull-slices.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M262.613 18.693c14.346 3.397 28.44 8.496 41.955 15.407C387.29 76.396 426.39 171.724 405.982 258.908c5.637-1.678 11.7-2.258 17.91-1.496 5.757.706 11.11 2.502 15.895 5.14 3.493-20.665 5.6-40.235 5.604-57.333v-.048c.01-98.058-79.632-179.733-182.777-186.48zM220.186 32.29c-35.435-.275-70.502 10.305-99.43 30.392C87.63 89.234 63.864 125.8 54.706 167.16c-9.962 63.56 19.737 130.7 79.794 161.07 17.298 8.745 35.857 13.585 54.477 14.825-.484-10.38-1.614-20.586-3.534-30.407-11.817-1.572-23.504-5.01-34.568-10.44-60.26-29.57-82.477-104.75-53.227-163.696 22.977-46.303 70.613-72.02 119.342-71.998 20.575.01 41.344 4.607 60.535 14.18 71.852 35.85 98.25 125.977 62.756 196.452-3.01 5.977-6.372 11.657-10.04 17.043-8.4 19.265-28.72 31.58-50.662 28.89-26.746-3.28-45.765-27.597-42.484-54.314 3.19-25.98 26.298-44.662 52.16-42.657 7.325-35.263-8.658-73.613-42.38-89.82-34.648-16.655-78.86-3.388-95.536 31.657-14.29 30.037-2.71 68.293 27.752 82.553l.195-.145c44.044 59.514 29.42 150.498 13.96 210.145l-.31-.08-.257 2.603c11.15 4.674 22.272 9.042 33.426 12.91l15.298-53.843 17.977 5.107-15.468 54.436c12.238 3.578 24.554 6.44 37.035 8.297l13.2-53.82 18.152 4.452-12.597 51.356c10.234.65 20.602.567 31.147-.387l10.94-51.405 18.28 3.89-9.523 44.743c7.942-1.534 15.995-3.584 24.178-6.213 2.24-5.614 17.78-44.766 34.64-98.617 3.908-12.483 7.796-25.598 11.508-38.963-2.528.13-5.1.06-7.7-.26-24.13-2.96-41.29-24.897-38.33-49.002.686-5.585 2.402-10.79 4.92-15.463 33.78-85.14-.844-187.14-83.7-229.506-23.993-12.267-50.032-18.242-75.877-18.443zm-3.124 52.937c-41.987-.015-83.065 22.066-102.677 61.59-24.756 49.886-5.873 113.793 44.72 138.62 6.808 3.34 13.908 5.753 21.127 7.32-3.334-9.88-7.716-19.135-13.318-27.5-37.09-20.268-50.38-67.642-32.447-105.335v-.002c15.005-31.536 46.876-49.117 79.668-49.475 13.845-.15 27.856 2.768 40.83 9.004h.002c42.324 20.343 61.96 68.003 52.33 111.634l.027.014c-3.273 11.283-8.337 20.948-17.46 27.984-9.914.353-17.66 8.296-17.66 18.307 0 10.24 8.1 18.34 18.34 18.34 5.443 0 10.266-2.3 13.604-5.982 11.28-8.043 20.752-21.604 25.588-35.62l.06.116c20.934-58.806-3.163-128.17-60.61-156.832-16.506-8.234-34.395-12.18-52.123-12.185zm136.78 216.636l6.736 109.592-24.89-31.152-45.4 14.88 63.554-93.32z"/></svg> \ No newline at end of file