add footer
This commit is contained in:
@@ -165,3 +165,10 @@ figcaption.post-caption {
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Footer 3-column grid on desktop */
|
||||||
|
@media (min-width: 48rem) {
|
||||||
|
.hextra-footer .footer-grid {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -88,6 +88,27 @@ params:
|
|||||||
width: normal
|
width: normal
|
||||||
icp: "粤ICP备2026061516号"
|
icp: "粤ICP备2026061516号"
|
||||||
gongan: "粤公网安备44010602015963号"
|
gongan: "粤公网安备44010602015963号"
|
||||||
|
columns:
|
||||||
|
- title: FuKun.Net
|
||||||
|
desc: |
|
||||||
|
央企TL、个人开发者、新晋奶爸。
|
||||||
|
记录技术与生活,探索自我边界。
|
||||||
|
- title: 站点
|
||||||
|
links:
|
||||||
|
- name: 博客
|
||||||
|
url: /
|
||||||
|
- name: 相册
|
||||||
|
url: https://gallery.fukun.net/share/mqmmlr4m
|
||||||
|
- name: 密码管理
|
||||||
|
url: https://pwd.fukun.net
|
||||||
|
- name: Git 仓库
|
||||||
|
url: https://git.fukun.net
|
||||||
|
- title: 链接
|
||||||
|
links:
|
||||||
|
- name: GitHub
|
||||||
|
url: https://github.com/fukunee
|
||||||
|
- name: RSS
|
||||||
|
url: /blog/index.xml
|
||||||
|
|
||||||
# 日期
|
# 日期
|
||||||
displayUpdatedDate: false
|
displayUpdatedDate: false
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
{{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}}
|
{{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}}
|
||||||
{{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}}
|
{{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}}
|
||||||
{{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}}
|
{{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}}
|
||||||
|
|
||||||
{{- $copyright := (T "copyright") | default "© 2024 Hextra." -}}
|
{{- $copyright := (T "copyright") | default "© 2024 Hextra." -}}
|
||||||
{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}}
|
{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}}
|
||||||
|
{{- $columns := .Site.Params.footer.columns -}}
|
||||||
<footer class="hextra-footer hx:bg-gray-100 hx:pb-[env(safe-area-inset-bottom)] hx:dark:bg-neutral-900 hx:print:bg-transparent">
|
<footer class="hextra-footer hx:bg-gray-100 hx:pb-[env(safe-area-inset-bottom)] hx:dark:bg-neutral-900 hx:print:bg-transparent">
|
||||||
{{- if $footerSwitchesVisible -}}
|
{{- if $footerSwitchesVisible -}}
|
||||||
<div class="hx:mx-auto hx:flex hx:gap-2 hx:py-2 hx:px-4 hextra-max-footer-width">
|
<div class="hx:mx-auto hx:flex hx:gap-2 hx:py-2 hx:px-4 hextra-max-footer-width">
|
||||||
@@ -16,6 +15,26 @@
|
|||||||
<hr class="hx:border-gray-200 hx:dark:border-neutral-800" />
|
<hr class="hx:border-gray-200 hx:dark:border-neutral-800" />
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if $columns -}}
|
||||||
|
<div class="hextra-max-footer-width hx:mx-auto hx:grid hx:grid-cols-1 footer-grid hx:gap-8 hx:py-12 hx:px-6 hx:text-gray-600 hx:dark:text-gray-400">
|
||||||
|
{{- range $columns -}}
|
||||||
|
<div>
|
||||||
|
<div class="hx:font-semibold hx:text-gray-800 hx:dark:text-gray-200 hx:mb-3">{{ .title }}</div>
|
||||||
|
{{- with .desc -}}
|
||||||
|
<div class="hx:text-sm hx:leading-relaxed hx:whitespace-pre-line">{{ . }}</div>
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .links -}}
|
||||||
|
<ul class="hx:space-y-2">
|
||||||
|
{{- range . -}}
|
||||||
|
{{- $isExternal := strings.HasPrefix .url "http" -}}
|
||||||
|
<li><a href="{{ .url }}" class="hx:text-sm hx:hover:text-gray-900 hx:dark:hover:text-gray-100 hx:transition-colors"{{ if $isExternal }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .name }}</a></li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
<div class="hextra-custom-footer hextra-max-footer-width hx:mx-auto hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-right),1.5rem)] hx:text-gray-600 hx:dark:text-gray-400">
|
<div class="hextra-custom-footer hextra-max-footer-width hx:mx-auto hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-right),1.5rem)] hx:text-gray-600 hx:dark:text-gray-400">
|
||||||
{{- partial "custom/footer.html" (dict "context" . "switchesVisible" $footerSwitchesVisible "copyrightVisible" $copyrightSectionVisible) -}}
|
{{- partial "custom/footer.html" (dict "context" . "switchesVisible" $footerSwitchesVisible "copyrightVisible" $copyrightSectionVisible) -}}
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +49,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- define "theme-credit" -}}
|
{{- define "theme-credit" -}}
|
||||||
<a class="hx:flex hx:text-sm hx:items-center hx:gap-1 hx:text-current" target="_blank" rel="noopener noreferrer" title="Hextra GitHub Homepage" href="https://github.com/imfing/hextra">
|
<a class="hx:flex hx:text-sm hx:items-center hx:gap-1 hx:text-current" target="_blank" rel="noopener noreferrer" title="Hextra GitHub Homepage" href="https://github.com/imfing/hextra">
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
Reference in New Issue
Block a user