样式优化

This commit is contained in:
结发受长生
2018-06-11 15:04:40 +08:00
parent 84e0478a73
commit 79c6a7588e
10 changed files with 50 additions and 63 deletions
+13 -18
View File
@@ -1,16 +1,14 @@
<% if (pagination == 2){ %>
<% page.posts.each(function(post){ %>
<% if (pagination == 2){
page.posts.each(function(post){ %>
<%- partial('article', {post: post, index: true}) %>
<% }) %>
<% } else { %>
<% var last; %>
<% page.posts.each(function(post, i){ %>
<% var year = post.date.year(); %>
<% if (last != year){ %>
<% if (last != null){ %>
</div></section>
<% } %>
<% last = year; %>
<% })
} else {
var last;
page.posts.each(function(post, i){
var year = post.date.year();
if (last != year){
if (last != null){ %></div></section><% }
last = year; %>
<section class="archives-wrap">
<div class="archive-year-wrap">
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
@@ -18,12 +16,9 @@
<div class="archives">
<% } %>
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
<% }) %>
<% if (page.posts.length){ %>
</div></section>
<% } %>
<% } %>
<% if (page.total > 1){ %>
<% })
if (page.posts.length){ %></div></section><% }}
if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; '+__('prev'),
+1 -1
View File
@@ -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">
<% if (post.link || post.title){ %>
<header class="article-header">
+5 -5
View File
@@ -20,11 +20,11 @@
</ul>
</nav>
<nav class="header-smart-menu">
<% for (let menuName in theme.smart_menu){
if(theme.smart_menu[menuName]){ %>
<a @click="openSlider($event, '<%-menuName%>')" href="javascript:void(0)"><%= __(theme.smart_menu[menuName]) %></a>
<% }
} %>
<% for (let menuName in theme.smart_menu){
if(theme.smart_menu[menuName]){ %>
<a @click="openSlider($event, '<%-menuName%>')" href="javascript:void(0)"><%= __(theme.smart_menu[menuName]) %></a>
<% }
} %>
</nav>
<nav class="header-nav">
<div class="social">
+8 -10
View File
@@ -12,12 +12,12 @@
}
%>
<ul style="width:70%">
<% var divide = 100 / count + '%' %>
<% for (let menu_name in theme.smart_menu){ %>
<% if(theme.smart_menu[menu_name]){ %>
<% var divide = 100 / count + '%'
for (let menu_name in theme.smart_menu){
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>
<% } %>
<% } %>
<% }
} %>
</ul>
</div>
<div class="tools-wrap">
@@ -103,7 +103,6 @@
</ul>
</section>
<%}%>
<%if(hasFriends){%>
<section class="tools-section tools-section-friends" v-show="friends">
<%if(theme.friends && theme.friends.length != 0){%>
@@ -117,12 +116,11 @@
<%}%>
</section>
<%}%>
<%if(hasAboutme){%>
<section class="tools-section tools-section-me" v-show="aboutme">
<%if(theme.aboutme){%>
<div class="aboutme-wrap" id="js-aboutme"><%-theme.aboutme%></div>
<%}%>
<%if(theme.aboutme){%>
<div class="aboutme-wrap" id="js-aboutme"><%-theme.aboutme%></div>
<%}%>
</section>
<%}%>
</div>