aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryingyu5658 <i@yingyu5658.me>2025-12-21 15:36:23 +0800
committeryingyu5658 <i@yingyu5658.me>2025-12-21 15:36:23 +0800
commit66543c0b3449b5dfc48c3b6a62b0387788b69d3f (patch)
tree5e0049f53d472af416b6cf04eb2f901419c5d076
parent3df49f7ee0e262e1a6006f7be311fb0c02c4a7f7 (diff)
downloadblog-66543c0b3449b5dfc48c3b6a62b0387788b69d3f.tar.gz
blog-66543c0b3449b5dfc48c3b6a62b0387788b69d3f.zip
chore: set up weekly archetype and refine homepage layout
* Remove the banner in index.md * Add default cover and ending template to weekly.md archetype * Remove the banner from homepage * Refactor recent-posts.md * tweak related CSS styles
-rw-r--r--archetypes/weekly.md11
-rw-r--r--content/_index.md8
-rw-r--r--content/categories.md2
-rw-r--r--layouts/partials/style.html4
-rw-r--r--layouts/shortcodes/recent-posts.html37
5 files changed, 35 insertions, 27 deletions
diff --git a/archetypes/weekly.md b/archetypes/weekly.md
index c9a6bbe..16e7d04 100644
--- a/archetypes/weekly.md
+++ b/archetypes/weekly.md
@@ -1,16 +1,20 @@
---
date: '{{ .Date }}'
title: '回声周刊 Vol.'
-categories: 回声周刊
+categories:
+ - 回声周刊
issue:
tags:
-
draft: true
---
+
+> 这里是回声周刊,分享我这周读过的文章书籍、近期发生的大事小事。每周日更新。如果你对这个周刊感兴趣,可以 [订阅周刊](/categories/%E5%9B%9E%E5%A3%B0%E5%91%A8%E5%88%8A/atom.xml) 或加入 [TG频道](https://t.me/glowisle)。
+
## 〰︎ 声波
{{< music
- cover=""
+ cover="https://images.glowisle.me/"
title=""
artist=""
apple=""
@@ -23,8 +27,7 @@ draft: true
###
> 🔗
->
->
## ♇ 所在
+以上就是本期回声周刊的全部内容,感谢阅读,祝你有充满ECHO的一周!👋
diff --git a/content/_index.md b/content/_index.md
index 0865506..79c00f9 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -2,6 +2,7 @@
title: "映屿"
---
+<!--
![](/images/glowisle.jpeg)
@@ -9,11 +10,8 @@ title: "映屿"
我会在这里写写生活随笔、读书感悟、技术实践和幼稚观点。
-我的理念是**不花里胡哨、不迎合大众、不随波逐流、不投放广告**,专注自己想写的内容。
+ -->
+ ---
----
-
-
-## 最近更新
{{< recent-posts >}}
diff --git a/content/categories.md b/content/categories.md
index f8875ad..2f6f19c 100644
--- a/content/categories.md
+++ b/content/categories.md
@@ -22,7 +22,7 @@ title: 分类
### [📖 回声周刊](/categories/回声周刊)
-每周优质阅读分享 | 近期发生的事
+每周阅读分享 | 近期发生的事
---
diff --git a/layouts/partials/style.html b/layouts/partials/style.html
index e922440..14b2eea 100644
--- a/layouts/partials/style.html
+++ b/layouts/partials/style.html
@@ -31,7 +31,7 @@
}
img.missing {
- display: none;
+ display: none;
}
nav a,
@@ -79,7 +79,7 @@
}
h1.post-title {
- margin-top: 5vh;
+ margin-top: 2vh;
margin-bottom: 10px;
text-align: center;
}
diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html
index c6c1a3e..0d1d955 100644
--- a/layouts/shortcodes/recent-posts.html
+++ b/layouts/shortcodes/recent-posts.html
@@ -1,5 +1,5 @@
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{
-$recent := first 5 $pages.ByDate.Reverse }}
+$recent := first 8 $pages.ByDate.Reverse }}
<style>
.recent-list {
margin: 0;
@@ -15,7 +15,6 @@ $recent := first 5 $pages.ByDate.Reverse }}
.item-link {
display: inline-block;
text-decoration: none;
- margin-left: 10px;
flex: 1;
white-space: nowrap;
overflow: hidden;
@@ -34,22 +33,30 @@ $recent := first 5 $pages.ByDate.Reverse }}
text-align: center;
font-style: italic;
}
+
+ .recent-post-item {
+ margin-bottom: 1em;
+ }
+
+ .recent-post-title {
+ margin-top: 2px;
+ }
</style>
<div class="recent-posts">
- {{ if $recent }}
- <ul class="recent-list">
- {{ range $index, $page := $recent }}
- <li class="recent-item">
- <span class="post-date">
- <time datetime='{{ .Date.Format "2006-01-02" }}'>
- {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
- </time>
- </span>
+ {{ if $recent }} {{ range $index, $page := $recent }}
+
+ <div class="recent-post-item">
+ <span class="post-date">
+ <time datetime='{{ .Date.Format "2006-01-02" }}'>
+ {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
+ </time>
+ </span>
+
+ <h3 class="recent-post-title">
<a href="{{ .RelPermalink }}" class="item-link">{{ .Title }}</a>
- </li>
- {{ end }}
- </ul>
- {{ else }}
+ </h3>
+ </div>
+ {{ end }} {{ else }}
<p class="recent-empty">暂无文章</p>
{{ end }}
</div>