center title

master
xaoxuu 4 years ago
parent 9484ca931a
commit 683a039ecf
  1. 48
      layout/_partial/meta.ejs
  2. 2
      layout/_widget/list.ejs
  3. 8
      source/css/_layout/main.styl

@ -33,27 +33,37 @@ if (post.meta && (post.meta.footer !== undefined && post.meta.footer !== null))
<% if (position == 'header') { %>
<section class='meta'>
<% if (post.music && post.music.enable != false) { %>
<%- partial('../_third-party/aplayer', {post: post, where: 'meta'}) %>
<% } %>
<% if(post.thumbnail && post.thumbnail.length){ %>
<a title='<%- post.title %>' href='<%- url_for(post.link || post.path) %>'><img class='thumbnail' src='<%- post.thumbnail %>'></a>
<% } %>
<div class="meta" id="header-meta">
<% if((topMetas).indexOf('title') > -1){ %>
<%- partial('../_meta/' + 'title', {post: post, isPostList: isPostList}) %>
<% if (topMetas.length == 1 && topMetas.indexOf('centertitle') > -1) { %>
<% if(isPostList){ %>
<h2 class="title"><p class="p center h2"><%- post.title || post.seotitle %></p></h2><br>
<% } else { %>
<% if (post.title || page.title || config.title) { %>
<h1 class="title"><p class="p center h1"><%- post.title || post.seotitle %></p></h1><br>
<% } %>
<% } %>
<div class='new-meta-box'>
<% (topMetas).forEach(function(meta){ %>
<% if((meta != 'title') && (meta in theme.meta)){ %>
<%- partial('../_meta/' + meta, {post: post, isPostList: isPostList}) %>
<% } %>
<% }) %>
</div>
<% if ((topMetas).length > 0){ %>
<hr>
<% } else { %>
<% if (post.music && post.music.enable != false) { %>
<%- partial('../_third-party/aplayer', {post: post, where: 'meta'}) %>
<% } %>
</div>
<% if(post.thumbnail && post.thumbnail.length){ %>
<a title='<%- post.title %>' href='<%- url_for(post.link || post.path) %>'><img class='thumbnail' src='<%- post.thumbnail %>'></a>
<% } %>
<div class="meta" id="header-meta">
<% if((topMetas).indexOf('title') > -1){ %>
<%- partial('../_meta/' + 'title', {post: post, isPostList: isPostList}) %>
<% } %>
<div class='new-meta-box'>
<% (topMetas).forEach(function(meta){ %>
<% if((meta != 'title') && (meta in theme.meta)){ %>
<%- partial('../_meta/' + meta, {post: post, isPostList: isPostList}) %>
<% } %>
<% }) %>
</div>
<% if ((topMetas).length > 0){ %>
<hr>
<% } %>
</div>
<% } %>
</section>
<% } else if (position == 'footer') { %>
<section class='meta' id="footer-meta">

@ -4,7 +4,7 @@
<div class='content'>
<ul class="list entry navigation">
<% (item.rows||[]).forEach(function(row){ %>
<li><a class="flat-box" title="<%- row.url %>" href="<%- row.url %>"
<li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>"
<% if (row.rel) { %>
rel="<%- row.rel %>"
<% } %>

@ -163,6 +163,14 @@
.title
trans(.1s)
margin: 0
color: $color-text
p
&.h1,&.h2
margin-top: $gap-paragraph + $gap-row
&.h1
font-size: $fontsize-h1 * 1.1
&.h2
font-size: $fontsize-h2 * 1.1
a
display: inline
font-weight: normal

Loading…
Cancel
Save