mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
Add post_meta partial
This commit is contained in:
parent
35d9f72287
commit
ac8cec336b
4 changed files with 44 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
<div class="main">
|
||||
<div class="single block">
|
||||
<article class="post">
|
||||
<div class="post__meta meta mb">{{ partial "post_meta.html" . }}</div>
|
||||
<h1 class="post__title">{{ .Title }}</h1>
|
||||
<div class="post__content">{{ .Content }}</div>
|
||||
{{ if .Params.tags }}{{ partial "post_tags.html" . }}{{ end }}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<article class="post block">
|
||||
<h1 class="post__title"><a class="post__title-link" href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
|
||||
<div class="post__content">{{- .Summary }}</div>
|
||||
<div class="post__meta meta mt tar">{{ partial "post_meta.html" . }}</div>
|
||||
</article>
|
11
layouts/partials/post_meta.html
Normal file
11
layouts/partials/post_meta.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- if not .Date.IsZero }}
|
||||
<time class="post__meta-published meta-published" datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format ( .Site.Params.dateformat | default "January 02, 2006" )}}</time>
|
||||
{{ end }}
|
||||
{{- if ne .Date .Lastmod }}
|
||||
<time class="post__meta-lastmod meta-lastmod" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05" }}">Updated: {{ .Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006" )}}</time>
|
||||
{{- end }}
|
||||
{{- if .Params.categories }}
|
||||
<span class="post__meta-categories meta-categories">
|
||||
<span class="meta-categories__list">Categories: {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span>
|
||||
</span>
|
||||
{{- end }}
|
|
@ -346,6 +346,26 @@ mark {
|
|||
background-color: #f8ae00;
|
||||
}
|
||||
|
||||
.mt {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.mb {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.mla {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.tal {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tar {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
margin: 0 0 5px;
|
||||
|
@ -391,6 +411,17 @@ mark {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Post */
|
||||
.post__meta {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.post__meta-published,
|
||||
.post__meta-lastmod {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.post__tags {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue