fix 'change return_home to right'

This commit is contained in:
2025-07-26 20:50:45 +08:00
parent 010b45c328
commit 8401704aa6

View File

@@ -8,14 +8,18 @@
<!-- 添加样式使整个页面内容居中显示 --> <!-- 添加样式使整个页面内容居中显示 -->
<div style="max-width: 800px; margin: 0 auto; padding: 0 20px;"> <div style="max-width: 800px; margin: 0 auto; padding: 0 20px;">
<h1 style="text-align: center;">{{ post.title }}</h1> <h1 style="text-align: center;">{{ post.title }}</h1>
<p>发布时间:{{ post.publish_date|date:"Y年n月j日 H:i" }}</p> <!-- 将返回首页链接放在发布时间的右侧 -->
<div style="display: flex; align-items: center; justify-content: space-between;">
<p>发布时间:{{ post.publish_date|date:"Y年n月j日 H:i" }}</p>
<a href="{% url 'index' %}" style="margin-left: 20px; white-space: nowrap;">返回首页</a>
</div>
<!-- 使用get_markdown_content方法渲染Markdown内容 --> <!-- 使用get_markdown_content方法渲染Markdown内容 -->
<div>{{ post.get_markdown_content|safe }}</div> <div>{{ post.get_markdown_content|safe }}</div>
<br> <br>
<a href="{% url 'index' %}">返回首页</a>
</div> </div>
<footer style="position: fixed; bottom: 0; width: 100%; text-align: center; font-size: 12px; color: #999; background-color: white; padding: 5px 0;"> <footer style="position: fixed; bottom: 0; width: 100%; text-align: center; font-size: 12px; color: #999; background-color: white; padding: 5px 0;">
<a href="https://beian.miit.gov.cn/" target="_blank">闽ICP备2023010767号-2</a> <a href="https://beian.miit.gov.cn/" target="_blank">闽ICP备2023010767号-2</a>
</footer> </footer>
</body> </body>
</html> </html>