Graphical overhaul.

Remove all legacy pixeldrain pages, handlers and assets.
Remove old theming engine.
Make logo responsive to the accent colour.
Lots of other stuff.
This commit is contained in:
2026-10-01 02:06:00 +02:00
parent 7b2e4b4240
commit 58db683fc8
98 changed files with 1025 additions and 6475 deletions

View File

@@ -1,22 +0,0 @@
{{define "403"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Forbidden"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>Forbidden</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
You do not have permission to access this resource.
</p>
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,26 +0,0 @@
{{define "404"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Not Found"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>This page does not exist!</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
There's nothing to see here, so you'll have to
<a href='/'>head over to the home page</a>.
</p>
<p>
Bye!
</p>
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,23 +0,0 @@
{{define "451"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "451, Unavailable For Legal Reasons"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>451, Unavailable For Legal Reasons</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
Hello. This file has received an abuse report and has been taken
down. It cannot be shared anymore.
</p>
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,32 +0,0 @@
{{define "500"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "500, Internal Server Error"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>You broke Nova</h1>
</header>
<div id="page_content" class="page_content">
<section>
<p>
Great job.
</p>
<p>
Just kidding, something went wrong on the Nova server and
it's my fault. This can happen when the website is overloaded,
there is a problem with the software or there is a hardware
problem. When there is a large scale outage you can usually find
more info on my twitter <a
href="https://twitter.com/Fornax96"></a>@Fornax96</a>. You can
try again in a few minutes (or hours), or go back to the <a
href='/'>home page</a> and start over.
</p>
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,20 +0,0 @@
{{define "markdown_wrapper"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" .Title}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>{{.Title}}</h1>
</header>
<div id="page_content" class="page_content">
<section>
{{.Other}}
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,43 +0,0 @@
{{define "meta_tags"}}
<title>{{.}} ~ Nova</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="theme-color" content="#220735" />
<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/nova_32.png" />
<link rel="icon" sizes="128x128" href="/res/img/nova_128.png" />
<link rel="icon" sizes="152x152" href="/res/img/nova_152.png" />
<link rel="icon" sizes="180x180" href="/res/img/nova_180.png" />
<link rel="icon" sizes="192x192" href="/res/img/nova_192.png" />
<link rel="icon" sizes="196x196" href="/res/img/nova_196.png" />
<link rel="icon" sizes="256x256" href="/res/img/nova_256.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/res/img/nova_152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/res/img/nova_180.png" />
<link rel="shortcut icon" sizes="196x196" href="/res/img/nova_196.png" />
<meta name="description" content="Nova is a file transfer service, you
can upload any file and you will be given a shareable link right away.
Nova also supports previews for images, videos, audio, PDFs and much more." />
<meta name="keywords" content="file sharing, free file sharing, file transfer,
free file transfer, file hosting, free file hosting, hosting, file upload,
free file upload, uploading, send file, large file, free file sharing,
free file transfer, 20 GB free, free file sending, file storage, cloud storage,
free cloud storage, image hosting, image sharing, photo hosting,
photo transfer, photo sharing, video hosting, video sharing, video transfer,
document sharing, upload documents, send documents, huge file, large video,
large document, pdf, pdf sharing, pdf upload, pdf transfer, pdf reader,
free pdf upload, text file upload, text sharing, photo storage,
professional file transfer, cheap storage, cheap file storage, send large file,
send big file, send huge file, audio sharing, music sharing, audio upload,
music upload" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{.}} ~ Nova" />
<meta property="og:site_name" content="Nova" />
<meta property="og:description" content="Instant file and screenshot sharing." />
<meta property="og:url" content="http://nova.storage/" />
<meta property="og:image" content="/res/img/nova_256.png" />
<meta property="og:image:type" content="image/png" />
{{end}}

View File

@@ -1,13 +0,0 @@
{{ define "opengraph" }}
{{ range $kv := .MetaPropRules }}
<meta property="{{ $kv.Key }}" content="{{ $kv.Value }}" />
{{ end }}
{{ range $kv := .MetaNameRules }}
<meta name="{{ $kv.Key }}" content="{{ $kv.Value }}" />
{{ end }}
{{ range $kv := .LinkRules }}
<link rel="{{ $kv.Key }}" href="{{ $kv.Value }}" />
{{ end }}
{{ end }}

View File

@@ -1,24 +0,0 @@
{{ define "status" }}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Server status"}}
</head>
<body>
{{template "page_top" .}}
<div id="page_content" class="page_content">
<script type="text/javascript" src="https://static.hetrix.io/iframeResizer/iframeResizer.min.js"></script>
<iframe
class="htframe"
src="https://wl.hetrixtools.com/r/3e1b7bf5ddf9858527cbf209d3d9ef60/"
width="100%"
scrolling="no"
style="border: none; display: block;"
sandbox="allow-scripts allow-same-origin allow-popups"
onload="iFrameResize([{log:false}],'.htframe')"
></iframe>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{ end }}

View File

@@ -1,75 +0,0 @@
{{define "widgets"}}
<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" "Cloud storage and data transfer services"}}
</head>
<body>
{{template "page_top" .}}
<header>
<h1>Widget showcase</h1>
</header>
<div id="page_content" class="page_content">
<section>
<h2>Size 2 header</h2>
<h3>Size 3 header</h3>
<h4>Size 4 header</h4>
<h5>Size 5 header</h5>
<h6>Size 6 header</h6>
<div class="highlight_shaded">Shaded highlight</div>
<br/>
Link <a href="#">A link to someplace</a>.
<hr/>
Buttons <button>Regular ol' button!</button>
Width indicator
<button class="button_highlight">Important button!</button>
Width indicator
<button class="button_red">Dangerous button!</button>
<hr/>
Textarea <textarea>Hello!</textarea>
<hr/>
Checkbox <input type="checkbox"/>
<hr/>
Radio
<input name="radioform" type="radio"/>
<input name="radioform" type="radio"/>
<hr/>
Text field <input type="text"/>
<hr/>
Password <input type="password"/>
<hr/>
Number <input type="number"/>
<hr/>
Select
<select name="select">
<option>cherry</option>
<option>orange</option>
<option>apple</option>
</select>
<hr/>
Select2 <select name="select2" size="3">
<option>cherry</option>
<option>orange</option>
<option>apple</option>
</select>
<hr/>
File <input type="file" name="file">
<hr/>
Color <input type="color" name="favcolor" value="#ff0000">
<hr/>
<fieldset>
<legend>Legend</legend>
<p>
Fieldset
</p>
</fieldset>
<br/><br/>
<iframe src="https://nova.storage/u/Nygt1on4?embed" style="border: none; width: 800px; max-width: 100%; height: 600px; max-height: 100%; border-radius: 16px;"></iframe>
</section>
</div>
{{template "page_bottom" .}}
</body>
</html>
{{end}}

View File

@@ -1,35 +1,42 @@
{{define "wrap"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.Title}}</title>
<meta charset="UTF-8"/>
<title>{{.Title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="robots" content="noindex, nofollow">
<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="stylesheet" href="/res/style/layout.css?v{{.CacheID}}"/>
<link rel="preload" href="/res/misc/MaterialIcons.woff2" as="font" type="font/woff2" crossorigin/>
<link rel="icon" sizes="32x32" href="/res/img/nova_32.png" />
<link rel="icon" sizes="64x64" href="/res/img/nova_64.png" />
<link rel="icon" sizes="128x128" href="/res/img/nova_128.png" />
<link rel="icon" sizes="152x152" href="/res/img/nova_152.png" />
<link rel="icon" sizes="180x180" href="/res/img/nova_180.png" />
<link rel="icon" sizes="192x192" href="/res/img/nova_192.png" />
<link rel="icon" sizes="196x196" href="/res/img/nova_196.png" />
<link rel="icon" sizes="256x256" href="/res/img/nova_256.png" />
<link rel="apple-touch-icon" sizes="128x128" href="/res/img/nova_128.png" />
<link rel="apple-touch-icon" sizes="256x256" href="/res/img/nova_256.png" />
<link rel="shortcut icon" sizes="256x256" href="/res/img/nova_256.png" />
<link rel="icon" href="/favicon.ico" sizes="32x32"/>
<link rel="icon" href="/res/img/nova.svg" type="image/svg+xml"/>
<link rel="apple-touch-icon" href="/res/img/nova_180.png"/>
{{range .OGData.MetaPropRules}}
<meta property="{{.Key}}" content="{{.Value}}" />
{{end}}
{{range .OGData.MetaNameRules}}
<meta name="{{.Key}}" content="{{.Value}}" />
{{end}}
{{range .OGData.LinkRules}}
<link rel="{{.Key}}" href="{{.Value}}" />
{{end}}
{{ template "opengraph" .OGData }}
<script>
// The branding of the user's home directory, saved on the previous
// visit. Applying it before the page is drawn prevents a flash of
// the default theme while the app loads
try {
document.documentElement.style.cssText = localStorage.getItem("branding") ?? ""
} catch {}
window.api_endpoint = '{{.APIEndpoint}}';
window.server_hostname = "{{.Hostname}}";
{{with .User}}window.user = {{.}};{{end}}
{{with .Node}}window.initial_node = {{.}};{{end}}
</script>
<script defer src='/res/svelte/wrap.js?v{{cacheID}}' type="module"></script>
<script src="/res/svelte/wrap.js" type="module"></script>
</head>
<body></body>
</html>
{{end}}