parent
da59462af1
commit
2ea32af5fa
@ -1,4 +1,8 @@ |
||||
mixin data_row(name, value) |
||||
mixin data_row(name, value, target_href) |
||||
.data-row |
||||
span.data-name=name |
||||
if target_href |
||||
span.data-value |
||||
a(href=target_href target='_balnk')=value |
||||
else |
||||
span.data-value=value |
@ -1,10 +1,27 @@ |
||||
extends includes/layout.pug |
||||
include includes/_partials/information_card.pug |
||||
include includes/_partials/post_list/post_item.pug |
||||
|
||||
block content |
||||
.index-content |
||||
.left-content |
||||
include ./includes/_partials/left_declaration.pug |
||||
include includes/_partials/left_declaration.pug |
||||
.post-list |
||||
- const posts = page.posts |
||||
- posts.each(function(post) { |
||||
- const date = moment(post.date).format('MM/DD/YYYY') |
||||
- const time = moment(post.date).format('HH:mm:ss') |
||||
- let summary = '' |
||||
if post.description |
||||
summary = post.description |
||||
else if post.more |
||||
- const strip = strip_html(post.more).substr(0, 128) |
||||
- summary = strip.length < 128 ? strip : strip + '...' |
||||
else |
||||
- const strip = strip_html(post.content).substr(0, 128) |
||||
- summary = strip.length < 128 ? strip : strip + '...' |
||||
+post_item(post.title, post.cover, date , summary, time) |
||||
- }) |
||||
|
||||
.right-content |
||||
include includes/_partials/information_card.pug |
||||
+information_card({name: '全站总字数', value: totalcount(site)}) |
@ -1,3 +1,6 @@ |
||||
.data-row |
||||
display: flex |
||||
flex-direction: row |
||||
.data-value a |
||||
text-decoration: none |
||||
color: rgb(74, 71, 62) |
Loading…
Reference in new issue