diff options
author | uPagge <upagge@mail.ru> | 2020-12-14 21:26:00 +0300 |
---|---|---|
committer | uPagge <upagge@mail.ru> | 2020-12-14 21:26:00 +0300 |
commit | 9dfeb2d656b8b431e60f01768a0702a77c1a86c4 (patch) | |
tree | cb5dc33829e261f3caf63c95442ef6a03f1f638b /layouts/_default/summary.html | |
parent | 63431db4f5fb1bb27f135492769a4d979b958fe0 (diff) |
summary.html
Diffstat (limited to 'layouts/_default/summary.html')
-rw-r--r-- | layouts/_default/summary.html | 70 |
1 files changed, 45 insertions, 25 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 635abfe..3aac10b 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,6 +1,8 @@ {{- $params := .Params | merge .Site.Params -}} +{{- $tagsStyle := $params.mini.tags -}} +{{- $tagsTheme := $params.mini.tags.theme | default "image" -}} -<article onclick="location.href='{{ $.RelPermalink }}'" class="single summary summary-animation" itemscope itemtype="http://schema.org/Article"> +<article onclick="location.href='{{ $.RelPermalink }}'" class="single summary summary-animation" itemscope itemtype="http://schema.org/Article" style="{{- if eq $tagsTheme "under-footer" -}}{{- with $.Params.tags -}}margin-bottom:0{{- end -}}{{- end -}}"> {{- /* Featured image */ -}} {{- if not $params.mini.hiddenImage -}} {{- $image := $params.featuredimagepreview | default $params.featuredimage -}} @@ -12,6 +14,16 @@ {{- end -}} {{- with $image -}} <div class="featured-image-preview"> + {{- if eq $tagsTheme "image" -}} + {{- with $.Params.tags -}} + <div class="post-tags-summary-image"> + {{- range $index, $value := . -}} + {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}} + <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}">{{ $tag.Title }}</a> + {{- end -}} + </div> + {{- end -}} + {{- end -}} {{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}} </div> {{- end -}} @@ -22,17 +34,6 @@ {{ .Title }} </h2> - {{- /* Summary content */ -}} - {{- if not $params.mini.hiddenDescription -}} - <div class="content mini-content"> - {{- with .Summary -}} - {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} - {{- else -}} - {{- .Description | safeHTML -}} - {{- end -}} - </div> - {{- end -}} - {{- if not $params.mini.hiddenMeta -}} {{- /* Meta */ -}} <div class="post-meta mini-post-meta"> @@ -74,18 +75,37 @@ </div> {{- end -}} - {{- /* Footer */ -}} -<!-- <div class="post-footer">--> -<!-- {{- with .Params.tags -}}--> -<!-- <div class="post-tags-summary">--> -<!-- <i class="fas fa-tags fa-fw"></i> --> -<!-- {{- range $index, $value := . -}}--> -<!-- {{- if gt $index 0 }}, {{ end -}}--> -<!-- {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}--> -<!-- <a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>--> -<!-- {{- end -}}--> -<!-- </div>--> -<!-- {{- end -}}--> -<!-- </div>--> + {{- /* Summary content */ -}} + {{- if not $params.mini.hiddenDescription -}} + <div class="content mini-content"> + {{- with .Summary -}} + {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} + {{- else -}} + {{- .Description | safeHTML -}} + {{- end -}} + </div> + {{- end -}} + + {{- if eq $tagsTheme "footer" -}} + {{- with $.Params.tags -}} + <div class="post-tags-summary-footer"> + {{- range $index, $value := . -}} + {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}} + <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}">{{ $tag.Title }}</a> + {{- end -}} + </div> + {{- end -}} + {{- end -}} + </div> </article> +{{- if eq $tagsTheme "under-footer" -}} +{{- with $.Params.tags -}} +<div class="post-tags-summary-under-footer"> + {{- range $index, $value := . -}} + {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}} + <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}">{{ $tag.Title }}</a> + {{- end -}} +</div> +{{- end -}} +{{- end -}} |