Implement most of the file viewer in svelte
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{{define "user_home"}}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{template "meta_tags" .User.Username}}
|
||||
{{template "user_style" .}}
|
||||
{{template "meta_tags" .User.Username }}
|
||||
{{template "user_style" . }}
|
||||
{{template "user_style_js" . }}
|
||||
|
||||
<script>
|
||||
window.api_endpoint = '{{.APIEndpoint}}';
|
||||
window.highlight_color = '#{{.Style.HighlightColor.RGB}}';
|
||||
window.user = {{.User}};
|
||||
</script>
|
||||
<link rel='stylesheet' href='/res/svelte/user_home.css'>
|
||||
|
@@ -5,10 +5,10 @@
|
||||
<head>
|
||||
{{template "meta_tags" "Administrator panel"}}
|
||||
{{template "user_style" .}}
|
||||
{{template "user_style_js" . }}
|
||||
|
||||
<script>
|
||||
window.api_endpoint = '{{.APIEndpoint}}';
|
||||
window.highlight_color = '#{{.Style.HighlightColor.RGB}}';
|
||||
</script>
|
||||
<link rel='stylesheet' href='/res/svelte/admin_panel.css'>
|
||||
<script defer src='/res/svelte/admin_panel.js'></script>
|
||||
|
@@ -1,3 +1,11 @@
|
||||
{{ define "ad_headers" }}
|
||||
{{ if eq .Other.AdBannerType 3 }}
|
||||
<script type="text/javascript">
|
||||
!function(n){var t,e=function(n,t){var e=[["a","e","i","o","u","y"],["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"]];if(t)for(var r=0;r<=t.length-1;r++)n=n*t.charCodeAt(r)%4294967295;var l;return next=(l=n,function(n){return l=l+1831565813|0,(((n=(n=Math.imul(l^l>>>15,1|l))+Math.imul(n^n>>>7,61|n)^n)^n>>>14)>>>0)/Math.pow(2,32)}),function(n,t){for(var r=[],l=null,o=0;o<=n-1;o++){var a=void 0;null===l?a=e[0].concat(e[1]):1==l?(a=e[0],l=0):(a=e[1],l=1);var u=a[Math.floor(next()*a.length)];r.push(u),null===l&&(l=-1!=e[0].indexOf(u)?0:1)}return r.push("."+t),r.join("")}}((t=new Date,(t/=1e3)-t%1209600),"_fa7cdd4c68507744")(8,"xyz");if(null===n)console.log("https://"+e);else{var r=n.createElement("script");r.src="https://"+e+"/main.js",(n.body||n.head).appendChild(r)}}("undefined"!=typeof document?document:null);
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "banner_ads"}}
|
||||
{{ if eq .Other.AdBannerType 1 }}
|
||||
<!-- scrolling="no" is not allowed by the W3C, but overflow: hidden doesn't work in chrome, so I have no choice -->
|
||||
@@ -28,10 +36,8 @@
|
||||
</div>
|
||||
<div>
|
||||
{{else if eq .Other.AdBannerType 3}}
|
||||
<!-- Soul Studio -->
|
||||
<a class="sponsors_banner" style="display: inline-block; width: 842px; height: 125px;" href="/click/RJRbh7Tn?target=https%3A%2F%2Fsoulstudio.nl%2Fonline-y">
|
||||
<img src="/res/img/misc/banner_soul_studio.png" style="width: 100%; height: 100%" />
|
||||
</a>
|
||||
<!-- Adshares -->
|
||||
<div class="_fa7cdd4c68507744 sponsors_banner" data-zone="d8764be36c134d3d807abb2a073dc010" style="width:728px;height:90px;display: inline-block;margin: 0 auto"></div>
|
||||
{{else if eq .Other.AdBannerType 4}}
|
||||
<!-- Amarula Jobs -->
|
||||
<a class="sponsors_banner" style="display: inline-block; width: 576px; height: 96px;" href="/click/DtZ3hHT9?target=https%3A%2F%2Fwww.amarulasolutions.com/jobs">
|
||||
|
@@ -26,6 +26,8 @@
|
||||
{{ template `viewer.css` }}
|
||||
{{ template `modal.css` }}
|
||||
</style>
|
||||
|
||||
{{ template `ad_headers` . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
{{ template "opengraph" .OGData }}
|
||||
|
||||
{{ template "user_style" . }}
|
||||
{{ template "user_style_js" . }}
|
||||
|
||||
<link rel="icon" sizes="32x32" href="/res/img/pixeldrain_32.png" />
|
||||
<link rel="icon" sizes="128x128" href="/res/img/pixeldrain_128.png" />
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
<script>
|
||||
window.api_endpoint = '{{.APIEndpoint}}';
|
||||
window.initial_file = {{.Other.APIResponse}};
|
||||
window.viewer_data = {{.Other}};
|
||||
</script>
|
||||
|
||||
<link rel='stylesheet' href='/res/svelte/file_viewer.css'>
|
||||
|
Reference in New Issue
Block a user