i18n
xaoxuu 6 years ago
parent 9ebf96f739
commit c583b86ec9
  1. 16
      layout/_partial/article.ejs
  2. 8
      layout/_partial/header.ejs
  3. 9
      source/less/_header.less
  4. 14
      source/less/_main.less

@ -1,12 +1,10 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost"> <article id="<%= post.layout %>-<%= post.slug %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<section class='meta'> <section class='meta'>
<h1 class="title"> <% if(post.title){ %>
<% if(post.title){ %> <h1 class="title"><%= post.title %></h1>
<%= post.title %> <% } else if (post.date) { %>
<% } else if (post.date) { %> <h1 class="title"><%= date(post.date, config.date_format) %></h1>
<%= date(post.date, config.date_format) %> <% } %>
<% } %>
</h1>
<time class="time"> <time class="time">
<i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i> <i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>
<%= date(post.date, config.date_format) %> <%= date(post.date, config.date_format) %>
@ -25,7 +23,7 @@
<section class='meta'> <section class='meta'>
<time class="time" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>" content="<%- date(post.updated, config.date_format) %>"> <time class="time" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>" content="<%- date(post.updated, config.date_format) %>">
<i class="fas fa-edit fa-fw" aria-hidden="true"></i> <i class="fas fa-pen fa-fw" aria-hidden="true"></i>
本文最后更新于:<%- date(post.updated, config.date_format) %> 本文最后更新于:<%- date(post.updated, config.date_format) %>
</time> </time>
<% if (post.tags && post.tags.length && post.tags.each) { %> <% if (post.tags && post.tags.length && post.tags.each) { %>
@ -35,7 +33,7 @@
items.push('<a class="tag" href="'+url_for(item.path)+'">' + item.name + '</a>'); items.push('<a class="tag" href="'+url_for(item.path)+'">' + item.name + '</a>');
}); });
%> %>
<div class="article-tags tags"> <div class="tags">
<i class="fas fa-tags fa-fw" aria-hidden="true"></i> <i class="fas fa-tags fa-fw" aria-hidden="true"></i>
<%- items.join(', ') %> <%- items.join(', ') %>
</div> </div>

@ -1,11 +1,7 @@
<header class="l_header"> <header class="l_header">
<div class='wrapper'> <div class='wrapper'>
<div class="nav-main container container--flex"> <div class="nav-main container container--flex">
<a class="logo flat-box" href='<%= url_for("/") %>' > <a class="logo flat-box" href='<%= url_for("/") %>' ><%- config.title %></a>
<!-- <i class="fas fa-home"></i> -->
<%- config.title %>
</a>
<div class='menu'> <div class='menu'>
<ul class='h-list'> <ul class='h-list'>
<% if (config.nav_menu) { %> <% if (config.nav_menu) { %>
@ -41,7 +37,7 @@
<a class="logo flat-box"></a> <a class="logo flat-box"></a>
<ul class='switcher h-list'> <ul class='switcher h-list'>
<li class='s-comment'><a class="fas fa-comments fa-fw flat-box" href='javascript:void(0)'></a></li> <li class='s-comment'><a class="fas fa-comments fa-fw flat-box" href='javascript:void(0)'></a></li>
<li class='s-top'><a class="fas fa-arrow-up fa-fw flat-box" href='javascript:void(0)'></a></li> <li class='s-top'><a class="fas fa-arrow-circle-up fa-fw flat-box" href='javascript:void(0)'></a></li>
<li class='s-toc'><a class="fas fa-list fa-fw flat-box" href='javascript:void(0)'></a></li> <li class='s-toc'><a class="fas fa-list fa-fw flat-box" href='javascript:void(0)'></a></li>
</ul> </ul>
</div> </div>

@ -15,10 +15,12 @@
.enable-trans(); .enable-trans();
} }
.wrapper.sub{ .wrapper.sub{
.enable-trans();
transform: translateY(-@height_navbar); transform: translateY(-@height_navbar);
.logo{ .logo{
// padding-left: 0; // padding-left: 0;
@media(max-width: @on_phone){ @media(max-width: @on_phone){
.enable-trans();
padding-left: @gap; padding-left: @gap;
padding-right: 0; padding-right: 0;
font-size: @fontsize_base; font-size: @fontsize_base;
@ -223,18 +225,17 @@
line-height: 1.8em; line-height: 1.8em;
padding: 8px @gap+6px; padding: 8px @gap+6px;
} }
width: @width_sidebar;
position: fixed; position: fixed;
top: @height_navbar + @gap; top: @height_navbar + 2*@gap;
right: 0; right: 0;
width: @width_sidebar; width: 100% - 0.5*@gap;
z-index:9999 + 1; z-index:9999 + 1;
line-height: 2 * @gap; line-height: 2 * @gap;
background: white; background: white;
border-right: 0; border-right: 0;
box-shadow: @boxshadow_card_raised; box-shadow: @boxshadow_card_raised;
border-radius: @border_radius; border-radius: @border_radius;
transform: translate3d(@width_sidebar, -0, 0); transform: translate3d(100%, -0, 0);
.enable-trans(); .enable-trans();
&:hover { &:hover {
box-shadow: @boxshadow_card_raised; box-shadow: @boxshadow_card_raised;

@ -214,10 +214,12 @@
} }
.meta { .meta {
color: fade(@theme_text_main, 70%); color: fade(@theme_text_main, 70%);
margin-top: 2*@gap;
margin-bottom: 0.5*@gap; margin-bottom: 0.5*@gap;
font-size: @fontsize_small * .95; font-size: @fontsize_small * .95;
&:first-child{ &:first-child{
margin-bottom: 1.5*@gap; margin-top: 0;
margin-bottom: 1*@gap;
} }
.title { .title {
left: 0; left: 0;
@ -253,15 +255,16 @@
.browse, .browse,
.tags { .tags {
font-size: @fontsize_small * .95; font-size: @fontsize_small * .95;
line-height: 24px;
color: fade(@theme_text_main, 70%); color: fade(@theme_text_main, 70%);
display: inline-block; display: inline-block;
background: fade(@theme_bg_quote, 10%); background: fade(@theme_bg_quote, 10%);
margin-right: 4px; margin: 0 4px 8px 0px;
margin-bottom: 8px;
padding: 2px 8px 2px 6px; padding: 2px 8px 2px 6px;
border-radius: 0.5*@border_radius_code_block; border-radius: 0.5*@border_radius_code_block;
border-left: 0.5*@border_radius_code_block solid @theme_bg_quote; border-left: 0.5*@border_radius_code_block solid @theme_bg_quote;
a{ a{
color: fade(@theme_text_main, 70%);
.enable-trans(); .enable-trans();
&:hover { &:hover {
color: @theme_text_highlight; color: @theme_text_highlight;
@ -272,8 +275,9 @@
} }
} }
.categories { .categories {
font-weight: bold; // font-weight: bold;
color: @theme_text_link; color: fade(@theme_text_main, 50%);
// color: @theme_text_link;
} }
.tag{ .tag{
color: fade(@theme_text_main, 70%); color: fade(@theme_text_main, 70%);

Loading…
Cancel
Save