2017-11-10 12:39:55 +01:00
|
|
|
{{define "file_viewer"}}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2017-12-12 23:33:41 +01:00
|
|
|
<title>{{.Title}}</title>
|
2017-11-10 12:39:55 +01:00
|
|
|
<meta charset="UTF-8"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
2019-02-18 13:41:50 +01:00
|
|
|
{{template "user_style" .}}
|
2019-02-20 22:46:35 +01:00
|
|
|
<link rel="stylesheet" href="/res/style/viewer.css?v1"/>
|
|
|
|
<link rel="stylesheet" href="/res/style/layout.css?v1"/>
|
2017-11-10 12:39:55 +01:00
|
|
|
<link rel="shortcut icon" href="/res/img/tray32.png"/>
|
|
|
|
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain.png"/>
|
|
|
|
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_big.png"/>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-12-17 18:10:59 +01:00
|
|
|
<!-- <link rel="alternate" type="application/json+oembed" th:href="*{oEmbedHref}" th:title="*{ogTitle}" /> OEmbed will return soon -->
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-11-10 12:39:55 +01:00
|
|
|
{{template "bgpattern"}}
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-12-11 20:45:55 +01:00
|
|
|
<meta name="theme-color" content="#202020"/>
|
2017-12-17 18:10:59 +01:00
|
|
|
<meta name="twitter:image" content="{{.OGData.Image}}" />
|
|
|
|
<meta property="og:title" content="{{.OGData.Title}}" />
|
|
|
|
<meta property="og:type" content="{{.OGData.Type}}" />
|
|
|
|
<meta property="og:site_name" content="{{.OGData.SiteName}}" />
|
|
|
|
<meta property="og:description" content="{{.OGData.Description}}" />
|
|
|
|
<meta property="description" content="{{.OGData.Description}}" />
|
|
|
|
<meta property="og:url" content="{{.OGData.URL}}" />
|
|
|
|
<meta property="og:image" content="{{.OGData.Image}}" />
|
|
|
|
<meta property="og:image:url" content="{{.OGData.Image}}" />
|
2017-11-10 12:39:55 +01:00
|
|
|
<meta property="article:author" content="Fornax96" />
|
2017-12-17 18:10:59 +01:00
|
|
|
<link rel="image_src" href="{{.OGData.Image}}" />
|
2018-09-11 21:35:44 +02:00
|
|
|
|
2019-03-27 23:57:53 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
var apiEndpoint = '{{.APIEndpoint}}';
|
|
|
|
var captchaKey = '{{.Other.CaptchaKey}}';
|
|
|
|
</script>
|
2017-11-10 12:39:55 +01:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="listNavigator">
|
|
|
|
<div id="listNavigatorItems"></div>
|
2018-01-07 21:42:19 +01:00
|
|
|
<div id="arrow-left" alt="Previous Item" onClick="ListNavigator.previousItem();"></div>
|
|
|
|
<div id="arrow-right" alt="Next Item" onClick="ListNavigator.nextItem();"></div>
|
2017-11-10 12:39:55 +01:00
|
|
|
</div>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button id="button-expand-toolbar" onClick="Toolbar.toggle();">Show Toolbar</button>
|
2017-11-10 12:39:55 +01:00
|
|
|
<div id="toolbar">
|
|
|
|
<!-- Ugly workaround to get rid of the scrollbar in non-webkit browsers -->
|
|
|
|
<div>
|
|
|
|
<div>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="toolbar_button button_full_width" onClick="Toolbar.toggle();">Hide Toolbar</button>
|
2017-11-10 12:39:55 +01:00
|
|
|
|
2019-03-26 20:53:19 +01:00
|
|
|
<div id="stat_views_label" class="toolbar_label">Views</div>
|
|
|
|
<div id="stat_views" style="text-align: center;">N/A</div>
|
|
|
|
<div id="stat_downloads_label" class="toolbar_label">Downloads</div>
|
|
|
|
<div id="stat_downloads" style="text-align: center;">N/A</div>
|
2017-11-10 12:39:55 +01:00
|
|
|
|
2019-05-13 20:33:31 +02:00
|
|
|
<a href="/" id="btnHome" class="toolbar_button button_full_width button">
|
2018-07-09 23:19:16 +02:00
|
|
|
<img src="/res/img/pixeldrain_small.png" alt="Back to the Home page"/>
|
|
|
|
<span>Home</span>
|
|
|
|
</a>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button id="btnDownload" class="toolbar_button button_full_width" onClick="Toolbar.download();">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/floppy_small.png" alt="Download this file"/>
|
|
|
|
<span>Download</span>
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button id="btnCopy" class="toolbar_button button_full_width" onClick="Toolbar.copyUrl();">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/clipboard_small.png" alt="Copy file URL to clipboard"/>
|
|
|
|
<span>Copy</span>
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button id="btnShare" class="toolbar_button button_full_width" onClick="Sharebar.toggle();">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/share_small.png" alt="Share this file on social media"/>
|
|
|
|
<span>Share</span>
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button id="btnDetails" class="toolbar_button button_full_width" onClick="DetailsWindow.toggle();">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/info_small.png" alt="Help"/>
|
|
|
|
<span>Details</span>
|
|
|
|
</button>
|
2019-05-15 11:50:48 +02:00
|
|
|
{{template "advertisement" .}}
|
2017-11-10 12:39:55 +01:00
|
|
|
|
2019-02-20 22:46:35 +01:00
|
|
|
<!-- This frame will load the download URL when a download button is pressed -->
|
|
|
|
<iframe id="download_frame" style="display: none; width: 1px; height: 1px;"></iframe>
|
2017-11-10 12:39:55 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-11-10 12:39:55 +01:00
|
|
|
<div id="sharebar" class="sidebar">
|
|
|
|
Share on:<br/>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('https://www.reddit.com/submit?url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_reddit.png" alt="Share on Reddit" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Reddit
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('https://voat.co/submit?linkpost=true&url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_voat.png" alt="Share on Voat" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Voat
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('http://www.facebook.com/sharer.php?u=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_facebook.png" alt="Share on Facebook" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Facebook
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('https://twitter.com/share?text=Check%20out%20this%20file%20on%20%23Pixeldrain&url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_twitter.png" alt="Share on Twitter" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Twitter
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('https://plus.google.com/share?url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_googleplus.png" alt="Share on Google Plus" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Google+
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('http://www.tumblr.com/share/link?url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_tumblr.png" alt="Share on Tumblr" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>Tumblr
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('http://www.stumbleupon.com/submit?url=' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_stumbleupon.png" alt="Share on StumbleUpon" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>StumbleUpon
|
|
|
|
</button>
|
2018-01-07 21:42:19 +01:00
|
|
|
<button class="sharebar-button button_full_width" onClick="window.open('mailto:please@set.address?subject=File%20on%20PixelDrain&body=You%20can%20view%20it%20here%20' + window.location.href);">
|
2017-11-10 12:39:55 +01:00
|
|
|
<img src="/res/img/social_email.png" alt="Share on E-Mail" style="width:40px; height: 40px;"/>
|
|
|
|
<br/>E-Mail
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
2018-09-11 21:35:44 +02:00
|
|
|
<div id="info_popup" class="full_popup">
|
2019-02-18 21:11:42 +01:00
|
|
|
<img
|
|
|
|
alt="Close"
|
|
|
|
src="/res/img/cross.png"
|
|
|
|
style="position: absolute; top: 5px; right: 5px; width: 40px; height: 40px; cursor: pointer;"
|
|
|
|
onclick="DetailsWindow.toggle();"
|
|
|
|
/>
|
2017-11-10 12:39:55 +01:00
|
|
|
<h3>File Info</h3>
|
2018-09-11 21:35:44 +02:00
|
|
|
<span id="info_file_details"></span>
|
|
|
|
<span id="info_about">
|
|
|
|
<h3>About</h3>
|
|
|
|
Pixeldrain is a file sharing platform.
|
|
|
|
<a href="/" target="_blank">Visit the home page for more information.</a>
|
|
|
|
|
|
|
|
<h3>Keyboard Controls</h3>
|
|
|
|
<table>
|
|
|
|
<tr><td colspan="2">File Shortcuts</td></tr>
|
|
|
|
<tr><td>c</td><td> = Copy URL of this page</td></tr>
|
|
|
|
<tr><td>i</td><td> = Toggle details window (this window)</td></tr>
|
|
|
|
<tr><td>s</td><td> = Download the file you are currently viewing</td></tr>
|
|
|
|
<tr><td colspan="2">List Shortcuts</td></tr>
|
|
|
|
<tr><td>a or ←</td><td> = View previous item in list</td></tr>
|
|
|
|
<tr><td>d or →</td><td> = View next item in list</td></tr>
|
|
|
|
<tr><td>r</td><td> = Toggle shuffle (<b><u>r</u></b>andom)</td></tr>
|
|
|
|
<tr><td>SHIFT + s</td><td> = Download all the files in the list as a zip archive</td></tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h3>Credits</h3>
|
|
|
|
All server side code written by
|
|
|
|
<a target="_blank" href="https://fornaxian.com/">Fornax (me)</a>.
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
Code syntax highlighting is by
|
|
|
|
<a target="_blank" href="https://github.com/google/code-prettify">Google Code-prettify</a>.
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
Thanks to the Mozilla team for their wonderful PDF viewer
|
|
|
|
<a target="_blank" href="https://github.com/mozilla/pdf.js">pdf.js</a>.
|
|
|
|
<br/>
|
|
|
|
</span>
|
2017-11-10 12:39:55 +01:00
|
|
|
</div>
|
2019-03-28 10:47:27 +01:00
|
|
|
<div id="captcha_popup" class="captcha_popup border_bottom">
|
|
|
|
<div id="captcha_popup_title" class="highlight_light border_top border_bottom"></div>
|
|
|
|
<div id="captcha_popup_content"></div>
|
|
|
|
<br/>
|
|
|
|
<div id="captcha_popup_captcha" style="text-align: center;"></div>
|
|
|
|
</div>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-11-10 12:39:55 +01:00
|
|
|
<div id="filepreview">
|
2018-10-10 23:05:49 +02:00
|
|
|
<img src="/res/img/misc/loadthink.gif" style="margin-top: 20%; width: 200px; height: 200px;" />
|
2017-11-10 12:39:55 +01:00
|
|
|
</div>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2018-01-07 21:42:19 +01:00
|
|
|
<script src="/res/script/jquery.js"></script>
|
2017-11-10 12:39:55 +01:00
|
|
|
<script src="/res/script/Keyboard.js"></script>
|
|
|
|
<script src="/res/script/Toolbar.js"></script>
|
|
|
|
<script src="/res/script/Viewer.js"></script>
|
|
|
|
<script src="/res/script/ListNavigator.js"></script>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2017-11-10 12:39:55 +01:00
|
|
|
<script>
|
|
|
|
// This info gets filled in on the server side to prevent having to make an API call right after the page loads.
|
|
|
|
// Just to slice another few milliseconds from the load time :)
|
2019-02-19 23:10:04 +01:00
|
|
|
Viewer.init('{{.Other.Type}}', {{.Other.APIResponse}});
|
2017-11-10 12:39:55 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{{template "analytics"}}
|
|
|
|
</body>
|
|
|
|
</html>
|
2018-07-09 23:19:16 +02:00
|
|
|
{{end}}
|