-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
37 lines (35 loc) · 1.33 KB
/
Copy pathindex.html
File metadata and controls
37 lines (35 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
layout: default
title: 首页
---
<div class="home">
<div class="intro">
<h1>你好,我是<span class="highlight">迷茫小学僧</span></h1>
<p class="subtitle">一名练习程序员,记录学习历程与成长。</p>
</div>
<div class="posts-list">
<h2 class="section-title">最近文章</h2>
{% for post in site.posts limit:5 %}
<article class="post-preview">
<a href="{{ post.url | relative_url }}" class="post-link">
<h3 class="post-title">{{ post.title }}</h3>
<p class="post-excerpt">{{ post.excerpt | strip_html | truncate: 120 }}</p>
<div class="post-meta">
<time>{{ post.date | date: "%Y年%m月%d日" }}</time>
{% if post.categories.size > 0 %}
<span class="post-category">/{{ post.categories | join: "/" }}</span>
{% endif %}
</div>
</a>
</article>
{% else %}
<div class="empty-state">
<p class="empty-icon">📝</p>
<p class="empty-text">还没有文章,创作即将开始。</p>
</div>
{% endfor %}
</div>
<div class="home-footer">
<a href="{{ "/archives" | relative_url }}" class="btn">查看全部文章 →</a>
</div>
</div>