From ff9ee263ad1f5aae357da755e49949b567c10eff Mon Sep 17 00:00:00 2001 From: jk Date: Mon, 23 Nov 2020 23:59:08 +0000 Subject: [PATCH] some style changes --- layouts/_default/section.html | 38 ++++-- layouts/partials/pagination.html | 4 +- .../nipponalba/layouts/_default/single.html | 33 +++-- themes/nipponalba/layouts/index.html | 41 +++++-- themes/nipponalba/static/css/style.css | 116 ++++++++++++------ 5 files changed, 155 insertions(+), 77 deletions(-) diff --git a/layouts/_default/section.html b/layouts/_default/section.html index a9c8e174..12faa351 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -12,30 +12,50 @@
{{if eq .Type "article" }}
{{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}

{{ .Title }}

{{ .Description }}{{ end }} {{ if eq .Type "article" }}
- {{ with .Page.Params.Blog }}Blog: {{ partial "taxonomy/blog.html" . }}{{ end }}
- {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}{{ .ReadingTime }}-minute read
- {{ with .Page.Params.tag }}Tags: {{ partial "taxonomy/tags.html" . }}{{ end }} + {{ .ReadingTime }}-minute read

+ {{ with .Page.Params.Blog }} {{ partial "taxonomy/blog.html" . }}{{ end }}
+ {{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}
{{ end }}
- {{ .Content }} + {{ if eq .Type "article"}}{{ .Summary }}{{else}}{{ .Content }}{{end}} {{ if eq .Type "photo"}} -
+
{{$link := .Permalink}} {{$summary := .Content}} {{ range .Page.Params.Photo }} {{ if isset . "value" }} - {{ .alt }} + {{ .alt }} {{ else }} - Alt not yet added, will fix! + Alt not yet added, will fix! {{end}}{{end}}
{{end}}

{{ if not (eq .Type "article") }}
- {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}
+ {{ $mention_ids := index $.Site.Data.index .RelPermalink }} + + {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }} + {{ $.Scratch.Set "likecount" 0 }} + {{ $.Scratch.Set "sharecount" 0 }} + {{ $.Scratch.Set "commentcount" 0 }} + {{ $.Scratch.Set "mentioncount" 0 }} + {{ range $mentions }} + {{ if eq (index . "wm-property") "like-of" }}{{ $.Scratch.Add "likecount" 1 }}{{ end }} + {{ if eq (index . "wm-property") "repost-of" }}{{ $.Scratch.Add "sharecount" 1 }}{{ end }} + {{ if eq (index . "wm-property") "in-reply-to" }}{{ $.Scratch.Add "commentcount" 1 }}{{ end }} + {{ if eq (index . "wm-property") "mention" }}{{ $.Scratch.Add "mentioncount" 1 }}{{ end }} + {{ end }} + {{ $likecount := $.Scratch.Get "likecount" }}{{ if ne $likecount 0 }} {{$likecount}} like{{if gt $likecount 1}}s{{end}}{{end}} + {{ $sharecount := $.Scratch.Get "sharecount" }}{{ if ne $sharecount 0 }} {{$sharecount}} share{{if gt $sharecount 1}}s{{end}}{{end}} + {{ $commentcount := $.Scratch.Get "commentcount" }}{{ if ne $commentcount 0 }} {{$commentcount}} repl{{if gt $commentcount 1}}ies{{else}}y{{end}}{{end}} + {{ $mentioncount := $.Scratch.Get "mentioncount" }}{{ if ne $mentioncount 0 }} {{$mentioncount}} mention{{if gt $mentioncount 1}}s{{end}}{{end}} + + {{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}
{{ end }}
-
+ {{ else }}