perf: optimize footer and configuration

This commit is contained in:
XPoet 2021-01-29 10:53:31 +08:00
parent 374cbbe944
commit 7da5563765
2 changed files with 3 additions and 4 deletions

View File

@ -227,8 +227,8 @@ pjax:
# Footer settings # Footer settings
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
footer: footer:
since: 2020 since: 2020 # the starting year of your website, Can be null
icp: icp: # ICP record number of your website, Can be null
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
<div class="info-container"> <div class="info-container">
<div class="copyright-info info-item"> <div class="copyright-info info-item">
&copy; &copy;
<% if (theme.footer.since) { %> <% if (theme.footer.hasOwnProperty('since') && theme.footer.since) { %>
<span><%= theme.footer.since %></span>&nbsp;-&nbsp; <span><%= theme.footer.since %></span>&nbsp;-&nbsp;
<% } %> <% } %>
<%= date(new Date(), 'YYYY') %>&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/"><%= theme.base_info.author || config.author %></a> <%= date(new Date(), 'YYYY') %>&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/"><%= theme.base_info.author || config.author %></a>
@ -28,6 +28,5 @@
<% if (theme.footer.hasOwnProperty('icp') && theme.footer.icp) { %> <% if (theme.footer.hasOwnProperty('icp') && theme.footer.icp) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn"><%= theme.footer.icp %></a></div> <div class="icp-info info-item"><a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn"><%= theme.footer.icp %></a></div>
<% } %> <% } %>
</div> </div>
</footer> </footer>