From 494b1f1f597ec8b764a9d73dc18696e00f629a88 Mon Sep 17 00:00:00 2001 From: pa2g3nmk9 <3474779149@qq.com> Date: Mon, 27 Oct 2025 13:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/DjangoBlog-master/tem?= =?UTF-8?q?plates/blog/tags/article=5Finfo.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/blog/tags/article_info.html | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/DjangoBlog-master/templates/blog/tags/article_info.html b/src/DjangoBlog-master/templates/blog/tags/article_info.html index 3deec44..31fce0b 100644 --- a/src/DjangoBlog-master/templates/blog/tags/article_info.html +++ b/src/DjangoBlog-master/templates/blog/tags/article_info.html @@ -4,71 +4,78 @@
- + {# 文章标题 #}

- {% if isindex %} + {% if isindex %} {% if article.article_order > 0 %} + {# 置顶文章显示特殊标识 #} 【{% trans 'pin to top' %}】{{ article.title }} {% else %} + {# 普通文章标题链接 #} {{ article.title }} {% endif %} - {% else %} + {# 文章详情页直接显示标题 #} {{ article.title }} {% endif %}

+ + {# 评论链接和浏览量 #}
+ + {# 面包屑导航(仅文章类型且非首页) #} {% if article.type == 'a' %} {% if not isindex %} - {% cache 36000 breadcrumb article.pk %} - {% load_breadcrumb article %} + {% cache 36000 breadcrumb article.pk %} {# 缓存面包屑10小时 #} + {% load_breadcrumb article %} {# 加载面包屑导航 #} {% endcache %} {% endif %} {% endif %}
- {% if isindex %} - {{ article.body|custom_markdown|escape|truncatechars_content }} -

Read more

+ {% if isindex %} + {# 首页文章摘要 #} + {{ article.body|custom_markdown|escape|truncatechars_content }} {# 截断显示 #} +

Read more

{# 阅读更多链接 #} {% else %} - + {# 文章详情页内容 #} {% if article.show_toc %} + {# 显示文章目录 #} {% get_markdown_toc article.body as toc %} {% trans 'toc' %}: - {{ toc|safe }} - -
+ {{ toc|safe }} {# 安全渲染HTML目录 #} +
{# 分隔线 #} {% endif %}
- - {{ article.body|custom_markdown|escape }} - + {# 完整文章内容 #} + {{ article.body|custom_markdown|escape }} {# 渲染Markdown内容 #}
{% endif %} -
+ {# 加载文章元数据(标签、分类等) #} {% load_article_metas article user %}
\ No newline at end of file