diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/error.html | 5 | ||||
-rw-r--r-- | templates/error.qtpl | 16 | ||||
-rw-r--r-- | templates/media.html | 24 | ||||
-rw-r--r-- | templates/media.qtpl | 1 |
4 files changed, 16 insertions, 30 deletions
diff --git a/templates/error.html b/templates/error.html deleted file mode 100644 index cbde400..0000000 --- a/templates/error.html +++ /dev/null @@ -1,5 +0,0 @@ -{{template "layout.html" .}} -{{define "title"}} Not Found {{end}} -{{define "content"}} -{{.}} -{{end}} diff --git a/templates/error.qtpl b/templates/error.qtpl new file mode 100644 index 0000000..b71adc8 --- /dev/null +++ b/templates/error.qtpl @@ -0,0 +1,16 @@ +{% code +type ErrorPage struct { + Err string +} +%} + +{% func (p *ErrorPage) Title() %} +Error +{% endfunc %} + +{% func (p *ErrorPage) Content() %} +{%s p.Err %} +{% endfunc %} + +{% func (p *ErrorPage) Script() %} +{% endfunc %} diff --git a/templates/media.html b/templates/media.html deleted file mode 100644 index 188d5b4..0000000 --- a/templates/media.html +++ /dev/null @@ -1,24 +0,0 @@ -{{template "layout.html" .}} -{{define "title"}} {{.Title}} {{end}} -{{define "content"}} -<div class="columns is-multiline"> -{{range .Data.Medias}} -<div class="card"> - <div class="card-image"> - {{ if .IsVideo }} - <video controls muted="true" poster="/media/thumbnail?path_hash={{.PathHash}}" preload="none"> - <source src="/media/image?path_hash={{.PathHash}}" type="{{.MIMEType}}"> - </video> - {{ else }} - <figure class="image is-fit"> - <img src="/media/thumbnail?path_hash={{.PathHash}}"> - </figure> - {{ end }} - </div> -</div> -{{end}} -</div> -<div class="row"> - <a href="/media?page={{.Data.Next.Page}}" class="button is-pulled-right">next</a> -</div> -{{end}} diff --git a/templates/media.qtpl b/templates/media.qtpl index 88ce582..b9b3bf5 100644 --- a/templates/media.qtpl +++ b/templates/media.qtpl @@ -11,7 +11,6 @@ type MediaPage struct { Media {% endfunc %} - {% func (p *MediaPage) Content() %} <div class="columns is-multiline"> {% for _, media := range p.Medias %} |