mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
Add post_tags partial
This commit is contained in:
parent
8dd523595d
commit
8ea72745ac
3 changed files with 21 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
<article class="post">
|
||||
<h1 class="post__title">{{ .Title }}</h1>
|
||||
<div class="post__content">{{ .Content }}</div>
|
||||
{{ if .Params.tags }}{{ partial "post_tags.html" . }}{{ end }}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
|
8
layouts/partials/post_tags.html
Normal file
8
layouts/partials/post_tags.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ if isset $.Params "tags" }}
|
||||
{{ $tagsLen := len $.Params.tags }}
|
||||
{{ if gt $tagsLen 0 }}
|
||||
<div class="post__tags">
|
||||
{{ range $k, $v := $.Params.tags }}<a class="post__tag" href="{{ "/tags/" | relLangURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -374,6 +374,18 @@ summary {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post__tags {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.post__tag {
|
||||
display: inline-block;
|
||||
padding: 0 6px 3px;
|
||||
margin: 0 5px 5px 0;
|
||||
line-height: 1.5;
|
||||
background: #151515;
|
||||
}
|
||||
|
||||
/* Pagination */
|
||||
.pagination {
|
||||
margin-bottom: 10px;
|
||||
|
|
Loading…
Reference in a new issue