Henrique Dias 826d491ff1 rebuilding js
Former-commit-id: 027e2f6546614d28750e437b9a3545cb95235d9d [formerly 6dbfe621a5774304295c17f216b5c96beaaaa95a] [formerly d44822f30d9a3649b20daa7a3cdbf86c87e63c99 [formerly 325855234967d92bf42b77b17fd8affdcc7f1392]]
Former-commit-id: 7f34ddc1b32076c6ad2c2a4374b170b7f5d84000 [formerly aaafd299a933d25ebcb5fdebe1b00cb9e8309d7a]
Former-commit-id: 7bb183c165ba2c9711ba1c04e3af6e2048245ded
2017-06-27 19:00:58 +01:00

36 lines
1.0 KiB
Cheetah

{{ define "content" }}
<div id="previewer">
<div class="bar">
<button class="action" aria-label="Close Preview" id="close">
<i class="material-icons">close</i>
</button>
{{ template "info-button" }}
</div>
<div class="preview">
{{ with .Data}}
{{ if eq .Type "image" }}
<img src="{{ .URL }}?raw=true">
{{ 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>
{{ end }}
{{ end }}
</div>
</div>
{{ end }}