From a2d3501a4d1b8d1bf05092dfeedc4152ead8bb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 16 May 2022 17:48:49 +0800 Subject: [PATCH] :construction: Add footer information in home page. --- assets/css/gemini/style.css | 16 ++++++++++- exampleSite/config.yaml | 26 ++++++++++++++++- i18n/en-us.toml | 5 +++- i18n/zh-cn.toml | 5 +++- layouts/_default/baseof.html | 4 +-- layouts/partials/footer.html | 54 ++++++++++++++++++++++++++--------- static/css/gemini/main.css | 1 - static/imgs/gongan.png | Bin 0 -> 869 bytes 8 files changed, 89 insertions(+), 22 deletions(-) create mode 100644 static/imgs/gongan.png diff --git a/assets/css/gemini/style.css b/assets/css/gemini/style.css index bd20ba0..8fd9dfe 100644 --- a/assets/css/gemini/style.css +++ b/assets/css/gemini/style.css @@ -154,8 +154,22 @@ text-align: center; } +.beian img { + display: inline-block; + margin: 0 3px; + vertical-align: middle; +} -/* Font A */ +.with-love { +{{- with $P.footer.icon.color }} + color: {{ $P.footer.icon.color }}; +{{- end }} +{{- if $P.footer.icon.animated }} + animation: icon-animate 1.33s ease-in-out infinite; +{{- end }} +} + +/* Font Awesome */ .fa-spin { -webkit-animation: fa-spin .8s infinite linear; animation: fa-spin .8s infinite linear; diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b91a925..c4e3fff 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -172,7 +172,31 @@ params: post: true # You can set a language value if you prefer a translated version of CC license, e.g. deed.zh # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org - # No setting is required here and can be done by multilanguage + # No required in here and can be done by multilanguage # language: deed.zh + + footer: + # Specify the year when the site was setup. If not defined, current year will be used. + since: 2016 + + # Icon between year and copyright info. + icon: + # Icon name in Font Awesome. See: https://fontawesome.com/icons + name: fa-solid fa-heart + # If you want to animate the icon, set it to true. + animated: true + # Change the color of icon, using Hex Code. + color: "#FF0000" + + # Powered by Hugo & NexT. + powered: true + + # Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn + beian: + enable: true + icp: 粤ICP备18047355号 + # The full num of gongan beian which use to query valid. + gonganNum: 11010102001808 + diff --git a/i18n/en-us.toml b/i18n/en-us.toml index 20bdbcf..a162721 100644 --- a/i18n/en-us.toml +++ b/i18n/en-us.toml @@ -43,4 +43,7 @@ [PostTag] other = "Tags" [PostReadMore] - other = "Read More" \ No newline at end of file + other = "Read More" + +[FooterPowerby] + other = "Power by %s" \ No newline at end of file diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml index a220c6a..63d0942 100644 --- a/i18n/zh-cn.toml +++ b/i18n/zh-cn.toml @@ -43,4 +43,7 @@ [PostTag] other = "标签" [PostReadMore] - other = "阅读全文" \ No newline at end of file + other = "阅读全文" + +[FooterPowerby] + other = "由 %s 强力驱动" \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a0c4510..dba76f4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -23,9 +23,7 @@ diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 52125aa..4f8fcb7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,14 +1,40 @@ - -
- 由 Hexo & - NexT.Gemini - - 强力驱动 -
\ No newline at end of file +{{ $ft := .Site.Params.footer }} + \ No newline at end of file diff --git a/static/css/gemini/main.css b/static/css/gemini/main.css index 9af029a..54da0bb 100644 --- a/static/css/gemini/main.css +++ b/static/css/gemini/main.css @@ -1661,7 +1661,6 @@ pre code { width: 100%; } .with-love { - color: #f00; display: inline-block; margin: 0 5px; } diff --git a/static/imgs/gongan.png b/static/imgs/gongan.png new file mode 100644 index 0000000000000000000000000000000000000000..1328a00b33a63ab2cf63d31a25d9ec9c03345e97 GIT binary patch literal 869 zcmV-r1DgDaP)Px$o={9wMNDaN?dh_>npMxSiQdbY>D-6ax^C>_x%TtU z$DUcemQvTeY{#EB;nJDbxhLh-jP>lb;@EiK)S&zIyX)qv-N~8ErEB2Ps>7FL#hy{b zpK#pAfzPyrzMECaq-e^nh26@J&97grnR3j&gVeum!Lfzj%zslvQaLYDvZ-g;z+L6q zkKxaMu9qj_(Q9d1Tg<+ebZBg&mw$|YXV?{XA`{D_D$%Vx$e$z5uxP;%4#ofg z0RdUtx+>138p)+h(5WEQu^HI5MbWP^003PR3qvRTjMW=Pgq z8@*&G(x5oJpCj48J)MFyG%H2OJ}AdAALGO&Nkmf2r(xK_Xs?wf)V4A<97K-*9N^Pz z7y?eK2@=nDEzf=?B^pGyrAl*dNaEph002zhfgLIUMAR`4U0X=ff<4}Q98Co`#IHIX z08TG5RA5g#)08~UmqE6pRL!Cy%Ar#vLITtP001;}QchC<4~QY0UA`9v{lfgpZ2X5W zmwFvfdgCb7tXsIcrQBDO_PCOPqCp~=(v{rPqjJ#+t{URv(B_*N6n-mNUCB~m7!Tb_Vn0tUS|^P&J|kGGP~69hp% zzC5e~0@;k2&nQW@ng`@tk=j&>dvwG1Udo-{zw+6DuWAy=-2QTNV4++nSL#%Q*$`-} zU8g?a($#hDx$EX)YXTW+PA_zpPA1crPrfSMFVH$mrzi-@oL)d~j%G!&glkMZ?oS;j zA`#4miv-Nfo;X3)2u5Re7N3yL?^EF+1PLMx7CamomSkL~J961E1Vh8PMkTcjQyNDI vW$Z!Jp&1$kq`wu@@=2{;uN{?-DTMJ4Ys)^y6~RNg00000NkvXXu0mjf<(`qV literal 0 HcmV?d00001