添加ICP

This commit is contained in:
2025-10-28 16:14:29 +08:00
parent 79e5962b35
commit 4b8b14889e

View File

@@ -2,3 +2,22 @@
To add an extended footer section, please create To add an extended footer section, please create
`layouts/partials/extended_footer.html` in your Hugo directory. `layouts/partials/extended_footer.html` in your Hugo directory.
--> -->
<div style="text-align:center;margin-top:10px;color:#939393;font-size:12px;">
{{ with site.Params.beian }}
{{/* 仅在存在 ICP 时显示 ICP 链接 */}}
{{ if .icp }}
<a href="{{ .icpLink }}" target="_blank" rel="noopener noreferrer nofollow" style="color:#939393;text-decoration:none;">
{{ .icp }}
</a>
{{ end }}
{{/* 仅当 police公安备案文案存在时才显示分隔符与公安备案链接 */}}
{{ if .police }}
{{ if .icp }}<span style="margin:0 8px;">|</span>{{ end }}
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .policeCode }}" target="_blank" rel="noopener noreferrer nofollow" style="color:#939393;text-decoration:none;">
{{ if .policeIcon }}<img src="{{ .policeIcon }}" alt="公安备案图标" style="display:inline-block;margin-right:3px;vertical-align:middle;height:14px;">{{ end }}
{{ .police }}
</a>
{{ end }}
{{ end }}
</div>