Skip to content
Snippets Groups Projects
Commit 27da429d authored by Olivia206's avatar Olivia206
Browse files

changed posts aside

parent 7f5faab7
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,32 @@
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
......
<table class="post-infos">
<caption>{{ i18n "posts.informations" }}</caption>
<tbody>
{{ if .Params.Categories }}
<tr>
<th scope="row">
{{- if gt (len .Params.Categories) 1 -}}
{{ i18n "posts.categories" }}
{{- else -}}
{{ i18n "posts.category" }}
{{- end -}}
</th>
<td itemprop="articleSection" {{ if gt (len .Params.Categories) 1 }} class="multiple" {{ end }}>
{{ partial "posts/categories.html" . }}
</td>
</tr>
{{ end }}
<tr>
<th scope="row">{{ i18n "posts.date" }}</th>
<td>
<time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time>
</td>
</tr>
{{ range .GetTerms "authors" }}
<tr>
<th scope="row">{{ i18n "posts.author" }}</th>
<td itemscope itemtype="https://schema.org/Person" itemprop="author">
<a href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{ safeHTML .Params.person }}</span>
</a>
</td>
</tr>
{{ end }}
<tr>
<th scope="row">{{ i18n "posts.share" }}</th>
<td>
{{ partial "commons/share.html" }}
</td>
</tr>
</tbody>
</table>
<ul class="post-infos">
{{ if .Params.Categories }}
<li>
{{- if gt (len .Params.Categories) 1 -}}
{{ i18n "posts.categories" }}
{{- else -}}
{{ i18n "posts.category" }}
{{- end -}}
{{ partial "posts/categories.html" . }}
</li>
{{ end }}
<li>
{{ i18n "posts.date" }}
<time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time>
</li>
{{ range .GetTerms "authors" }}
<li>
{{ i18n "posts.author" }}
<a href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{ safeHTML .Params.person }}
</a>
</li>
{{ end }}
<li>
{{ i18n "posts.share" }}
{{ partial "commons/share.html" }}
</li>
</ul>
\ No newline at end of file
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