2017-06-25 08:11:25 +00:00
|
|
|
{{ define "content" }}
|
2017-06-27 18:00:58 +00:00
|
|
|
|
|
|
|
<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>
|
2017-06-25 08:11:25 +00:00
|
|
|
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!
|
2017-06-27 18:00:58 +00:00
|
|
|
</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>
|
|
|
|
|
2017-06-25 08:11:25 +00:00
|
|
|
{{ end }}
|