lensfrex 1 year ago
parent 2eeacbd951
commit 1520426a7f
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 1
      layout/includes/_partials/information_card.pug
  2. 4
      layout/includes/_partials/post_list/post_list.pug
  3. 3
      source/css/_partials/index.styl
  4. 10
      source/css/_partials/post_list/post_item.styl

@ -35,6 +35,7 @@ mixin information_card(...extendData)
+data_row({name: "运行时间", value: "432天", value_id: "run_time"})
script.
const runTime = document.getElementById("run_time");
runTime.innerHtml = (Date.now() - ${startTime}) / 86400
hr
span.no-error-declaration NO ERROR

@ -2,7 +2,7 @@ include post_item.pug
.post-list
- const posts = page.posts
- const MAX_SUMMARY_LENGTH = 140
- const MAX_SUMMARY_LENGTH = 64
- posts.each(function(post) {
- const post_date = date(post.date, 'MM/DD/YYYY')
- const post_time = date(post.time === undefined ? post.date : post.time, 'HH:mm:ss')
@ -15,7 +15,7 @@ include post_item.pug
- const content = (post.more !== undefined) ? post.more : post.content
- const strip = strip_html(content).substr(0, MAX_SUMMARY_LENGTH)
- summary = strip.length < MAX_SUMMARY_LENGTH ? strip : strip + '...'
+post_item(post.title, post.cover, post_date, trim(summary), post_time, post.path)
+post_item(post.title, post.cover, post_date, trim(summary), post_time, url_for(post.path))
- })
include paginator.pug

@ -11,9 +11,10 @@
.post-list
background-color: rgba(231, 225, 199, 0.5)
height: fit-content
padding: 4px 32px
display: flex
flex-direction: column
gap: 16px
gap: 32px
width: 100%
// overflow-y: scroll
overflow-x: hidden

@ -6,7 +6,7 @@
gap: 16px
height: fit-content
transition: all 0.2s linear 0s
padding: 8px 8px
padding: 12px 12px
margin: 4px 4px
min-height: 144px;
&:hover
@ -74,7 +74,13 @@
justify-content: space-between
padding: 2px 6px
.post-summary
max-width: 80%
max-width: 50%
line-height: 2em
margin-top: 0.25em
overflow: hidden
display: -webkit-box
-webkit-line-clamp: 4
-webkit-box-orient: vertical;
.post-summary, .post-time
color: $dark
font-size: 16px
Loading…
Cancel
Save