pull/13/head
孙慧 4 months ago
parent 8c84dc4319
commit 41e73d391e

@ -1,13 +1,13 @@
{% load i18n %}
<div class="widget-login">
{% if apps %}
<small>
{% trans 'quick login' %}:
{% load i18n %} {# 加载国际化模板标签,用于多语言支持 #}
<div class="widget-login"> {# 登录小部件的容器,定义样式类 #}
{% if apps %} {# 判断apps变量是否存在即是否有第三方登录方式 #}
<small> {# 小型文本容器,用于显示“快速登录”标签 #}
{% trans 'quick login' %}: {# 国际化翻译“快速登录”文本 #}
</small>
{% for icon,url in apps %}
<a href="{{ url }}" rel="nofollow">
<span class="icon-sn-{{ icon }}"></span>
{% for icon,url in apps %} {# 遍历apps列表每个元素包含图标标识和登录链接 #}
<a href="{{ url }}" rel="nofollow"> {# 第三方登录链接添加nofollow属性防止SEO权重传递 #}
<span class="icon-sn-{{ icon }}"></span> {# 第三方登录图标通过icon变量拼接样式类 #}
</a>
{% endfor %}
{% endif %}
</div>
{% endfor %} {# 结束apps列表的遍历 #}
{% endif %} {# 结束apps存在性的判断 #}
</div> {# 关闭登录小部件的容器 #}

Loading…
Cancel
Save