From 9c7d6ee2e0e18834154853a8ceaf8f47c23163f5 Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Fri, 23 Dec 2022 15:13:46 +0100 Subject: [PATCH] post info --- assets/sass/_theme/sections/posts.sass | 80 ++++++++------------------ layouts/partials/posts/post-infos.html | 10 ++-- 2 files changed, 29 insertions(+), 61 deletions(-) diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index 2eb7f989..5e4ac43c 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -75,32 +75,6 @@ width: col-outside-container(4) .post-infos @include sticky($spacing1) - border-collapse: collapse - caption-side: bottom - font-size: $table-body-size - vertical-align: top - width: 100% - text-align: left - @include media-breakpoint-up(desktop) - font-size: $table-body-size-desktop - > li - display: flex - justify-content: space-between - padding-top: $spacing0 - padding-bottom: $spacing0 - padding-right: $spacing0 - border-top: 1px solid $color-border - &:first-child - border-top: 0 - > ul, time - text-align: right - flex: 1 - > ul:not(.share) - > li - a - @include link - color: $color-accent - text-decoration-color: rgba(0,0,0,0) // Safe spacing if post is empty .document-content min-height: 350px @@ -122,43 +96,37 @@ .post-infos margin-bottom: 0 @include meta - ul - @include list-reset - caption - @include visually-hidden - position: relative !important // Fix safari iOS border issue - th + @include list-reset + font-size: $table-body-size + @include media-breakpoint-up(desktop) + font-size: $table-body-size-desktop + > li @include meta - color: $color-text-alt - padding-left: 0 - white-space: nowrap - vertical-align: top - tr + display: flex + justify-content: space-between + padding-top: $spacing0 + padding-bottom: $spacing0 border-color: $color-border - @include meta - a - color: $color-accent - @include meta - &:not(:hover) - text-decoration-color: transparent - th, td padding: 1rem 0 - .multiple - - td:last-of-type - padding-right: 0 - text-align: right - tr:first-of-type - border-top: 0 - th, td - padding-top: 0 - tr:last-of-type - border-bottom: 0 + &:not(:first-child) + border-top: 1px solid $color-border + > span + @include meta + color: $color-text-alt + padding-left: 0 + white-space: nowrap + vertical-align: top + > ul + text-align: right + flex: 1 + a + @include meta + @include link($color-accent) .share justify-content: flex-end a color: inherit - li:last-child + li:last-child a margin-right: -$spacing0 .related diff --git a/layouts/partials/posts/post-infos.html b/layouts/partials/posts/post-infos.html index e84e564a..d4a3b027 100644 --- a/layouts/partials/posts/post-infos.html +++ b/layouts/partials/posts/post-infos.html @@ -1,30 +1,30 @@ <ul class="post-infos"> {{ if .Params.Categories }} <li> - + <span> {{- if gt (len .Params.Categories) 1 -}} {{ i18n "posts.categories" }} {{- else -}} {{ i18n "posts.category" }} {{- end -}} + </span> {{ partial "posts/categories.html" . }} </li> {{ end }} <li> - {{ i18n "posts.date" }} + <span>{{ i18n "posts.date" }}</span> <time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> </li> {{ range .GetTerms "authors" }} <li> - {{ i18n "posts.author" }} + <span>{{ i18n "posts.author" }}</span> <a href="{{ .Permalink }}" itemprop="url"> <span itemprop="name">{{ safeHTML .Params.person }} </a> </li> {{ end }} <li> - {{ i18n "posts.share" }} + <span>{{ i18n "posts.share" }}</span> {{ partial "commons/share.html" }} </li> - </ul> \ No newline at end of file -- GitLab