Skip to content
Snippets Groups Projects
Commit 70cd535a authored by Olivia206's avatar Olivia206
Browse files

fixed post meta alignment

parent d04858a8
No related branches found
No related tags found
No related merge requests found
......@@ -38,26 +38,20 @@
@include icon(arrow-right, after, true)
p[itemprop="articleBody"]
margin-top: $spacing1
.post-meta
display: flex
flex-wrap: wrap
gap: half($spacing0)
.post-author
&::after
content: '—'
p
display: inline
&::before
display: none
.post-categories
margin-top: half($spacing0)
li
display: inline-flex
&:not(:last-child)::after
content: ', '
.post-author
p::before
display: none
@include media-breakpoint-down(desktop)
.post + .post
margin-top: $spacing2
.post-meta
.post-author
display: inline-flex
&::after
content: '—'
margin: 0 half($spacing0)
.post-categories
display: flex
@include media-breakpoint-up(desktop)
.large
.post
......@@ -65,16 +59,36 @@
gap: half($grid-gutter)
+ .post
margin-top: $spacing2
.post-meta
display: inline
.post-meta
> *
display: inline
&:not(:first-child)::before
content: '—'
margin-right: half($spacing0)
> time
display: inline-block
margin-top: -2px
.post-author
p
display: inline
li
margin-right: $spacing0
.post-categories
li
display: inline-flex
margin-right: $spacing0
padding-bottom: 3px
&:not(:last-child)::after
content: ','
@include in-page-with-sidebar
.large
.post
@include media-breakpoint-down(xl)
flex-direction: column
@include media-breakpoint-up(xl)
.media,
.post-content
width: calc(#{col(4, 8)} + #{half($grid-gutter)})
.media,
.post-content
width: calc(#{col(4, 8)} + #{half($grid-gutter)})
@include in-page-without-sidebar
.large
.post
......
......@@ -55,7 +55,7 @@ params:
date_format: ":date_long"
index:
show_categories: true
show_author: false
show_author: true
show_description: true
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
......
......@@ -28,11 +28,11 @@
{{- partial "posts/author" . -}}
{{ end }}
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time>
{{ if site.Params.posts.index.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
</div>
{{ if site.Params.posts.index.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
{{ if site.Params.posts.index.show_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment