parent
da59462af1
commit
2ea32af5fa
@ -1,4 +1,8 @@ |
|||||||
mixin data_row(name, value) |
mixin data_row(name, value, target_href) |
||||||
.data-row |
.data-row |
||||||
span.data-name=name |
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 titled_card.pug |
||||||
include data_row.pug |
include data_row.pug |
||||||
|
include button.pug |
||||||
.information-card |
|
||||||
+titled_card("Status") |
mixin information_card(...extendData) |
||||||
.information-content |
.information-card |
||||||
.avatar-box |
+titled_card("Status") |
||||||
.avatar-img |
.information-content |
||||||
img(src=theme.avatar) |
.avatar-box |
||||||
.personal-information |
.avatar-img |
||||||
span.name= config.author |
img(src=theme.avatar) |
||||||
span.sign= config.description |
.personal-information |
||||||
|
span.name= config.author |
||||||
hr |
span.sign= config.description |
||||||
|
|
||||||
+data_row("页面创建", page.date) |
hr |
||||||
+data_row("页面更新", page.updated) |
+data_row("文章", site.posts.length) |
||||||
|
+data_row("页面", site.pages.length) |
||||||
hr |
+data_row("标签", site.tags.length) |
||||||
|
+data_row("分类", site.categories.length) |
||||||
+data_row("文章", site.posts.length) |
|
||||||
+data_row("页面", site.pages.length) |
if theme.social |
||||||
+data_row("标签", site.tags.length) |
hr |
||||||
+data_row("分类", site.categories.length) |
each value, name in theme.social |
||||||
|
- const splitValue = value.split('||') |
||||||
hr |
- const displayValue = splitValue[0] |
||||||
|
- const link = splitValue[1] |
||||||
+data_row("文章数", 12) |
+data_row(name, displayValue, link) |
||||||
+data_row("总字数", "16k") |
|
||||||
+data_row("全站访问次数", "16k") |
hr |
||||||
|
if extendData |
||||||
hr |
each data in extendData |
||||||
|
+data_row(data.name, data.value) |
||||||
span.no-error-declaration NO ERROR |
|
||||||
|
+data_row("运行时间", "421天") |
||||||
|
|
||||||
|
hr |
||||||
|
span.no-error-declaration NO ERROR |
||||||
|
@ -1,10 +1,27 @@ |
|||||||
extends includes/layout.pug |
extends includes/layout.pug |
||||||
|
include includes/_partials/information_card.pug |
||||||
|
include includes/_partials/post_list/post_item.pug |
||||||
|
|
||||||
block content |
block content |
||||||
.index-content |
.index-content |
||||||
.left-content |
.left-content |
||||||
include ./includes/_partials/left_declaration.pug |
include includes/_partials/left_declaration.pug |
||||||
.post-list |
.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 |
.right-content |
||||||
include includes/_partials/information_card.pug |
+information_card({name: '全站总字数', value: totalcount(site)}) |
@ -1,3 +1,6 @@ |
|||||||
.data-row |
.data-row |
||||||
display: flex |
display: flex |
||||||
flex-direction: row |
flex-direction: row |
||||||
|
.data-value a |
||||||
|
text-decoration: none |
||||||
|
color: rgb(74, 71, 62) |
Loading…
Reference in new issue