File tree Expand file tree Collapse file tree 5 files changed +51
-7
lines changed Expand file tree Collapse file tree 5 files changed +51
-7
lines changed Original file line number Diff line number Diff line change
1
+ <div class =" content blog" >
2
+ <h1 style =" text-align : center ; margin-bottom :.5em " >The Vue.js Blog</h1 >
1
3
<% site .posts .sort (' date' , - 1 ).each (function (post ) { % >
2
- < div class = " content" >
3
- < h4>< %- post .date .format (' MMM D[,] YYYY' ) % >< / h3>
4
- < h1>< a href= " /<%- post.path %>" >< %- post .title % >< / a>< / h2>
5
- < div>< %- post .content % >< / div>
4
+ < div class = " post" >
5
+ < h2>< a href= " /<%- post.path %>" >< %- post .title % >< / a>< / h2>
6
+ < h4>< %- post .date .format (' MMM D[,] YYYY' ) % >< / h4>
7
+ < div>< %- post .excerpt % >< / div>
8
+ < a href= " /<%- post.path %>" > ... continue reading< / a>
6
9
< / div>
7
- < % }) %>
10
+ < % }) %>
11
+ </div >
Original file line number Diff line number Diff line change 8
8
<li ><a href =" /api/" class =" nav-link<%- page.path.match(/api/) ? ' current' : '' %>" >API Reference</a ></li >
9
9
<br class =" break" />
10
10
<li ><a href =" /examples/" class =" nav-link<%- page.path.match(/examples/) ? ' current' : '' %>" >Examples</a ></li >
11
- <li ><a href =" /blog/" class =" nav-link<%- page.path.match(/blog/) ? ' current' : '' %>" >Blog</a ></li >
11
+ <li ><a href =" /blog/" class =" nav-link<%- ( page.path.match(/blog/) || is_post() ) ? ' current' : '' %>" >Blog</a ></li >
12
12
<li ><a href =" https://github.com/yyx990803/vue" target =" _blank" class =" nav-link" >GitHub</a ></li >
13
13
</ul >
14
14
</div >
Original file line number Diff line number Diff line change 1
- <div class =" content" >
1
+ <div class =" sidebar blog" >
2
+ <div class =" toggle" >···</div >
3
+ <div class =" list" >
4
+ <h2 >Recent Posts</h2 >
5
+ <ul >
6
+ <% site .posts .sort (' date' , - 1 ).limit (10 ).each (function (post ) { % >
7
+ < li>
8
+ < a href= " /<%- post.path %>" class = " sidebar-link" >< %- post .title % >< / a>
9
+ < / li>
10
+ < % }) %>
11
+ </ul >
12
+ </div >
13
+ </div >
14
+ <div class =" content blog" >
2
15
<h1 ><% - page .title %> </h1 >
16
+ <h4 ><% - page .date .format (' MMM D[,] YYYY' ) %> </h4 >
3
17
<% - page .content %>
4
18
</div >
Original file line number Diff line number Diff line change
1
+ .content.blog
2
+ h1
3
+ margin 0 0 .5em
4
+ h2
5
+ margin .8em 0
6
+ padding-bottom 0
7
+ border-bottom none
8
+ a
9
+ color $dark
10
+ & :hover
11
+ border-bottom 2px solid $green
12
+ h4
13
+ color $light
14
+ margin 1.2em 0
15
+ figure , p
16
+ margin-left 0
17
+ .post
18
+ padding 1em 0 2em
19
+ border-bottom 1px solid $border
20
+
21
+ @media screen and (max-width : 1400px ) and (min-width : 720px )
22
+ .content.blog
23
+ margin 0 0 0 280px
Original file line number Diff line number Diff line change 1
1
@import "_common"
2
2
@import "_demo"
3
+ @import "_blog"
3
4
4
5
$header-height = 40px
5
6
@@ -63,6 +64,8 @@ $header-height = 40px
63
64
& .current
64
65
font-weight 600
65
66
color $green
67
+ & :hover
68
+ border-bottom 2px solid $green
66
69
67
70
.content
68
71
padding 2.2em 0
You can’t perform that action at this time.
0 commit comments