from /tags to tiles
This commit is contained in:
+14
-12
@@ -1,24 +1,26 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ $tag := .Name }}
|
||||
{{ $tile := . }}
|
||||
{{ $title := .Name }}
|
||||
{{ range where .Site.RegularPages "Type" "tiles" }}
|
||||
{{ if eq .Params.CorrespondingTagName $tag }}
|
||||
{{ $tile = . }}
|
||||
{{ $title = .Title }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post">
|
||||
<div class="post-meta">
|
||||
<div class="post-content">
|
||||
{{ if .Description }}
|
||||
{{ .Description | markdownify }}
|
||||
{{ end }}
|
||||
<h1 class="post-subtitle">{{ .Title | markdownify }}</h1>
|
||||
<h1 class="post-subtitle">{{ $title | markdownify }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ if $tile }}
|
||||
{{ partial "tag-cover.html" $tile }}
|
||||
{{ end }}
|
||||
{{ partial "tag-cover.html" . }}
|
||||
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user