commit
c6740512cf
|
@ -18,6 +18,7 @@ widget:
|
||||||
article:
|
article:
|
||||||
comments: 'Comments'
|
comments: 'Comments'
|
||||||
share: 'Share'
|
share: 'Share'
|
||||||
|
catalogue: 'Catalogue'
|
||||||
profile:
|
profile:
|
||||||
follow: 'FOLLOW'
|
follow: 'FOLLOW'
|
||||||
post: 'post'
|
post: 'post'
|
||||||
|
|
|
@ -18,6 +18,7 @@ widget:
|
||||||
article:
|
article:
|
||||||
comments: '评论'
|
comments: '评论'
|
||||||
share: '分享到'
|
share: '分享到'
|
||||||
|
catalogue: '文章目录'
|
||||||
profile:
|
profile:
|
||||||
follow: '关注我'
|
follow: '关注我'
|
||||||
post: '文章'
|
post: '文章'
|
||||||
|
|
|
@ -22,6 +22,12 @@
|
||||||
</p>
|
</p>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<% if (!index && post.toc){ %>
|
||||||
|
<div id="toc" class="toc-article">
|
||||||
|
<strong class="toc-title"><%= __('article.catalogue') %></strong>
|
||||||
|
<%- toc(post.content) %>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
<%- post.content %>
|
<%- post.content %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -326,3 +326,50 @@ $article-share-link
|
||||||
display: block
|
display: block
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|
||||||
|
/* toc */
|
||||||
|
.toc-article
|
||||||
|
background #F9F9F9
|
||||||
|
margin 2em 0 0 0.2em
|
||||||
|
padding 1em
|
||||||
|
border-radius 0px
|
||||||
|
.toc-title
|
||||||
|
font-size 120%
|
||||||
|
strong
|
||||||
|
padding 0.3em 1
|
||||||
|
ol.toc
|
||||||
|
width 100%
|
||||||
|
margin 1em 2em 0 0
|
||||||
|
#toc
|
||||||
|
line-height 1em
|
||||||
|
font-size 0.8em
|
||||||
|
float right
|
||||||
|
.toc
|
||||||
|
padding 0
|
||||||
|
li
|
||||||
|
list-style-type none
|
||||||
|
.toc-child
|
||||||
|
padding-left 0em
|
||||||
|
#toc.toc-aside
|
||||||
|
display none
|
||||||
|
width 13%
|
||||||
|
position fixed
|
||||||
|
right 2%
|
||||||
|
top 320px
|
||||||
|
overflow hidden
|
||||||
|
line-height 1.5em
|
||||||
|
font-size 1em
|
||||||
|
color color-heading
|
||||||
|
opacity .6
|
||||||
|
transition opacity 1s ease-out
|
||||||
|
strong
|
||||||
|
padding 0.3em 0
|
||||||
|
color color-font
|
||||||
|
&:hover
|
||||||
|
transition opacity .3s ease-out
|
||||||
|
opacity 1
|
||||||
|
a
|
||||||
|
transition color 1s ease-out
|
||||||
|
&:hover
|
||||||
|
color color-theme
|
||||||
|
transition color .3s ease-out
|
Loading…
Reference in New Issue