From d8e62892c512c013ff4af462efac37482467380b Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 24 Apr 2025 16:35:26 +0800 Subject: feat: display fictions in index page --- assets/css/components/_postlist.scss | 21 +++++++++++++++++++++ content/about.md | 3 ++- ...1\344\272\272\345\221\250\345\210\212-vol-26.md" | 6 +++++- hugo.yaml | 1 + layouts/index.html | 12 +++++++++++- static/img/skull-slices.svg | 2 ++ 6 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 static/img/skull-slices.svg 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: - Skull icon by Icons8 - Skull with flowers, designed by Freepik -- [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/\347\250\273\350\215\211\344\272\272\345\221\250\345\210\212-vol-26.md" "b/content/posts/weekly/\347\250\273\350\215\211\344\272\272\345\221\250\345\210\212-vol-26.md" index 2e6a86da..d95c27df 100644 --- "a/content/posts/weekly/\347\250\273\350\215\211\344\272\272\345\221\250\345\210\212-vol-26.md" +++ "b/content/posts/weekly/\347\250\273\350\215\211\344\272\272\345\221\250\345\210\212-vol-26.md" @@ -11,7 +11,9 @@ draft: true toc: true --- -random shit, maybe music and stuff + + +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 @@ - +

{{ .Title }} + {{ if eq .Section "fictions" }} + 小说 + {{ end }}

{{ with .Params.categories }} @@ -38,6 +42,12 @@ {{ $firstPost = false }} {{ end }} + + {{ if eq .Section "fictions" }} +
+ +
+ {{ end }} {{ end }} 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 @@ + + \ No newline at end of file -- cgit v1.2.3