lensfrex 1 year ago
parent ae57649f4b
commit 33c95b2ec8
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 4
      layout/includes/_partials/information_card.pug
  2. 16
      layout/page.pug
  3. 27
      layout/post.pug
  4. 18
      source/css/_partials/post_page/markdown_content.styl
  5. 14
      source/css/_partials/post_page/post_page.styl
  6. 2
      source/css/common.styl

@ -36,13 +36,13 @@ mixin information_card(...extendData)
script
- const beginTime = theme.beginTime
- const millisecond = moment(beginTime.time, beginTime.format).valueOf()
| {const runTime = parseInt((Date.now() - !{millisecond}) / 86400000);
| {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);
| {const buildTime = parseInt((Date.now() - #{buildTime}) / 86400000);
| document.getElementById("last_build_time").textContent =
| (buildTime == 0) ? '今天' : buildTime + '天前'};

@ -1,7 +1,15 @@
extends includes/layout.pug
include includes/_partials/information_card.pug
block content
article#page
h1= page.title
!= page.content
#paginator!= paginator()
.markdown-container
.content
include includes/_partials/left_declaration.pug
.article-container
h1.article-title= (page.title === undefined || page.title === '') ? 'NO TITLE' : page.title
hr
!= page.content
.side-information
+information_card({name: '全站总字数', value: totalcount(site)})

@ -5,12 +5,27 @@ block content
.markdown-container
.content
include includes/_partials/left_declaration.pug
.article-container
h1= page.title
hr
!= page.content
.article-header
h1.article-title= page.title
hr
- const publishTime = moment(page.date).format("YYYY-MM-DD HH:mm:SS");
- const updateTime = moment(page.updated).format("YYYY-MM-DD HH:mm:SS");
- const word_count = wordcount(page.content);
- const read_cost = min2read(page.content);
- const author = page.author === undefined ? config.author : page.author;
.info-box
span.time-info.
发表于 #{publishTime}, 更新于 #{updateTime}
br
span.stat-info.
总字数 #{word_count}, 阅读时长 约#{read_cost}分钟, 阅读量 100
br
span.big publish by
span.author #{author}
hr
!= page.content
.side-information
+information_card({name: '全站总字数', value: totalcount(site)})
//- script(src="/js/code.js")
+information_card({name: '全站总字数', value: totalcount(site)})

@ -15,6 +15,11 @@
figure
margin: 0
font-size: 16px
table
border-style: none
td
border: none !important
padding: 0 !important
pre
padding: 0 10px;
padding-right: 10px
@ -34,9 +39,9 @@
overflow: scroll;
border: none;
border-collapse: collapse
td
padding: 0
border: none
th, td
padding: 4px 8px
border: solid
code
font-family: 'Consolas', 'Courier New', Courier, monospace
@ -50,7 +55,7 @@
background-color: rgba(189, 203, 215, 0.53)
color: rgb(74, 71, 62)
margin: 0 0 16px 0;
padding: 2px 24px
padding: 4px 24px
justify-content: center
display: flex
flex-direction: column
@ -73,7 +78,6 @@
max-width: 100%
p
margin: 0
line-height: 2em
iframe
@ -89,7 +93,7 @@
margin:8px 0
line-height: 1.5em
p
margin: 0 0 8px
margin: 4px 0 4px
line-height: 1.5em
> :last-child
@ -97,7 +101,7 @@
ol, ul
p
margin: 0 0 8px
margin: 4px 0 4px
li
&::marker

@ -5,6 +5,8 @@
flex-direction: row
justify-content: space-between
gap: 16px
.article-title
font-size: 3em
.content
width: 73%;
display: flex;
@ -26,4 +28,14 @@
width: 24%
position: sticky
top: 16px
align-self: flex-start
align-self: flex-start
.info-box
margin-left: -1.6em
line-height: 1.6em
.time-info, .stat-info
font-size: 14px
.big
font-size: 16px
.author
font-size: 16px
font-weight: bold

@ -56,7 +56,7 @@ span::selection
background-color: rgb(197, 194, 165);
&::-webkit-scrollbar-thumb
border-radius: 0px;
background: rgb(74 71 62);
background: rgb(74, 71, 62);
&::-webkit-scrollbar
width: 10px;
height: 10px;

Loading…
Cancel
Save