diff --git a/layout/includes/_partials/information_card.pug b/layout/includes/_partials/information_card.pug index 57377e3..317f704 100644 --- a/layout/includes/_partials/information_card.pug +++ b/layout/includes/_partials/information_card.pug @@ -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 diff --git a/layout/includes/_partials/post_list/post_list.pug b/layout/includes/_partials/post_list/post_list.pug index b54055b..5bc2589 100644 --- a/layout/includes/_partials/post_list/post_list.pug +++ b/layout/includes/_partials/post_list/post_list.pug @@ -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 \ No newline at end of file diff --git a/source/css/_partials/index.styl b/source/css/_partials/index.styl index f987015..20df799 100644 --- a/source/css/_partials/index.styl +++ b/source/css/_partials/index.styl @@ -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 diff --git a/source/css/_partials/post_list/post_item.styl b/source/css/_partials/post_list/post_item.styl index a9494dd..475876c 100644 --- a/source/css/_partials/post_list/post_item.styl +++ b/source/css/_partials/post_list/post_item.styl @@ -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 \ No newline at end of file