-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 992a763
- Loading branch information
Showing
3 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
{{ define "content" }} | ||
{{ with .Data}} | ||
<main class="container"> | ||
<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 .Type "blob" }} | ||
<a href="?download=true"><h2 class="message">Download <i class="material-icons">file_download</i></h2></a> | ||
{{ else}} | ||
<pre>{{ .StringifyContent }}</pre> | ||
<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> | ||
</main> | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters