i18n
xaoxuu 6 years ago
parent d3669ee665
commit fc723dcc11
  1. 87
      _config.yml
  2. 2
      layout/_partial/head.ejs
  3. 2
      layout/_partial/meta.ejs
  4. 2
      layout/_partial/scripts.ejs
  5. 82
      layout/_partial/side.ejs
  6. 28
      layout/_widget copy/author.ejs
  7. 0
      layout/_widget copy/categories.ejs
  8. 0
      layout/_widget copy/links.ejs
  9. 59
      layout/_widget copy/music.ejs
  10. 16
      layout/_widget copy/tagcloud.ejs
  11. 11
      layout/_widget copy/toc.ejs
  12. 46
      layout/_widget/author.ejs
  13. 7
      layout/_widget/category.ejs
  14. 19
      layout/_widget/list.ejs
  15. 21
      layout/_widget/music.ejs
  16. 1
      layout/_widget/plain.ejs
  17. 23
      layout/_widget/tagcloud.ejs
  18. 12
      layout/_widget/toc.ejs
  19. 5
      source/js/app.js
  20. 4
      source/less/_toc.less
  21. 232
      source/less/_widget.less

@ -1,81 +1,29 @@
#####################################
## Material X ##
## version: 1.0 beta7 ##
## updated: 2018-12-22 ##
#####################################
# >> 主题配置写法示例 ---------------------------------------------------------------------
# ⚠ 注意:这里的内容需要复制到主目录到config中才有效,写在这里是为了提供参考
# 支持google字体 在这里选好你需要的字体:https://fonts.google.com,然后在_defines.less中修改font_family。
google_fonts: 'Skranji|Ubuntu' # 多个字体中间用英文竖线隔开
# 导航栏,url必须以 "/" 结尾
nav_menu:
- name: 主页
icon: fas fa-home
url: https://xaoxuu.com/
- name: 项目
icon: fas fa-flask
url: https://xaoxuu.com/projects/
- name: 博客
icon: fas fa-rss
url: /
- name: 归档
icon: fas fa-archive
url: archives/
- name: 关于
icon: fas fa-user
url: https://xaoxuu.com/about/
# 可以添加自定义侧边栏控件,支持的参数如下:
# widgets:
# - icon: fas fa-bullhorn
# title: 注意啦
# 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/
# 友链的写法示例
links:
- name:
avatar:
url:
# 页脚社交信息的写法示例
social:
- icon: fas fa-envelope
url: mailto:me@xaoxuu.com
- icon: fab fa-github
url: https://github.com/xaoxuu
- icon: fas fa-music
url: https://music.163.com/#/user/home?id=63035382
# 博主信息的写法示例
avatar: https://xaoxuu.com/assets/img/avatar.jpg
title: 博客名称
motto: 这是我的座右铭
# 百度统计key
baidu_analytics_key: xxx
# >> 主题配置 ---------------------------------------------------------------------
# ✅ 这里的内容直接在下面进行修改
##########################################################################
############################## 主题基本信息 ################################
theme_info:
name: Material X
version: 1.0-beta10
docs: https://xaoxuu.com/wiki/material-x/
# 主题的CDN地址,如果你的源码托管到国内CDN可以更改此链接。如需启用CDN,请在主目录的config中设置import,详见文档。
cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@18.12.29/
##########################################################################
# 请务必阅读官方文档!!!
# 请务必阅读官方文档!!!
# 请务必阅读官方文档!!!
# style: material # 导航栏和标题栏背景是主题色
style: pure # 导航栏和标题栏背景是白色
# 右边的小窗口,不想显示哪一项的把enable设置为false即可
widgets:
# 博主信息区,是否显示个人头像、格言、社交信息等
author:
enable: true
avatar: true # 是否显示头像,如果是,需要在主目录的config中写avatar的URL
title: false # 是否显示博客名、头衔等等。如果是,需要在主目录的config中写title
motto: false # 是否显示格言座右铭等等。如果是,需要在主目录的config中写motto
title: true # 是否显示博客名、头衔等等。如果是,需要在主目录的config中写title
motto: true # 是否显示格言座右铭等等。如果是,需要在主目录的config中写motto
social: true # 是否显示社交信息(内容同页脚的社交信息)如果是,需要在主目录的config中写social,支持icon和URL
# 显示文章分类
categories:
@ -86,7 +34,7 @@ widgets:
tagcloud:
enable: true
icon: fas fa-tags
title: "热门标签"
title: "热门话题"
# 显示音乐播放器
music:
enable: true
@ -153,6 +101,3 @@ search:
# Less
less:
compress: true
# 主题的CDN地址
themecdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@18.12.29/

