From be406906136e570e15f7476daef587f6896fcac8 Mon Sep 17 00:00:00 2001 From: KRLHY <65041981+KRLHY@users.noreply.github.com> Date: Sun, 11 Jun 2023 21:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E4=B8=8D=E6=98=BE=E7=A4=BAfo?= =?UTF-8?q?oter=E4=B8=AD=E7=9A=84since=E5=B9=B4=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since设置为false即不显示since年份,否则正常显示 --- layout/includes/footer.pug | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layout/includes/footer.pug b/layout/includes/footer.pug index 4d2ae79..0e4f513 100644 --- a/layout/includes/footer.pug +++ b/layout/includes/footer.pug @@ -2,10 +2,11 @@ if theme.footer.owner.enable - var now = new Date() - var nowYear = now.getFullYear() - if theme.footer.owner.since && theme.footer.owner.since != nowYear - .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}` - else - .copyright!= `©${nowYear} By ${config.author}` + if theme.footer.owner.since != false + if theme.footer.owner.since != nowYear + .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}` + else + .copyright!= `©${nowYear} By ${config.author}` if theme.footer.copyright .framework-info span= _p('footer.framework') + ' '