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.
hexo-theme-yorha/layout/includes/_partials/information_card.pug

42 lines
1.3 KiB

1 year ago
include titled_card.pug
1 year ago
include data_row.pug
1 year ago
include button.pug
1 year ago
1 year ago
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
1 year ago
1 year ago
hr
1 year ago
+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})
1 year ago
1 year ago
if theme.social
hr
each value, name in theme.social
- const splitValue = value.split('||')
- const displayValue = splitValue[0]
- const link = splitValue[1]
1 year ago
+data_row({name: name, value: displayValue, target_link: link})
1 year ago
1 year ago
hr
if extendData
each data in extendData
1 year ago
+data_row({name: data.name, value: data.value})
1 year ago
1 year ago
+data_row({name: "运行时间", value: "432天", value_id: "run_time"})
script.
const runTime = document.getElementById("run_time");
1 year ago
runTime.innerHtml = (Date.now() - ${startTime}) / 86400
1 year ago
hr
span.no-error-declaration NO ERROR