filebrowser/_embed/templates/single.tmpl

24 lines
821 B
Cheetah
Raw Normal View History

2016-06-11 13:32:50 +00:00
{{ define "content" }}
2016-08-21 19:10:12 +00:00
{{ with .Data}}
2017-02-03 11:59:54 +00:00
<main class="container">
2016-06-11 13:32:50 +00:00
{{ if eq .Type "image" }}
2017-02-03 11:59:54 +00:00
<center><img src="{{ .URL }}?raw=true"></center>
{{ else if eq .Type "audio" }}
<audio src="{{ .URL }}?raw=true" controls></audio>
{{ else if eq .Type "video" }}
<video src="{{ .URL }}?raw=true" controls>
Sorry, your browser doesn't support embedded videos,
but don't worry, you can <a href="?download=true">download it</a>
and watch it with your favorite video player!
</video>
{{ else if eq .Extension ".pdf" }}
<object class="pdf" data="{{ .URL }}?raw=true"></object>
{{ else if eq .Type "blob" }}
<a href="?download=true"><h2 class="message">Download <i class="material-icons">file_download</i></h2></a>
{{ else}}
<pre>{{ .StringifyContent }}</pre>
2016-06-11 13:32:50 +00:00
{{ end }}
2017-02-03 11:59:54 +00:00
</main>
2016-08-21 19:10:12 +00:00
{{ end }}
2016-06-11 13:32:50 +00:00
{{ end }}