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 |
||||
span.data-value=value |
||||
if target_href |
||||
span.data-value |
||||
a(href=target_href target='_balnk')=value |
||||
else |
||||
span.data-value=value |
||||
|
@ -1,35 +1,38 @@ |
||||
include titled_card.pug |
||||
include data_row.pug |
||||
|
||||
.information-card |
||||
+titled_card("Status") |
||||
.information-content |
||||
.avatar-box |
||||
.avatar-img |
||||
img(src=theme.avatar) |
||||
.personal-information |
||||
span.name= config.author |
||||
span.sign= config.description |
||||
|
||||
hr |
||||
|
||||
+data_row("页面创建", page.date) |
||||
+data_row("页面更新", page.updated) |
||||
|
||||
hr |
||||
|
||||
+data_row("文章", site.posts.length) |
||||
+data_row("页面", site.pages.length) |
||||
+data_row("标签", site.tags.length) |
||||
+data_row("分类", site.categories.length) |
||||
|
||||
hr |
||||
|
||||
+data_row("文章数", 12) |
||||
+data_row("总字数", "16k") |
||||
+data_row("全站访问次数", "16k") |
||||
|
||||
hr |
||||
|
||||
span.no-error-declaration NO ERROR |
||||
|
||||
include button.pug |
||||
|
||||
mixin information_card(...extendData) |
||||
.information-card |
||||
+titled_card("Status") |
||||
.information-content |
||||
.avatar-box |
||||
.avatar-img |
||||
img(src=theme.avatar) |
||||
.personal-information |
||||
span.name= config.author |
||||
span.sign= config.description |
||||
|
||||
hr |
||||
+data_row("文章", site.posts.length) |
||||
+data_row("页面", site.pages.length) |
||||
+data_row("标签", site.tags.length) |
||||
+data_row("分类", site.categories.length) |
||||
|
||||
if theme.social |
||||
hr |
||||
each value, name in theme.social |
||||
- const splitValue = value.split('||') |
||||
- const displayValue = splitValue[0] |
||||
- const link = splitValue[1] |
||||
+data_row(name, displayValue, link) |
||||
|
||||
hr |
||||
if extendData |
||||
each data in extendData |
||||
+data_row(data.name, data.value) |
||||
|
||||
+data_row("运行时间", "421天") |
||||
|
||||
hr |
||||
span.no-error-declaration NO ERROR |
||||
|
@ -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