Skip to content

Commit e7cb759

Browse files
authored
Merge pull request #368 from luijp/dev
fix: fix the footer copyright period when it is within the same year
2 parents 240364b + c999714 commit e7cb759

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layout/_partial/footer.ejs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const has_count_info = show_pv || show_uv || show_word_count
2525
%>
2626
<footer class="footer border-box">
2727
<div class="copyright-info info-item">
28-
&copy;&nbsp;<% if (f_since) { %><span><%= f_since %></span>&nbsp;-&nbsp;<% } %><%= date(new Date(), 'YYYY') %>
28+
&copy;&nbsp;<% if (f_since) { %>
29+
<span><%= f_since %></span>
30+
<% } if(f_since != date(new Date(), 'YYYY')) {%>
31+
&nbsp;-&nbsp;<%= date(new Date(), 'YYYY') %>
32+
<% } %>
2933
<% if (web_master) { %>
3034
&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;&nbsp;<a href="<%- url_for('/') %>"><%= web_master %></a>
3135
<% } %>

0 commit comments

Comments
 (0)