实验室链接
This commit is contained in:
parent
afe8229f86
commit
ec821a56c5
@ -94,19 +94,15 @@ archives:
|
||||
date_format: YYYY年MM月
|
||||
|
||||
#----------------------------
|
||||
# 友情链接
|
||||
# 常用链接
|
||||
#----------------------------
|
||||
friends:
|
||||
enable: false
|
||||
links:
|
||||
enable: true
|
||||
list:
|
||||
1:
|
||||
name: google
|
||||
title: 谷歌
|
||||
link: https://www.google.com.hk/
|
||||
2:
|
||||
name: youtube
|
||||
title: 油管
|
||||
link: https://www.youtube.com/
|
||||
name: 实验室
|
||||
link: /lab/
|
||||
target: _self
|
||||
|
||||
#----------------------------
|
||||
# 头部链接
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.friends.enable && theme.friends['list']) { %>
|
||||
<!-- 友情链接 -->
|
||||
<% if (theme.links.enable && theme.links['list']) { %>
|
||||
<!-- 常用链接 -->
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>友情链接</strong></h3>
|
||||
<%- partial('_widget/friend_links') %>
|
||||
<h3 class="widget-hd"><strong>常用链接</strong></h3>
|
||||
<%- partial('_widget/links') %>
|
||||
</section>
|
||||
<% } %>
|
||||
</aside>
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
<!-- 友情链接 -->
|
||||
<ul class="widget-bd">
|
||||
<% for (var i in theme.friends['list']) { %>
|
||||
<li>
|
||||
<a href="<%= list[i].link %>" target="_blank" title="<%= theme.friends['list'][i].title %>"><%= theme.friends['list'][i].name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
8
themes/hexo-theme-xups/layout/_widget/links.ejs
Normal file
8
themes/hexo-theme-xups/layout/_widget/links.ejs
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- 常用链接 -->
|
||||
<ul class="widget-bd">
|
||||
<% for (var i in theme.links['list']) { %>
|
||||
<li>
|
||||
<a href="<%= theme.links.list[i].link %>" target="<%= theme.links.list[i].target || '_blank' %>" ><%= theme.links.list[i].name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
Loading…
x
Reference in New Issue
Block a user