fix(footer): propagate footer links from config

This commit is contained in:
MDLeom 2020-03-06 11:05:51 +00:00
parent 46cca09188
commit 397eadae2a
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
3 changed files with 10 additions and 4 deletions

View File

@ -13,7 +13,6 @@ timezone:
# URL # URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://mdleom.com url: https://mdleom.com
onion: http://xw226dvxac7jzcpsf4xb64r4epr6o5hgn46dxlqk7gnjptakik6xnzqd.onion
root: / root: /
permalink: blog/:year/:month/:day/:title/ permalink: blog/:year/:month/:day/:title/
permalink_defaults: permalink_defaults:
@ -94,6 +93,10 @@ theme_config:
Feed: /atom.xml Feed: /atom.xml
GitLab: https://gitlab.com/curben/blog GitLab: https://gitlab.com/curben/blog
footer:
Disclaimer: /disclaimer/
Onion: http://xw226dvxac7jzcpsf4xb64r4epr6o5hgn46dxlqk7gnjptakik6xnzqd.onion
# Your Feed Location # Your Feed Location
# https://github.com/hexojs/hexo-generator-feed # https://github.com/hexojs/hexo-generator-feed
rss: /atom.xml rss: /atom.xml

View File

@ -8,6 +8,9 @@
<hr> <hr>
<% } %> <% } %>
<div id="copyright" class="copyright"> <div id="copyright" class="copyright">
&copy; 2018-<%= date(new Date(), 'YYYY') %> <%= config.author %>. <%- link('https://gitlab.com/curben/blog', 'Powered by ') %> <%- link('https://hexo.io/', 'Hexo') %> with <%- link('https://gitlab.com/curben/blog/tree/master/themes/chameleon', 'Chameleon') %> theme. <br/>Content is available under <a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="license" itemprop="license">CC-BY-SA 4.0</a>, unless indicated otherwise. <br/><%- link('/disclaimer/', 'Disclaimer') %>&emsp;<%- link(config.onion, '.Onion') %> &copy; 2018-<%= date(new Date(), 'YYYY') %> <%= config.author %>. <%- link('https://gitlab.com/curben/blog', 'Powered by ') %> <%- link('https://hexo.io/', 'Hexo') %> with <%- link('https://gitlab.com/curben/blog/tree/master/themes/chameleon', 'Chameleon') %> theme. <br/>Content is available under <a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="license" itemprop="license">CC-BY-SA 4.0</a>, unless indicated otherwise.<br/>
<% for (const i in theme.footer) { %>
<a class="main-nav-link" href="<%- url_for(theme.footer[i]) %>"><%= i %></a>
<% } %>
</div> </div>
</footer> </footer>

View File

@ -1,7 +1,7 @@
<header id="header" class="header"> <header id="header" class="header">
<%/* Nav menu for desktop */%> <%/* Nav menu for desktop */%>
<nav id="main-nav" class="main-nav"> <nav id="main-nav" class="main-nav">
<% for (let i in theme.menu) { %> <% for (const i in theme.menu) { %>
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a> <a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
<% } %> <% } %>
@ -46,7 +46,7 @@
</form> </form>
</div> </div>
<i>Powered by DuckDuckGo</i> <i>Powered by DuckDuckGo</i>
<% for (let i in theme.menu) { %> <% for (const i in theme.menu) { %>
<a class="mobile-nav-link-a" href="<%- url_for(theme.menu[i]) %>"><%= i %></a> <a class="mobile-nav-link-a" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
<% } %> <% } %>
</ul> </ul>