AI 生成: 一个简洁优雅的个人博客网站,包含首页文章列表、文章详情页和关于页面。使用 Python Flask 构建,支持 Markdown 文章渲染。

This commit is contained in:
admin
2026-09-28 16:47:07 +08:00
commit 53852dbbb0
11 changed files with 678 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
{% extends 'base.html' %}
{% block title %}首页 - 我的博客{% endblock %}
{% block content %}
<section class="hero">
<h1>欢迎来到我的博客</h1>
<p class="subtitle">记录思考,分享成长</p>
</section>
<section class="post-list">
{% if posts %}
{% for post in posts %}
<article class="post-item">
<h2 class="post-title">
<a href="{{ url_for('post_detail', slug=post.slug) }}">{{ post.title }}</a>
</h2>
<div class="post-meta">
<time>{{ post.date }}</time>
</div>
{% if post.summary %}
<p class="post-summary">{{ post.summary }}</p>
{% endif %}
<a class="read-more" href="{{ url_for('post_detail', slug=post.slug) }}">阅读全文 →</a>
</article>
{% endfor %}
{% else %}
<p class="empty-tip">还没有文章,去 <code>posts/</code> 目录添加吧。</p>
{% endif %}
</section>
{% endblock %}