improvements

Former-commit-id: e648350a0ca0af302ba8b929ac653433beb0e61c
This commit is contained in:
Henrique Dias
2017-06-25 09:11:25 +01:00
parent 61a9a30c0e
commit 048c69af22
35 changed files with 4335 additions and 15 deletions

View File

@@ -0,0 +1,23 @@
{{ define "content" }}
{{ with .Data}}
<main class="container">
{{ if eq .Type "image" }}
<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>
{{ end }}
</main>
{{ end }}
{{ end }}