From 8fb8c9e852bae5af6060173e48f9b7927abdd29e Mon Sep 17 00:00:00 2001 From: fukunee Date: Tue, 26 May 2026 12:14:01 +0800 Subject: [PATCH] add footer --- assets/css/custom.css | 7 +++++++ hugo.yaml | 21 +++++++++++++++++++++ layouts/_partials/footer.html | 24 +++++++++++++++++++++--- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/assets/css/custom.css b/assets/css/custom.css index 5a84afa..2c4834a 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -165,3 +165,10 @@ figcaption.post-caption { height: auto; } */ + +/* Footer 3-column grid on desktop */ +@media (min-width: 48rem) { + .hextra-footer .footer-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} diff --git a/hugo.yaml b/hugo.yaml index fe96326..66eefd6 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -88,6 +88,27 @@ params: width: normal icp: "粤ICP备2026061516号" 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 diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index e1477b0..7047c9d 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -2,10 +2,9 @@ {{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}} {{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}} {{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}} - {{- $copyright := (T "copyright") | default "© 2024 Hextra." -}} {{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}} - +{{- $columns := .Site.Params.footer.columns -}} - {{- define "theme-credit" -}}