show social

i18n
xaoxuu 6 years ago
parent 02d8dba8aa
commit de7db6b03b
  1. 9
      _config.yml
  2. 23
      layout/_widget/about.ejs

@ -31,20 +31,13 @@ materialx:
widgets_about: widgets_about:
title: title:
motto: 永远不要忘了自己是谁,因为这个世界就不会。 motto: 永远不要忘了自己是谁,因为这个世界就不会。
social: true
# 网易云音乐歌单id # 网易云音乐歌单id
widgets_musicid: widgets_musicid:
# 侧边栏的友链 # 侧边栏的友链
widgets_links: widgets_links:
- name: xaoxuu - name: xaoxuu
url: https://xaoxuu.com url: https://xaoxuu.com
# 右边的联系信息小窗口
widgets_contacts:
- name: GitHub
desc: xaoxuu
url: https://github.com/xaoxuu
- name: 10086
desc: 测试打电话
url: tel:10086
# 页脚 # 页脚
footer_social: footer_social:
- slug: envelope - slug: envelope

@ -17,14 +17,17 @@
<% } %> <% } %>
</div> </div>
</div> </div>
<div class="social-wrapper"> <% if (config.materialx && config.materialx.widgets_about.social){ %>
<% (config.materialx && config.materialx.footer_social && (config.materialx.footer_social||[]) || (theme.materialx.footer_social||[])).forEach(function(value){ %> <div class="social-wrapper">
<% if (value.url && value.slug) { %> <% (config.materialx && config.materialx.footer_social && (config.materialx.footer_social||[]) || (theme.materialx.footer_social||[])).forEach(function(value){ %>
<a href="<%= value.url %>" class="social <%= value.slug %>" <% if (value.url && value.slug) { %>
target="_blank" rel="external"> <a href="<%= value.url %>" class="social <%= value.slug %>"
<i class="fa fa-<%= value.slug %> fa-fw"></i> target="_blank" rel="external">
</a> <i class="fa fa-<%= value.slug %> fa-fw"></i>
<%}%> </a>
<%})%> <%}%>
</div> <%})%>
</div>
<% } %>
</section> </section>

Loading…
Cancel
Save