forked from plhw57tbe/SoftwareMethodology
parent
244fbca94d
commit
182a742f85
@ -1,59 +1,65 @@
|
||||
{% load i18n %}
|
||||
{% load blog_tags %}
|
||||
|
||||
{% load i18n %} {# 加载国际化标签,支持多语言翻译 #}
|
||||
{% load blog_tags %} {# 加载自定义博客标签 #}
|
||||
|
||||
<footer class="entry-meta">
|
||||
{% trans 'posted in' %}
|
||||
<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>
|
||||
|
||||
|
||||
{# 文章分类信息 #}
|
||||
{% trans 'posted in' %} {# 翻译:"发表于" #}
|
||||
<a href="{{ article.category.get_absolute_url }}" rel="category tag">
|
||||
{{ article.category.name }} {# 显示分类名称 #}
|
||||
</a>
|
||||
{% if article.type == 'a' %}
|
||||
{% if article.tags.all %}
|
||||
|
||||
{% trans 'and tagged' %}
|
||||
{# 文章标签信息(仅对文章类型显示) #}
|
||||
{% if article.type == 'a' %} {# 如果是文章类型(非页面等) #}
|
||||
{% if article.tags.all %} {# 如果有标签 #}
|
||||
{% trans 'and tagged' %} {# 翻译:"和标签" #}
|
||||
{# 循环遍历所有标签 #}
|
||||
{% for t in article.tags.all %}
|
||||
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a>
|
||||
<a href="{{ t.get_absolute_url }}" rel="tag">
|
||||
{{ t.name }} {# 显示标签名称 #}
|
||||
</a>
|
||||
{# 如果不是最后一个标签,添加逗号分隔 #}
|
||||
{% if t != article.tags.all.last %}
|
||||
,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
.{% trans 'by ' %}
|
||||
|
||||
.{% trans 'by ' %} {# 翻译:"由" #}
|
||||
|
||||
{# 作者信息 #}
|
||||
<span class="by-author">
|
||||
<span class="author vcard">
|
||||
<a class="url fn n" href="{{ article.author.get_absolute_url }}"
|
||||
{% blocktranslate %}
|
||||
<a class="url fn n"
|
||||
href="{{ article.author.get_absolute_url }}"
|
||||
{% blocktranslate %} {# 翻译块 #}
|
||||
title="View all articles published by {{ article.author.username }}"
|
||||
{% endblocktranslate %}
|
||||
{% endblocktranslate %}
|
||||
rel="author">
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
|
||||
<span itemprop="name" itemprop="publisher">
|
||||
|
||||
{{ article.author.username }}
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name" itemprop="publisher">
|
||||
{{ article.author.username }} {# 显示作者用户名 #}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
{% trans 'on' %} {# 翻译:"于" #}
|
||||
|
||||
{# 发布时间信息 #}
|
||||
<a href="{{ article.get_absolute_url }}"
|
||||
title="{% datetimeformat article.pub_time %}" {# 使用自定义过滤器格式化时间 #}
|
||||
itemprop="datePublished"
|
||||
content="{% datetimeformat article.pub_time %}"
|
||||
rel="bookmark">
|
||||
<time class="entry-date updated" datetime="{{ article.pub_time }}">
|
||||
{% datetimeformat article.pub_time %} {# 显示格式化后的发布时间 #}
|
||||
</time>
|
||||
</a>
|
||||
|
||||
|
||||
</span>
|
||||
{% trans 'on' %}
|
||||
<a href="{{ article.get_absolute_url }}"
|
||||
title="{% datetimeformat article.pub_time %}"
|
||||
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
|
||||
rel="bookmark">
|
||||
|
||||
<time class="entry-date updated"
|
||||
datetime="{{ article.pub_time }}">
|
||||
{% datetimeformat article.pub_time %}</time>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a>
|
||||
{% endif %}
|
||||
|
||||
{# 管理员编辑链接 #}
|
||||
{% if user.is_superuser %} {# 如果是超级用户 #}
|
||||
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a> {# 显示编辑链接 #}
|
||||
{% endif %}
|
||||
</span>
|
||||
</footer><!-- .entry-meta -->
|
||||
|
||||
|
||||
</footer><!-- .entry-meta -->
|
||||
Loading…
Reference in new issue