Fork pd_web, remove everything we don't need

This commit is contained in:
2025-09-24 15:37:57 +02:00
parent 9dcdd94b3a
commit fd5cd0bfd1
415 changed files with 146269 additions and 120786 deletions

View File

@@ -1,71 +0,0 @@
{{define "file_not_found"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "404, File Not Found"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>404, File Not Found!</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
This file does not exist, or it has been removed. Possible
reasons for this are:
</p>
<ul>
<li>
The file has not been viewed for 120 days and has expired
</li>
<li>
The person who uploaded the file has deleted it
</li>
</ul>
<p>
I'm sorry for the inconvenience.
</p>
</section>
</div>
{{template "page_bottom" .}}
{{template "analytics"}}
</body>
</html>
{{end}}
{{define "list_not_found"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "404, List Not Found"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>404, List Not Found!</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
This list does not exist, or it has been removed. Possible
reasons for this are:
</p>
<ul>
<li>
All files in this list have not been viewed for 120 days and
have expired
</li>
<li>
The person who created the list has deleted it
</li>
</ul>
<p>
I'm sorry for the inconvenience.
</p>
</section>
</div>
{{template "page_bottom" .}}
{{template "analytics"}}
</body>
</html>
{{end}}

View File

@@ -1,77 +0,0 @@
{{define "file_viewer_compat"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.Title}}</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link id="stylesheet_layout" rel="stylesheet" type="text/css" href="/res/style/layout.css?v{{cacheID}}"/>
<link id="stylesheet_theme" rel="stylesheet" type="text/css" href="/theme.css"/>
<link rel="icon" sizes="32x32" href="/res/img/pixeldrain_32.png" />
<link rel="icon" sizes="128x128" href="/res/img/pixeldrain_128.png" />
<link rel="icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
<link rel="icon" sizes="192x192" href="/res/img/pixeldrain_192.png" />
<link rel="icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_256.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
<link rel="shortcut icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
<meta name="theme-color" content="#220735"/>
{{ template "opengraph" .OGData }}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>{{.Title}}</h1>
</header>
<div id="page_content" class="page_content">
<section>
{{if eq .Other.Type "file"}}
Download <a href="{{.APIEndpoint}}/file/{{.Other.APIResponse.ID}}?download">{{.Other.APIResponse.Name}}</a> here.
{{else}}
<ul>
{{$totalSize := 0}}
{{range $file := .Other.APIResponse.Files}}
{{$totalSize = add $totalSize $file.Size}}
<li><a href="{{$.APIEndpoint}}/file/{{$file.ID}}?download">{{$file.Name}}</a> ({{formatData $file.Size}})</li>
{{end}}
</ul>
{{if ne .Other.APIResponse.ID ""}}
<a href="{{.APIEndpoint}}/list/{{.Other.APIResponse.ID}}/zip">Download all files</a> (~{{formatData $totalSize}})
{{end}}
{{end}}
<h2>Compatibility file viewer</h2>
<p>
Welcome to the compatibility version of the file viewer. This
page is only shown to web browsers which can't properly display
the regular file viewer.
</p>
<p>
This page only allows you to download the linked files. If you
want more features like online video / audio players, an image
viewer, a PDF viewer or a text file viewer, please download any
of the supported web browsers:
</p>
<ul>
<li><a href="https://brave.com/pix009">Brave</a> (Linux, Mac OS, Windows)</li>
<li><a href="https://www.mozilla.org/en-US/firefox/">Firefox</a> (Linux, Mac OS, Windows)</li>
<li><a href="https://www.google.com/chrome/">Chrome</a> / <a href="https://www.chromium.org/Home">Chromium</a> (Linux, Mac OS, Windows)</li>
<li><a href="https://vivaldi.com/">Vivaldi</a> (Linux, Mac OS, Windows)</li>
<li><a href="https://www.opera.com/">Opera</a> (Linux, Mac OS, Windows)</li>
<li><a href="https://wiki.gnome.org/Apps/Web/">GNOME Web</a> (Linux)</li>
<li><a href="https://www.palemoon.org/">Pale Moon</a> (Linux, Windows)</li>
<li><a href="https://www.apple.com/safari/">Safari</a> (Mac OS)</li>
<li><a href="https://www.microsoft.com/en-us/edge">Edge</a> (Windows)</li>
</ul>
</section>
</div>
{{template "analytics"}}
</body>
</html>
{{end}}

View File

@@ -1,40 +0,0 @@
{{define "file_viewer_svelte"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.Title}}</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="robots" content="noindex, nofollow">
{{ template "opengraph" .OGData }}
<link id="stylesheet_layout" rel="stylesheet" type="text/css" href="/res/style/layout.css?v{{cacheID}}"/>
<link id="stylesheet_layout" rel="stylesheet" type="text/css" href="{{.Other.ThemeURI}}"/>
<link rel="icon" sizes="32x32" href="/res/img/pixeldrain_32.png" />
<link rel="icon" sizes="128x128" href="/res/img/pixeldrain_128.png" />
<link rel="icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
<link rel="icon" sizes="192x192" href="/res/img/pixeldrain_192.png" />
<link rel="icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_256.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
<link rel="shortcut icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
<script>
window.api_endpoint = '{{.APIEndpoint}}';
window.viewer_data = {{.Other}};
window.user_authenticated = {{.Authenticated}};
window.user = {{.User}};
</script>
<script defer src='/res/svelte/file_viewer.js?v{{cacheID}}'></script>
{{template "analytics"}}
</head>
<body id="body"></body>
</html>
{{end}}

View File

@@ -10,8 +10,6 @@
<hr />
{{if .Authenticated}}
<a href="/user">{{.User.Username}}</a>
<a href="/user/filemanager#files">My Files</a>
<a href="/user/filemanager#lists">My Albums</a>
{{if .User.Subscription.FilesystemAccess}}
<a href="/d/me">Filesystem</a>
{{end}}

View File

@@ -1,32 +0,0 @@
{{define "maintenance"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Maintenance"}}
</head>
<body>
<img id="header_image" class="header_image" src="/res/img/header_neuropol.png" alt="Header image"/>
<br/>
<div id='body' class="body">
<div id="header" class="highlight_shaded" style="font-size: 2em; line-height: 1.2em;">
Pixeldrain is under maintenanace
</div>
<p>
This means the website has temporarily been taken down to apply
changes which cannot be applied in the background (probably a
database upgrade).
</p>
<p>
The website should be back online shortly. You can check out
my <a href="https://twitter.com/Fornax96">Twitter</a> to get a
feeling for when the website will be back up.
</p>
<p>
I'm sorry for the inconvenience.
</p>
{{template "footer"}}
</div>
{{template "analytics"}}
</body>
</html>
{{end}}

View File

@@ -1,15 +0,0 @@
{{define "text_upload"}}
<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Text upload"}}
<script>
window.api_endpoint = '{{.APIEndpoint}}';
</script>
<script defer src='/res/svelte/text_upload.js?v{{cacheID}}'></script>
</head>
<body id="body"></body>
{{template "analytics"}}
</html>
{{end}}

View File

@@ -1,19 +0,0 @@
{{define "upload_history"}}
<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Upload history"}}
<script>
window.api_endpoint = '{{.APIEndpoint}}';
window.server_hostname = "{{.Hostname}}";
</script>
<script defer src='/res/svelte/upload_history.js?v{{cacheID}}'></script>
</head>
<body>
{{template "menu" .}}
<div id="page_body" class="page_body"></div>
{{template "analytics"}}
</body>
</html>
{{end}}