@ -53,7 +53,7 @@
<!-- style.css -->
<% if (config.import && config.import.style == true) { %>
<%- css(theme.themecdn + 'css/style.css') %>
<%- css(theme.theme_info.cdn + 'css/style.css') %>
<% } else if (config.import && config.import.style && config.import.style.length > 0){ %>
<%- css(config.import.style) %>
<% } else { %>

@ -5,13 +5,13 @@
} %>
<section class='meta'>
<% if((!isPostList && post.music && post.music.enable) || (isPostList && post.music && post.music.enable == true)){ %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
<div class="aplayer" data-mini=true
data-mode="circulation" data-volume="0.7"
data-server="<%= post.music.server %>"
data-type="<%= post.music.type %>"
data-id="<%= post.music.id %>">
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>
<% } %>

@ -30,7 +30,7 @@
<% if (config.import && config.import.js == true) { %>
<%- js([theme.themecdn + 'js/app.js', theme.themecdn + 'js/search.js']) %>
<%- js([theme.theme_info.cdn + 'js/app.js', theme.theme_info.cdn + 'js/search.js']) %>
<% } else if (config.import && config.import.js && config.import.js.length > 0) { %>
<%- js(config.import.js) %>
<% } else { %>

@ -1,46 +1,44 @@
<% if (theme.widgets){ %>
<% if (theme.widgets.author.enable){ %>
<%- partial('../_widget/author') %>
<% } %>
<% if (config.widgets){ %>
<% (config.widgets||[]).forEach(function(item){ %>
<section class='mywidget' id='<%- item.type ? item.type : '' %>'>
<% 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.more && item.more.url) { %>
<a class="rightBtn" target="_blank" rel="external nofollow noopener noreferrer" href="<%= url_for(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 %>'>
<% if(item.type == 'list') { %>
<ul class="entry">
<% (item.rows||[]).forEach(function(row){ %>
<li><a class="flat-box" href="<%= url_for(row.url) %>"><i class="<%= row.icon %> fa-fw"></i><div class='name'><%= row.name %></div></a>
<% }) %>
</ul>
<% } else { %>
<%- item.body %>
<% if (config.widgets){ %>
<% (config.widgets||[]).forEach(function(item){ %>
<% if (item.enable != false){ %>
<%
let widget_name = item.widget ? item.widget : 'plain';
var needDisplay = true;
if (needDisplay == true && widget_name == 'toc') {
if (page.layout != 'post' || !page.content || page.toc == false || toc(page.content).length == 0) {
needDisplay = false;
}
}
if (needDisplay == true && widget_name == 'music') {
if (page.layout != 'post' || !page.content || page.toc == false || toc(page.content).length == 0) {
needDisplay = false;
}
}
if (needDisplay) {
needDisplay = ((widget_name != 'toc') || (page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0));
}
%>
<% if (needDisplay){ %>
<section class='<%- widget_name == 'toc' ? 'toc-wrapper' : widget_name %>'>
<% if (widget_name != 'author'){ %>
<header class='<%= theme.style %>'>
<div><i class="<%- item.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%- item.title %></div>
<% if (widget_name == 'toc') { %>
<div class='wrapper'><a class="s-toc rightBtn" title="固定到顶部" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
<% } else if(item.more && item.more.url) { %>
<a class="rightBtn<%- item.more.animation ? ' ' + item.more.animation : '' %>" target="_blank"
rel="external nofollow noopener noreferrer"
href="<%- url_for(item.more.url) %>"
title="<%- item.more.url %>">
<i class="<%- item.more.icon?item.more.icon:'fas fa-question-circle' %> fa-fw"></i></a>
<% } %>
</div>
</header>
<% } %>
<div class='content <%= theme.style %>'>
<%- partial('../_widget/' + widget_name, {item: item}) %>
</div>
</section>
<% }) %>
<% } %>
<% if (theme.widgets.categories.enable){ %>
<%- partial('../_widget/categories') %>
<% } %>
<% if (theme.widgets.tagcloud.enable){ %>
<%- partial('../_widget/tagcloud') %>
<% } %>
<% if (theme.widgets.toc.enable){ %>
<%- partial('../_widget/toc') %>
<% } %>
<% if (theme.widgets.music.enable){ %>
<%- partial('../_widget/music') %>
<% } %>
<% if (theme.widgets.links.enable){ %>
<%- partial('../_widget/links') %>
<% } %>
<% } %>
<% }) %>
<% } %>

@ -0,0 +1,28 @@
<% if(theme.widgets.author.enable != false) { %>
<section class='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") %>'/>
</div>
<%} %>
<% if (theme.widgets.author.title == true || theme.widgets.author.motto == true){ %>
<div class='content'>
<% if (theme.widgets.author.title == true){ %>
<h2><%= config.title %></h2>
<% } %>
<% if (theme.widgets.author.motto){ %>
<p><%= config.motto %></p>
<% } %>
</div>
<% } %>
<% if (theme.widgets.author.social == true && config.social){ %>
<div class="social-wrapper">
<% (config.social||[]).forEach(function(value){ %>
<% if (value.url && value.icon) { %>
<a href="<%= url_for(value.url) %>" class="social flat-btn" target="_blank" rel="external"><i class="social <%= value.icon %>" aria-hidden="true"></i></a>
<%}%>
<%})%>
</div>
<% } %>
</section>
<% } %>

@ -0,0 +1,59 @@
<%
var needDisplay = false;
if (theme.widgets.music && theme.widgets.music.display) {
let display = theme.widgets.music.display;
if (page.layout == 'page') {
if (display.page != false) {
needDisplay = true;
}
} else if (page.layout == 'post') {
if (display.post != false && (!page.music || page.music.enable == false)) {
needDisplay = true;
}
} else if (page.layout == 'links') {
if (display.links != false) {
needDisplay = true;
}
} else {
if (is_home()) {
if (display.home != false) {
needDisplay = true;
}
} else if (is_tag()) {
if (display.tag != false) {
needDisplay = true;
}
} else if (is_category()) {
if (display.category != false) {
needDisplay = true;
}
} else if (is_archive()) {
if (display.archive != false) {
needDisplay = true;
}
} else {
needDisplay = true;
}
}
}
%>
<% if (needDisplay == true) { %>
<section class='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="<%= url_for(theme.widgets.music.link) %>"><i class="far fa-heart fa-fw"></i></a>
</header>
<div class='content <%= theme.style %>'>
<div class="aplayer" data-theme="<%= theme.widgets.music.color %>"
data-mode="<%= theme.widgets.music.mode %>"
data-server="<%= theme.widgets.music.server %>"
data-type="<%= theme.widgets.music.type %>"
data-id="<%= theme.widgets.music.id %>"
data-volume="<%= theme.widgets.music.volume %>"></div>
</div>
</section>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>
<% } %>

@ -0,0 +1,16 @@
<% if (site.tags.length){ %>
<section class='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>
<div class='content <%= theme.style %>'>
<%- tagcloud(site.tags, {
min_font: 14,
max_font: 24,
color: true,
start_color: '#999',
end_color: '#555',
}) %>
</div>
</section>
<% } %>

@ -0,0 +1,11 @@
<% if(page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0){ %>
<section class='toc-wrapper'>
<header class="header <%= theme.style %>">
<div><i class="<%= theme.widgets.toc.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.toc.title %></div>
<div class='wrapper'><a class="s-toc rightBtn" title="固定到顶部" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
</header>
<div class='content <%= theme.style %>'>
<%- toc(page.content, {list_number: false}) %>
</div>
</section>
<% } %>

@ -1,28 +1,24 @@
<% if(theme.widgets.author.enable != false) { %>
<section class='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") %>'/>
</div>
<%} %>
<% if (theme.widgets.author.title == true || theme.widgets.author.motto == true){ %>
<div class='content'>
<% if (theme.widgets.author.title == true){ %>
<h2><%= config.title %></h2>
<% } %>
<% if (theme.widgets.author.motto){ %>
<p><%= config.motto %></p>
<% } %>
</div>
<% if(item.avatar) { %>
<div class='avatar'>
<img class='avatar' src='<%- url_for(item.avatar) %>'/>
</div>
<%} %>
<% if (item.title || item.body) { %>
<div class='text'>
<% if (item.title){ %>
<h2><%- item.title %></h2>
<% } %>
<% if (theme.widgets.author.social == true && config.social){ %>
<div class="social-wrapper">
<% (config.social||[]).forEach(function(value){ %>
<% if (value.url && value.icon) { %>
<a href="<%= url_for(value.url) %>" class="social flat-btn" target="_blank" rel="external"><i class="social <%= value.icon %>" aria-hidden="true"></i></a>
<%}%>
<%})%>
</div>
<% if (item.body){ %>
<%- markdown(item.body) %>
<% } %>
</section>
</div>
<% } %>
<% if (item.social == true && config.social) { %>
<div class="social-wrapper">
<% (config.social||[]).forEach(function(value){ %>
<% if (value.url && value.icon) { %>
<a href="<%- url_for(value.url) %>" class="social flat-btn" target="_blank" rel="external"><i class="social <%- value.icon %>" aria-hidden="true"></i></a>
<%}%>
<%})%>
</div>
<% } %>

@ -0,0 +1,7 @@
<% if (site.categories.length){ %>
<ul class="entry">
<% site.categories.sort('name').each(function(category){ %>
<li><a class="flat-box" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'>(共<%- category.posts.length %>篇)</div></a></li>
<% }) %>
</ul>
<% } %>

@ -0,0 +1,19 @@
<ul class="entry">
<% (item.rows||[]).forEach(function(row){ %>
<li><a class="flat-box" title="<%- row.url %>" href="<%= url_for(row.url) %>">
<div class='name'>
<% if(row.img) { %>
<img src="<%- row.img %>">
<% } else if(row.avatar) { %>
<img src="<%- row.avatar %>" id="round">
<% } else { %>
<i class="<%= row.icon %>" aria-hidden="true"></i>
<% } %>
&nbsp;&nbsp;<%- row.name %>
</div>
<% if(row.desc) { %>
<div class='badge'>(<%- row.desc %>)</div>
<% } %>
</a></li>
<% }) %>
</ul>

@ -39,21 +39,14 @@ if (theme.widgets.music && theme.widgets.music.display) {
%>
<% if (needDisplay == true) { %>
<section class='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="<%= url_for(theme.widgets.music.link) %>"><i class="far fa-heart fa-fw"></i></a>
</header>
<div class='content <%= theme.style %>'>
<div class="aplayer" data-theme="<%= theme.widgets.music.color %>"
data-mode="<%= theme.widgets.music.mode %>"
data-server="<%= theme.widgets.music.server %>"
data-type="<%= theme.widgets.music.type %>"
data-id="<%= theme.widgets.music.id %>"
data-volume="<%= theme.widgets.music.volume %>"></div>
</div>
</section>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
<div class="aplayer" data-theme="<%= theme.widgets.music.color %>"
data-mode="<%= theme.widgets.music.mode %>"
data-server="<%= theme.widgets.music.server %>"
data-type="<%= theme.widgets.music.type %>"
data-id="<%= theme.widgets.music.id %>"
data-volume="<%= theme.widgets.music.volume %>">
</div>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>
<% } %>

@ -0,0 +1 @@
<%- markdown(item.body) %>

@ -1,16 +1,7 @@
<% if (site.tags.length){ %>
<section class='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>
<div class='content <%= theme.style %>'>
<%- tagcloud(site.tags, {
min_font: 14,
max_font: 24,
color: true,
start_color: '#999',
end_color: '#555',
}) %>
</div>
</section>
<% } %>
<%- tagcloud(site.tags, {
min_font: 14,
max_font: 24,
color: true,
start_color: '#999',
end_color: '#555',
}) %>

@ -1,11 +1,5 @@
<% if(page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0){ %>
<section class='toc-wrapper'>
<header class="header <%= theme.style %>">
<div><i class="<%= theme.widgets.toc.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%= theme.widgets.toc.title %></div>
<div class='wrapper'><a class="s-toc rightBtn" title="固定到顶部" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
</header>
<div class='content <%= theme.style %>'>
<%- toc(page.content, {list_number: false}) %>
</div>
</section>
<div class='content <%= theme.style %>'>
<%- toc(page.content, {list_number: false}) %>
</div>
<% } %>

@ -68,6 +68,11 @@ var customSearch;
page = page[0];
idname = idname.split(page)[0];
}
var index = idname.match(/index.html/);
if (index) {
index = index[0];
idname = idname.split(index)[0];
}
$active_link = $('#' + idname, $headerMenu);
setUnderline($active_link);
}

@ -8,7 +8,7 @@
// max-height: ~"calc(100% - 2 * @{gap} - @{height_navbar})";
// max-height: 600px;
.enable-trans();
.header{
header{
position: sticky;
width: 100%;
top: 0;
@ -37,7 +37,7 @@
&.active{
position: fixed;
box-shadow: @boxshadow_card_raised;
.header{
header{
.s-toc{
transform: rotate(30deg);
}

@ -32,7 +32,7 @@
}
}
max-height: ~"calc(100% - @{height_navbar} - 4 * @{gap})";
.header{
header{
display: flex;
justify-content: space-between;
border-top-left-radius: @border_radius;
@ -48,8 +48,12 @@
.rightBtn{
color: @color_text_in_header;
&:hover {
color: darken(@color_text_highlight, 25%);
color: darken(@color_text_highlight, 25%);
&.rotate90{
transform: rotate(90deg);
}
}
}
&.pure{
background-color: @theme_cardbg;
@ -80,12 +84,12 @@
.name{
flex:auto;
&:extend(.txt-ellipsis);
color: fade(@color_text_main,70%);
color: fade(@color_text_main, 80%);
}
.badge{
flex:none;
font-size: @fontsize_small;
color: fade(@color_text_main, 50%);
color: fade(@color_text_main, 70%);
}
&:hover{
border-left: 4px solid @theme_main;
@ -99,75 +103,72 @@
&.author{
.enable-trans();
.enable-trans();
.content{
padding: 0;
.avatar{
padding: 0;
margin: 0;
display: flex;
justify-content: center;
background-color: transparent;
@media(max-width: @on_pad){
padding: @gap/2;
}
width: @width_sidebar;
height: @width_sidebar;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
height: @width_sidebar_m;
}
@media(max-width: @on_pad){
width: 80px;
height: 80px;
border-radius: 100%;
margin-top: @gap/2;
}
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
}
h2{
text-align: center;
// color: @color_text_header;
text-align: center;
font-weight: bold;
margin: @gap/2;
@media(max-width: @on_pad){
margin: @gap/2;
}
}
.header{
padding: 0;
margin: 0;
display: flex;
justify-content: center;
background-color: transparent;
@media(max-width: @on_pad){
padding: @gap/2;
}
p{
font-size: @fontsize_base;
text-align: center;
margin: @gap/2 @gap/2 0 @gap/2;
empty-cells: hide;
}
img{
width: @width_sidebar;
height: @width_sidebar;
@media(max-width: @on_laptop) {
width: @width_sidebar_m;
height: @width_sidebar_m;
.social-wrapper{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 4px @gap/2;
a{
color: fade(@color_text_main, 70%);
.enable-trans();
&:hover{
color: @color_text_highlight;
}
@media(max-width: @on_pad){
width: 80px;
height: 80px;
border-radius: 100%;
margin-top: @gap/2;
&.social {
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
margin: 4px;
border-radius: 100px;
&:hover {
background: fade(@theme_main, 10%);
color: @theme_main;
}
}
border-top-left-radius: @border_radius;
border-top-right-radius: @border_radius;
}
.content{
p{
font-size: @fontsize_base;
text-align: center;
}
text-align: center;
font-weight: bold;
padding-bottom: 0;
padding: @gap/2 @gap 0 @gap;
@media(max-width: @on_pad){
padding: @gap/2 @gap;
}
}
.social-wrapper{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 4px @gap/2;
a {
color: fade(@color_text_main, 70%);
.enable-trans();
&:hover {
color: @color_text_highlight;
}
&.social {
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
margin: 4px;
border-radius: 100px;
&:hover {
background: fade(@theme_main, 10%);
color: @theme_main;
}
}
}
}
@media(max-width: @on_pad){
box-shadow: none;
@ -176,59 +177,74 @@
justify-content: center;
}
}
}
}
&.plain{
.content{
font-size: @fontsize_small;
font-weight: bold;
word-break: break-all;
padding: @gap/2 @gap;
line-height: @fontsize_small + 8px;
&.pure{
padding: 0 @gap @gap @gap; // 适合白色导航栏背景
}
a{
color: @color_text_link;
.enable-trans();
&:hover {
color: @color_text_highlight;
text-decoration: underline;
}
&:active {
color: darken(@color_text_highlight, 25%);
}
}
}
}
&.mywidget{
&.list{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
a{
font-size: @fontsize_small;
font-weight: bold;
word-break: break-all;
padding: @gap/2 @gap;
line-height: @fontsize_small + 8px;
&.pure{
padding: 0 @gap @gap @gap; // 适合白色导航栏背景
&:hover{
text-decoration: none;
}
a{
color: @color_text_link;
.enable-trans();
&:hover {
color: @color_text_highlight;
text-decoration: underline;
}
&:active {
color: darken(@color_text_highlight, 25%);
}
i{
color: fade(@color_text_main,70%);
line-height: @height_cell;
margin-right: 3px;
}
}
&#list{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
a{
&:hover{
text-decoration: none;
}
i{
color: fade(@color_text_main,70%);
line-height: @height_cell;
margin-right: 8px;
}
img{
display: inline;
vertical-align: middle;
height: 18px;
width: 18px;
margin-bottom: 4px;
&#round{
border-radius: 100%;
}
}
}
}
}
&.categories{
.content{
padding: @gap/2 0;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
&.category{
.content{
padding: @gap/2 0;
font-size: @fontsize_small;
font-weight: bold;
&.pure{
padding-top: 0; // 适合白色导航栏背景
}
}
}
&.tagcloud{
@ -251,7 +267,7 @@
}
&.music{
.header{
header{
&.pure{
padding-bottom: @gap/4; // 适合白色导航栏背景
}
@ -270,7 +286,7 @@
&.links{
.header{
header{
.rightBtn{
&:hover{
transform: rotate(90deg);

Loading…
Cancel
Save