diff options
Diffstat (limited to 'themes/default/layouts/_default/section.media.html')
-rw-r--r-- | themes/default/layouts/_default/section.media.html | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/themes/default/layouts/_default/section.media.html b/themes/default/layouts/_default/section.media.html index 9191a3e..420035b 100644 --- a/themes/default/layouts/_default/section.media.html +++ b/themes/default/layouts/_default/section.media.html @@ -1,4 +1,4 @@ -{{ define "styles" }} +{{- define "styles" -}} {{- $author := partial "function-authors-data.html" . -}} {{- $author = $author.user -}} <style> @@ -14,11 +14,10 @@ text-decoration: underline; } </style> -{{ end }} +{{- end -}} -{{ define "middle" }} - - {{ partial "navigator-middle.html" +{{- define "middle" -}} + {{- partial "navigator-middle.html" (dict "Title" "Media" "Subtitle" (partial "count-media.html" .) @@ -28,43 +27,42 @@ "Id" "back" "Context" . ) - }} + -}} - {{ partial "profile.html" . }} + {{- partial "profile.html" . -}} {{- $author := partial "function-authors-data.html" . -}} {{- $author = $author.user -}} - {{ $count := 0 }} - {{ $result := false }} + {{- $count := 0 -}} + {{- $result := false -}} - {{ range .Site.RegularPages }} - {{ if or + {{- range .Site.RegularPages -}} + {{- if or (in .Content "<figure>") (in .Content "<imgur-video>") (in .Content "<youtube-video>") (in .Content "<video-container>") - }} - {{ if eq .Type $author }} - {{ $result = true }} - {{ $count = add $count 1 }} - {{ if le $count 10 }} - {{ .Render "summary" }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} + -}} + {{- if eq .Type $author -}} + {{- $result = true -}} + {{- $count = add $count 1 -}} + {{- if le $count 10 -}} + {{- partial "render-embed.html" . -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} - {{ if not $result }} + {{- if not $result -}} <footer> <code>No media found!</code> </footer> - {{ end }} - - {{ partial "pagination.html" . }} + {{- end -}} -{{ end }} + {{- partial "pagination.html" . -}} +{{- end -}} -{{ define "right" }} +{{- define "right" -}} {{- partial "navigator-right.html" . -}} -{{ end }} +{{- end -}} |