You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.8 KiB
50 lines
1.8 KiB
include titled_card.pug
|
|
include data_row.pug
|
|
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({name: "文章", value: site.posts.length})
|
|
+data_row({name: "页面", value: site.pages.length})
|
|
+data_row({name: "标签", value: site.tags.length})
|
|
+data_row({name: "分类", value: 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: name, value: displayValue, target_link: link})
|
|
|
|
hr
|
|
if extendData
|
|
each data in extendData
|
|
+data_row({name: data.name, value: data.value})
|
|
|
|
+data_row({name: "运行时间", value: "432天", value_id: "run_time"})
|
|
script
|
|
- const beginTime = theme.beginTime
|
|
- const millisecond = moment(beginTime.time, beginTime.format).valueOf()
|
|
| {const runTime = parseInt((Date.now() - !{millisecond}) / 86400000);
|
|
| document.getElementById("run_time").textContent = runTime + '天'};
|
|
|
|
+data_row({name: "页面构建时间", value: "0天前", value_id: "last_build_time"})
|
|
script
|
|
- const buildTime = Date.now()
|
|
| {const buildTime = parseInt((Date.now() - !{buildTime}) / 86400000);
|
|
| document.getElementById("last_build_time").textContent =
|
|
| (buildTime == 0) ? '今天' : buildTime + '天前'};
|
|
|
|
hr
|
|
span.no-error-declaration NO ERROR
|
|
|