Skip to content

Commit

Permalink
fix: Supporting the config item of 'copyright: since/end' in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Sep 17, 2019
1 parent 20050f3 commit 7310163
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layout/_partials/footer/footer.pug
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-
var footer = theme.footer;
var nowYear = new Date().getFullYear();
var startYear = copyright ? footer.copyright.since || nowYear : nowYear;
var endYear = copyright ? footer.copyright.end || nowYear : nowYear;
var startYear = footer.copyright.since || nowYear;
var endYear = footer.copyright.end || nowYear;
var fa_prefix = theme.fa_prefix || 'fa';
- var footerCopyright = footer.copyright.enable
Expand All @@ -11,7 +11,7 @@
if footerCopyright || footerBeian
div
if footerCopyright
span!= `© ${startYear}` + (startYear != endYear ? `-${endYear}` : "")
span!= `© ${startYear}` + ((startYear != endYear) ? `~${endYear}` : "")
if footer.icon.enable
span(class=`${fa_prefix} fa-${footer.icon.name} footer-icon`)
else
Expand Down

0 comments on commit 7310163

Please sign in to comment.