pollux.codes

Files for the pollux.codes site
git clone git://pollux.codes/git/pollux.codes.git
Log | Files | Refs

list.html (950B)


      1 {{ define "main" }}
      2 {{ .Content }}
      3 <hr>
      4 {{ with .Site.Taxonomies.arttags.ByCount }}
      5 {{ range $k, $term := . }}{{ if $k }}, {{ end }}<a href="{{ "/art/tags/" | relLangURL}}{{ .Name | urlize }}">{{ .Name }} ({{ len .WeightedPages }})</a>{{ end }}
      6 {{ end }}
      7 <hr>
      8 {{ range .Pages }}
      9 <h2>{{ .Date.Format "2006-01-02" }} {{ .Title }}</h2>
     10 {{ $file := printf "artwork/%s" .Params.file }}
     11 {{ $image := resources.GetMatch $file }}
     12 {{ $imageSmall := $image.Resize "512x" }}
     13 {{ $imageBlur := $imageSmall.Filter (images.GaussianBlur 32) }}
     14 {{ $sizemb := (div (div (len $image.Content) 104858) 10.0) }}
     15 <p><i>{{ $image.Width }}x{{ $image.Height }}, {{ $sizemb }}MiB</i>{{ range .GetTerms "arttags" }}, <a href="{{ .RelPermalink }}">{{ lower .Title }}</a>{{ end }}</p>
     16 {{ .Content }}
     17 <a href="{{ .RelPermalink }}"><img src="{{if .Params.censor }}{{ $imageBlur.RelPermalink }}{{ else }}{{ $imageSmall.RelPermalink }}{{ end }}" width="100%"></a>
     18 {{ end }}
     19 {{ end }}