Files
Hextra-AI-Insight-Daily/layouts/partials/custom/footer.html
何夕2077 c74aab7721 add seo
2025-06-27 04:28:27 +00:00

26 lines
1.1 KiB
HTML

<div class="footer-wrapper">
<div class="footer-container">
<ul class="footer-links">
{{- $pages := slice
(dict "id" "contact" "title" "联系我们")
(dict "id" "privacy-policy" "title" "隐私政策")
(dict "id" "terms-of-service" "title" "服务条款")
-}}
{{- /* 遍历列表,我们给当前遍历的字典起个名字叫 $page_dict */ -}}
{{- range $page_dict := $pages }}
{{- $path := path.Join .Page.Language.Lang $page_dict.id -}}
{{- /* 只用 with 来检查页面是否存在并获取链接,但不使用它的标题 */ -}}
{{- with site.GetPage $path -}}
<li><a href="{{ .RelPermalink }}">{{ $page_dict.title }}</a></li>
{{- end -}}
{{- end -}}
</ul>
<div class="footer-copyright">
{{- $copyright := printf "© %d %s" now.Year site.Title -}}
<a href="{{ "" | relLangURL }}">{{ $copyright | safeHTML }}</a>
</div>
</div>
</div>