i18n
xaoxuu 6 years ago
parent 5ccecd437d
commit 6b4218101f
  1. 4
      _config.yml
  2. 9
      layout/_partial/side.ejs
  3. 2
      layout/_widget/author.ejs
  4. 2
      layout/_widget/categories.ejs
  5. 2
      layout/_widget/links.ejs
  6. 2
      layout/_widget/music.ejs
  7. 2
      layout/_widget/tagcloud.ejs
  8. 35
      source/less/_widget.less

@ -29,7 +29,9 @@ nav_menu:
# widgets:
# - icon: fas fa-bullhorn
# title: 注意啦
# body: '本站使用 <b><a href="https://xaoxuu.com/wiki/material-x/">Material X</a></b> 作为主题,喜欢这个主题的朋友可以阅读文档进行安装哦。超喜欢的话还可以安利给身边的朋友哦。'
# body: '本站使用 <b><a href="https://xaoxuu.com/wiki/material-x/">Material X</a></b> 作为主题,喜欢这个主题的朋友可以阅读文档进行安装哦,超喜欢的话还可以安利给身边的朋友哦~'
# more: # 可选,默认为空
# icon: fas fa-question-circle # 可选,默认为“fas fa-question-circle”
# url: https://xaoxuu.com/wiki/material-x/
# 友链的写法示例

@ -4,13 +4,16 @@
<% } %>
<% if (config.widgets){ %>
<% (config.widgets||[]).forEach(function(item){ %>
<section class='m_widget mywidgets'>
<section class='m_widget' id='mywidget'>
<% if(item.icon && item.title) { %>
<header class='header <%= theme.style %>'>
<div><i class="<%= item.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= item.title %></div>
<% if(item.url) { %>
<a class="rightBtn" target="_blank" rel="external nofollow noopener noreferrer" href="<%= item.url %>"><i class="fas fa-question-circle fa-fw"></i></a>
<% if(item.more && item.more.url) { %>
<a class="rightBtn" target="_blank" rel="external nofollow noopener noreferrer" href="<%= item.more.url %>">
<i class="<%= item.more.icon?item.more.icon:'fas fa-question-circle' %> fa-fw"></i></a>
<%} %>
</header>
<%} %>
<div class='content <%= theme.style %>'>
<%- item.body %>
</div>

@ -1,5 +1,5 @@
<% if(theme.widgets.author.enable != false) { %>
<section class='m_widget author'>
<section class='m_widget' id='author'>
<% if(theme.widgets.author.avatar) { %>
<div class='header'>
<img class='avatar' src='<%= url_for(config.avatar ? config.avatar : "https://img.vim-cn.com/a4/87a96e2e01b1180bba1e76e190df5220378c1a.png") %>'/>

@ -1,4 +1,4 @@
<section class='m_widget categories'>
<section class='m_widget' id='categories'>
<header class='header <%= theme.style %>'>
<div><i class="<%= theme.widgets.categories.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.categories.title %></div>
</header>

@ -1,4 +1,4 @@
<section class='m_widget links'>
<section class='m_widget' id='links'>
<header class='header <%= theme.style %>'>
<div><i class="<%= theme.widgets.links.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.links.title %></div>
<% if(config.title && theme.widgets.links.mailto) { %>

@ -1,4 +1,4 @@
<section class='m_widget music'>
<section class='m_widget' id='music'>
<header class='header <%= theme.style %>'>
<div><i class="<%= theme.widgets.music.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.music.title %></div>
<a class="rightBtn" target="_blank" rel="external nofollow noopener noreferrer" href="<%= theme.widgets.music.link %>"><i class="far fa-heart fa-fw"></i></a>

@ -1,5 +1,5 @@
<% if (site.tags.length){ %>
<section class='m_widget tagcloud'>
<section class='m_widget' id='tagcloud'>
<header class="header <%= theme.style %>">
<div><i class="<%= theme.widgets.tagcloud.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.tagcloud.title %></div>
</header>

@ -93,8 +93,7 @@
}
}
.m_widget.author{
&#author{
.enable-trans();
h2{
text-align: center;
@ -161,9 +160,9 @@
}
}
}
}
}
.m_widget.mywidgets{
&#mywidget{
.content{
font-size: @fontsize_small;
font-weight: bold;
@ -185,17 +184,18 @@
}
}
}
}
.m_widget.categories{
}
&#categories{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
}
}
}
.m_widget.tagcloud{
&#tagcloud{
.content{
text-align: justify;
padding: @gap/2 @gap;
@ -212,17 +212,9 @@
}
}
}
}
.m_widget.contacts{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
}
}
.m_widget.music{
&#music{
.header{
&.pure{
padding-bottom: @gap/4; // 适合白色导航栏背景
@ -238,8 +230,10 @@
border-radius: 4px;
}
}
}
.m_widget.links{
}
&#links{
.header{
.rightBtn{
&:hover{
@ -263,4 +257,7 @@
}
}
}
}
}

Loading…
Cancel
Save