diff options
author | tdro <tdro@noreply.example.com> | 2023-01-28 23:19:09 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-01-28 23:19:09 -0500 |
commit | ec9d8921713a8efae445299ca9a30f741c905da3 (patch) | |
tree | b59dce952c5f3e68300da47aa99e17dbfd764a60 /themes/default/layouts/_default/section.media.html | |
parent | ad16ca0ca6c068403fd359bcf9729db75b8321ac (diff) | |
download | canory-ec9d8921713a8efae445299ca9a30f741c905da3.tar.gz canory-ec9d8921713a8efae445299ca9a30f741c905da3.tar.bz2 canory-ec9d8921713a8efae445299ca9a30f741c905da3.zip |
themes/default/layouts/_default: Name spacing
Make list.html -> index.html and identify sections by name. Ignore Deno vendor
folder.
Diffstat (limited to 'themes/default/layouts/_default/section.media.html')
-rw-r--r-- | themes/default/layouts/_default/section.media.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/section.media.html b/themes/default/layouts/_default/section.media.html new file mode 100644 index 0000000..a140801 --- /dev/null +++ b/themes/default/layouts/_default/section.media.html @@ -0,0 +1,68 @@ +{{ define "styles" }} +{{ $author := partial "author-user.html" . }} +<style> + {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }} + + tab-bar a[href="{{ .Site.BaseURL }}/{{ $author }}/media/"] { + color: #111; + color: var(--foreground); + display: inherit; + font-weight: 700; + text-decoration-color: #014cc6; + text-decoration-color: var(--link); + text-decoration: underline; + } +</style> +{{ end }} + +{{ define "middle" }} + + {{ partial "navigator-middle.html" + (dict + "Title" "Media" + "Subtitle" (partial "count-media.html" .) + "Icon" "arrow-left" + "IconLabel" "Back" + "Href" "/" + "Id" "back" + "Context" . + ) + }} + + {{ partial "profile.html" . }} + + {{- $author := partial "author-user.html" . -}} + + {{ $count := 0 }} + {{ $result := false }} + + {{ range .Site.Pages }} + {{ 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 not $result }} + <footer> + <code>No media found!</code> + </footer> + {{ end }} + + {{ partial "pagination.html" . }} + +{{ end }} + +{{ define "right" }} + {{- partial "navigator-right.html" . -}} +{{ end }} |