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 script
- const beginTime = theme.beginTime - const beginTime = theme.beginTime
- const millisecond = moment(beginTime.time, beginTime.format).valueOf() - 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 + '天'}; | document.getElementById("run_time").textContent = runTime + '天'};
+data_row({name: "页面构建时间", value: "0天前", value_id: "last_build_time"}) +data_row({name: "页面构建时间", value: "0天前", value_id: "last_build_time"})
script script
- const buildTime = Date.now() - const buildTime = Date.now()
| {const buildTime = parseInt((Date.now() - !{buildTime}) / 86400000); | {const buildTime = parseInt((Date.now() - #{buildTime}) / 86400000);
| document.getElementById("last_build_time").textContent = | document.getElementById("last_build_time").textContent =
| (buildTime == 0) ? '今天' : buildTime + '天前'}; | (buildTime == 0) ? '今天' : buildTime + '天前'};

@ -1,7 +1,15 @@
extends includes/layout.pug extends includes/layout.pug
include includes/_partials/information_card.pug
block content block content
article#page .markdown-container
h1= page.title .content
!= page.content include includes/_partials/left_declaration.pug
#paginator!= paginator()
.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 .markdown-container
.content .content
include includes/_partials/left_declaration.pug include includes/_partials/left_declaration.pug
.article-container .article-container
h1= page.title .article-header
hr h1.article-title= page.title
!= page.content 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 .side-information
+information_card({name: '全站总字数', value: totalcount(site)}) +information_card({name: '全站总字数', value: totalcount(site)})
//- script(src="/js/code.js")

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

@ -5,6 +5,8 @@
flex-direction: row flex-direction: row
justify-content: space-between justify-content: space-between
gap: 16px gap: 16px
.article-title
font-size: 3em
.content .content
width: 73%; width: 73%;
display: flex; display: flex;
@ -26,4 +28,14 @@
width: 24% width: 24%
position: sticky position: sticky
top: 16px 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); background-color: rgb(197, 194, 165);
&::-webkit-scrollbar-thumb &::-webkit-scrollbar-thumb
border-radius: 0px; border-radius: 0px;
background: rgb(74 71 62); background: rgb(74, 71, 62);
&::-webkit-scrollbar &::-webkit-scrollbar
width: 10px; width: 10px;
height: 10px; height: 10px;

Loading…
Cancel
Save