样式优化
This commit is contained in:
parent
84e0478a73
commit
79c6a7588e
@ -1,16 +1,14 @@
|
|||||||
<% if (pagination == 2){ %>
|
<% if (pagination == 2){
|
||||||
<% page.posts.each(function(post){ %>
|
page.posts.each(function(post){ %>
|
||||||
<%- partial('article', {post: post, index: true}) %>
|
<%- partial('article', {post: post, index: true}) %>
|
||||||
<% }) %>
|
<% })
|
||||||
<% } else { %>
|
} else {
|
||||||
<% var last; %>
|
var last;
|
||||||
<% page.posts.each(function(post, i){ %>
|
page.posts.each(function(post, i){
|
||||||
<% var year = post.date.year(); %>
|
var year = post.date.year();
|
||||||
<% if (last != year){ %>
|
if (last != year){
|
||||||
<% if (last != null){ %>
|
if (last != null){ %></div></section><% }
|
||||||
</div></section>
|
last = year; %>
|
||||||
<% } %>
|
|
||||||
<% last = year; %>
|
|
||||||
<section class="archives-wrap">
|
<section class="archives-wrap">
|
||||||
<div class="archive-year-wrap">
|
<div class="archive-year-wrap">
|
||||||
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
|
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
|
||||||
@ -18,12 +16,9 @@
|
|||||||
<div class="archives">
|
<div class="archives">
|
||||||
<% } %>
|
<% } %>
|
||||||
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
|
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
|
||||||
<% }) %>
|
<% })
|
||||||
<% if (page.posts.length){ %>
|
if (page.posts.length){ %></div></section><% }}
|
||||||
</div></section>
|
if (page.total > 1){ %>
|
||||||
<% } %>
|
|
||||||
<% } %>
|
|
||||||
<% if (page.total > 1){ %>
|
|
||||||
<nav id="page-nav">
|
<nav id="page-nav">
|
||||||
<%- paginator({
|
<%- paginator({
|
||||||
prev_text: '« '+__('prev'),
|
prev_text: '« '+__('prev'),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %> <%if(index){%> article-index<%}%>" itemscope itemprop="blogPost">
|
<article class="article article-type-<%= post.layout %> <%if(index){%> article-index<%}%>" itemscope itemprop="blogPost">
|
||||||
<div class="article-inner">
|
<div class="article-inner">
|
||||||
<% if (post.link || post.title){ %>
|
<% if (post.link || post.title){ %>
|
||||||
<header class="article-header">
|
<header class="article-header">
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="header-smart-menu">
|
<nav class="header-smart-menu">
|
||||||
<% for (let menuName in theme.smart_menu){
|
<% for (let menuName in theme.smart_menu){
|
||||||
if(theme.smart_menu[menuName]){ %>
|
if(theme.smart_menu[menuName]){ %>
|
||||||
<a @click="openSlider($event, '<%-menuName%>')" href="javascript:void(0)"><%= __(theme.smart_menu[menuName]) %></a>
|
<a @click="openSlider($event, '<%-menuName%>')" href="javascript:void(0)"><%= __(theme.smart_menu[menuName]) %></a>
|
||||||
<% }
|
<% }
|
||||||
} %>
|
} %>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="header-nav">
|
<nav class="header-nav">
|
||||||
<div class="social">
|
<div class="social">
|
||||||
|
|||||||
@ -12,12 +12,12 @@
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<ul style="width:70%">
|
<ul style="width:70%">
|
||||||
<% var divide = 100 / count + '%' %>
|
<% var divide = 100 / count + '%'
|
||||||
<% for (let menu_name in theme.smart_menu){ %>
|
for (let menu_name in theme.smart_menu){
|
||||||
<% if(theme.smart_menu[menu_name]){ %>
|
if(theme.smart_menu[menu_name]){ %>
|
||||||
<li style="width: <%= divide %>" @click="openSlider($event, '<%-menu_name%>')"><a href="javascript:void(0)" :class="{active:<%-menu_name%>}"><%= __(theme.smart_menu[menu_name]) %></a></li>
|
<li style="width: <%= divide %>" @click="openSlider($event, '<%-menu_name%>')"><a href="javascript:void(0)" :class="{active:<%-menu_name%>}"><%= __(theme.smart_menu[menu_name]) %></a></li>
|
||||||
<% } %>
|
<% }
|
||||||
<% } %>
|
} %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools-wrap">
|
<div class="tools-wrap">
|
||||||
@ -103,7 +103,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
<%if(hasFriends){%>
|
<%if(hasFriends){%>
|
||||||
<section class="tools-section tools-section-friends" v-show="friends">
|
<section class="tools-section tools-section-friends" v-show="friends">
|
||||||
<%if(theme.friends && theme.friends.length != 0){%>
|
<%if(theme.friends && theme.friends.length != 0){%>
|
||||||
@ -117,12 +116,11 @@
|
|||||||
<%}%>
|
<%}%>
|
||||||
</section>
|
</section>
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
<%if(hasAboutme){%>
|
<%if(hasAboutme){%>
|
||||||
<section class="tools-section tools-section-me" v-show="aboutme">
|
<section class="tools-section tools-section-me" v-show="aboutme">
|
||||||
<%if(theme.aboutme){%>
|
<%if(theme.aboutme){%>
|
||||||
<div class="aboutme-wrap" id="js-aboutme"><%-theme.aboutme%></div>
|
<div class="aboutme-wrap" id="js-aboutme"><%-theme.aboutme%></div>
|
||||||
<%}%>
|
<%}%>
|
||||||
</section>
|
</section>
|
||||||
<%}%>
|
<%}%>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -63,7 +63,6 @@
|
|||||||
content: "“";
|
content: "“";
|
||||||
font-family: serif;
|
font-family: serif;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
float: left;
|
|
||||||
margin: 4px 4px 0 -12px;
|
margin: 4px 4px 0 -12px;
|
||||||
color: #c8c8c8;
|
color: #c8c8c8;
|
||||||
}
|
}
|
||||||
@ -102,13 +101,11 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.archive-article-date{
|
.archive-article-date{
|
||||||
cursor: default;
|
cursor: default;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
time{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.article-category{
|
.article-category{
|
||||||
&:before{
|
&:before{
|
||||||
|
|||||||
@ -42,11 +42,6 @@
|
|||||||
margin-bottom: 1.75em;
|
margin-bottom: 1.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-inner h4 {
|
|
||||||
letter-spacing: 0.140625em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.article-inner h6 {
|
.article-inner h6 {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
@ -114,7 +109,6 @@
|
|||||||
background: #aaa;
|
background: #aaa;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
float: left;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
#footer {
|
#footer {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace;
|
|
||||||
text-shadow: 0 1px #fff;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
|
|||||||
@ -51,15 +51,18 @@
|
|||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: -webkit-box;
|
position: relative;
|
||||||
-webkit-box-orient: horizontal;
|
ul {
|
||||||
-webkit-box-pack: center;
|
position: absolute;
|
||||||
-webkit-box-align: center;
|
left: 50%;
|
||||||
li{
|
top: 50%;
|
||||||
cursor: default;
|
transform: translateX(-50%) translateY(-50%);
|
||||||
a{
|
li{
|
||||||
font-size: 14px;
|
cursor: default;
|
||||||
min-width: 300px;
|
a{
|
||||||
|
font-size: 14px;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,7 +71,8 @@
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
a {
|
a {
|
||||||
&:after {
|
&:after {
|
||||||
content: '/'
|
content: '/';
|
||||||
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
&:last-child {
|
&:last-child {
|
||||||
&:after {
|
&:after {
|
||||||
@ -96,6 +100,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
img{
|
img{
|
||||||
border-radius: 300px;
|
border-radius: 300px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-transition: all 0.2s ease-in;
|
-webkit-transition: all 0.2s ease-in;
|
||||||
&.show{
|
&.show{
|
||||||
@ -108,7 +114,6 @@
|
|||||||
.header-author{
|
.header-author{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0.67em 0;
|
margin: 0.67em 0;
|
||||||
font-family: Roboto, "Roboto", serif;
|
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -36,7 +36,7 @@ module.exports = {
|
|||||||
loader: 'html'
|
loader: 'html'
|
||||||
},{
|
},{
|
||||||
test: /\.(scss|sass)$/,
|
test: /\.(scss|sass)$/,
|
||||||
loader: mainCss.extract({fallback:"style-loader",use:["css-loader","postcss-loader","sass-loader?outputStyle=compressed"]})
|
loader: mainCss.extract({fallback:"style-loader",use:["css-loader","postcss-loader","sass-loader?outputStyle=compact"]})
|
||||||
},{
|
},{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
loaders: extraCss.extract({fallback:"style-loader",use:["css-loader?minimize=true","postcss-loader"]})
|
loaders: extraCss.extract({fallback:"style-loader",use:["css-loader?minimize=true","postcss-loader"]})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user