Unfortunately, Jade cannot extend templates. Instead you must include parts.
This commit is contained in:
parent
79e25a5072
commit
677aaa288a
@ -1,19 +0,0 @@
|
|||||||
extends base.jade
|
|
||||||
|
|
||||||
block head
|
|
||||||
style(type="text/css").
|
|
||||||
#error {
|
|
||||||
font-size: 3.5rem;
|
|
||||||
line-height: 5rem;
|
|
||||||
text-align: center;
|
|
||||||
margin: 6rem 0; }
|
|
||||||
|
|
||||||
#error h1 { font-size: 8rem; }
|
|
||||||
|
|
||||||
block header
|
|
||||||
h1 xDDDD
|
|
||||||
|
|
||||||
block body
|
|
||||||
section#error
|
|
||||||
h1 404
|
|
||||||
| Nod Found xD
|
|
@ -16,7 +16,7 @@ html(lang="en")
|
|||||||
text.logo Arav's dwelling
|
text.logo Arav's dwelling
|
||||||
text.under(y="11") Welcome to my sacred place, wanderer
|
text.under(y="11") Welcome to my sacred place, wanderer
|
||||||
nav
|
nav
|
||||||
a(href=.MainSite title="Arav's dwelling") Back to main website
|
a(href=mainSite title="Arav's dwelling") Back to main website
|
||||||
block header
|
block header
|
||||||
h1 Upload
|
h1 Upload
|
||||||
block body
|
block body
|
||||||
|
2
web/templates/base/body.footer.jade
Normal file
2
web/templates/base/body.footer.jade
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
footer
|
||||||
|
| 2022 Arav <#[a(href="mailto:me@arav.top") me@arav.top]>
|
7
web/templates/base/body.header.jade
Normal file
7
web/templates/base/body.header.jade
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
body
|
||||||
|
header
|
||||||
|
svg#logo(viewBox="0 -25 216 40")
|
||||||
|
text.logo Arav's dwelling
|
||||||
|
text.under(y="11") Welcome to my sacred place, wanderer
|
||||||
|
nav
|
||||||
|
a(href=mainSite title="Arav's dwelling") Back to main website
|
11
web/templates/base/top.jade
Normal file
11
web/templates/base/top.jade
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
doctype html
|
||||||
|
html(lang="en")
|
||||||
|
head
|
||||||
|
title Arav's dwelling / Upload
|
||||||
|
meta(charset="utf-8")
|
||||||
|
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
||||||
|
meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
||||||
|
meta(name="theme-color" content="#cd2682")
|
||||||
|
meta(name="description" content="File upload service for ya.")
|
||||||
|
link(rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml")
|
||||||
|
link(href="/assets/css/main.css" rel="stylesheet")
|
19
web/templates/error404.jade
Normal file
19
web/templates/error404.jade
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
:go:func Error404(mainSite string)
|
||||||
|
|
||||||
|
include base/top.jade
|
||||||
|
style(type="text/css").
|
||||||
|
#error {
|
||||||
|
font-size: 3.5rem;
|
||||||
|
line-height: 5rem;
|
||||||
|
text-align: center;
|
||||||
|
margin: 6rem 0; }
|
||||||
|
|
||||||
|
#error h1 { font-size: 8rem; }
|
||||||
|
include base/body.header.jade
|
||||||
|
h1 404
|
||||||
|
|
||||||
|
section#error
|
||||||
|
h1 404
|
||||||
|
| Nod Found xD
|
||||||
|
|
||||||
|
include base/body.footer.jade
|
@ -1,32 +1,38 @@
|
|||||||
extends base.jade
|
:go:func Index(mainSite string, fileMaxSize, storageCapacity, storageUsed, keepForHours int, storageUsedStr, storageCapacityStr, storageAvailableStr string)
|
||||||
block body
|
|
||||||
section#rules.center
|
include base/top.jade
|
||||||
h2 Rules
|
include base/body.header.jade
|
||||||
ul
|
h1 Upload
|
||||||
li Max. file size is #{.FileMaxSz}.
|
|
||||||
li It will be kept for #{.KeepForHours} hours.
|
section#rules.center
|
||||||
li Anything you upload should comply with Russian Federation's law. Generally speaking, anything illegal, like CP, extremist literature etc., is forbidden.
|
h2 Rules
|
||||||
section#used-space.center
|
ul
|
||||||
h2 Free space
|
li Max. file size is #{fileMaxSize}.
|
||||||
div
|
li It will be kept for #{keepForHours} hours.
|
||||||
span #{.StorageUsedStr}
|
li Anything you upload should comply with Russian Federation's law. Generally speaking, anything illegal, like CP, extremist literature etc., is forbidden.
|
||||||
progress(value=.StorageUsed max=.StorageCapacity)
|
section#used-space.center
|
||||||
span #{.StorageCapStr}
|
h2 Free space
|
||||||
div
|
div
|
||||||
| #{.StorageAvailStr}
|
span #{storageUsedStr}
|
||||||
section#upload.center
|
progress(value=storageUsed max=storageCapacity)
|
||||||
h2 Upload
|
span #{storageCapacityStr}
|
||||||
form(action="/" method="POST" enctype="multipart/form-data")
|
div
|
||||||
input(type="file" name="file" multiple=false)
|
| #{storageAvailableStr}
|
||||||
button(type="submit") Upload
|
section#upload.center
|
||||||
section
|
h2 Upload
|
||||||
p.center You can use cURL to upload a file: #[code curl -F 'file=@somefile.ext' https://upload.arav.top]
|
form(action="/" method="POST" enctype="multipart/form-data")
|
||||||
p.center Over I2P: #[code curl --proxy 127.0.0.1:4444 -F 'file=@somefile.ext' http://upload.arav.i2p]
|
input(type="file" name="file" multiple=false)
|
||||||
p.center A resulted link looks like this: #[code /f/base64rawURL(sha256)/filename.ext].
|
button(type="submit") Upload
|
||||||
p.center filename.ext is mandatory. It is a name the file will be retrieved with.
|
section
|
||||||
section
|
p.center You can use cURL to upload a file: #[code curl -F 'file=@somefile.ext' https://upload.arav.top]
|
||||||
h2 Privacy statements
|
p.center Over I2P: #[code curl --proxy 127.0.0.1:4444 -F 'file=@somefile.ext' http://upload.arav.i2p]
|
||||||
p I WILL cooperate with law enforcements and provide them with logs, guess I shouldn't clarify why. Abuses should be sent to #[a(href="mailto:admin@arav.top") admin@arav.top].
|
p.center A resulted link looks like this: #[code /f/base64rawURL(sha256)/filename.ext].
|
||||||
p Upload logs include: access time, IP-address, name of a file it was uploaded with, a SHA-256 hash of the file, download name*, size of the file in bytes, User-Agent.
|
p.center filename.ext is mandatory. It is a name the file will be retrieved with.
|
||||||
p Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name*, User-Agent.
|
section
|
||||||
p *Download name is a salted SHA-256 hash of the file encoded using base64 raw URL encoding. The hash is being salted to make useless any attempt of bruteforcing.
|
h2 Privacy statements
|
||||||
|
p I WILL cooperate with law enforcements and provide them with logs, guess I shouldn't clarify why. Abuses should be sent to #[a(href="mailto:admin@arav.top") admin@arav.top].
|
||||||
|
p Upload logs include: access time, IP-address, name of a file it was uploaded with, a SHA-256 hash of the file, download name*, size of the file in bytes, User-Agent.
|
||||||
|
p Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name*, User-Agent.
|
||||||
|
p *Download name is a salted SHA-256 hash of the file encoded using base64 raw URL encoding. The hash is being salted to make useless any attempt of bruteforcing.
|
||||||
|
|
||||||
|
include base/body.footer.jade
|
@ -1,6 +1,6 @@
|
|||||||
extends base.jade
|
:go:func ErrorNoSpace(mainSite string)
|
||||||
|
|
||||||
block head
|
include base/top.jade
|
||||||
style(type="text/css").
|
style(type="text/css").
|
||||||
#error {
|
#error {
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
@ -9,10 +9,10 @@ block head
|
|||||||
margin: 6rem 0; }
|
margin: 6rem 0; }
|
||||||
|
|
||||||
#error h1 { font-size: 6rem; }
|
#error h1 { font-size: 6rem; }
|
||||||
|
include base/body.header.jade
|
||||||
block header
|
|
||||||
h1 :(
|
h1 :(
|
||||||
|
|
||||||
block body
|
section#error
|
||||||
section#error
|
h1 Not enough space left
|
||||||
h1 Not enough space left
|
|
||||||
|
include base/body.footer.jade
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
extends base.jade
|
:go:func Uploaded(mainSite, downloadLink string, keepForHours int)
|
||||||
block body
|
|
||||||
section#file
|
include base/top.jade
|
||||||
h2 Your link
|
include base/body.header.jade
|
||||||
center
|
h1 Upload
|
||||||
a(href=.DownloadURL) #{.DownloadURL}
|
|
||||||
center It will be available for next #{.KeepForHours} hours.
|
section#file
|
||||||
center
|
h2 Your link
|
||||||
a(href="/") Back to index page
|
center
|
||||||
|
a(href=downloadLink) #{downloadLink}
|
||||||
|
center It will be available for next #{keepForHours} hours.
|
||||||
|
center
|
||||||
|
a(href="/") Back to index page
|
||||||
|
|
||||||
|
include base/body.footer.jade
|
||||||
|
Loading…
Reference in New Issue
Block a user