diff --git a/web/templates/404.jade b/web/templates/404.jade new file mode 100644 index 0000000..68a586c --- /dev/null +++ b/web/templates/404.jade @@ -0,0 +1,19 @@ +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 \ No newline at end of file diff --git a/web/templates/base.jade b/web/templates/base.jade new file mode 100644 index 0000000..3a7e9de --- /dev/null +++ b/web/templates/base.jade @@ -0,0 +1,24 @@ +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 that keep files for 2 days.") + link(rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml") + link(href="/assets/css/main.css" rel="stylesheet") + block head + 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 + block header + h1 Upload + block body + footer + | 2017—2022 Arav <#[a(href="mailto:me@arav.top") me@arav.top] > \ No newline at end of file diff --git a/web/templates/index.jade b/web/templates/index.jade new file mode 100644 index 0000000..cee98ab --- /dev/null +++ b/web/templates/index.jade @@ -0,0 +1,31 @@ +extends base.jade +block body + section#rules.center + h2 Rules + ul + li Max. file size is #{.FileMaxSz}. + li Anything you upload should comply with Russian Federation's law. + li Generally speaking, anything that could cause me to deal with police, FSB, etc is forbidden. + li If anything illegal will be found it will be removed. + section#used-space.center + h2 Used space + div + span #{.StorageUsedStr} + progress(value=.StorageUsed max=.StorageCapacity) + span #{.StorageCapStr} + div + | #{.StorageAvailStr} + section#upload.center + h2 Upload + form(action="/" method="POST" enctype="multipart/form-data") + input(type="file" name="file") + input(type="submit" value="Upload") + section.center + p A resulted link looks like this /f/base64rawURL(sha256)/filename.ext. + p filename.ext could be anything but empty. It is a name the file will be retrieved with. + section + h2 Privacy statements + p I will cooperate with law enforcements and provide them with logs, and, if it still there, a file caused problems. Other than such situations logs won't get to the hands of third parties. + 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. + p Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name. + p Download name is a salted SHA-256 hash of the file encoded using base64 raw URL encoding. \ No newline at end of file diff --git a/web/templates/uploaded.jade b/web/templates/uploaded.jade new file mode 100644 index 0000000..1908190 --- /dev/null +++ b/web/templates/uploaded.jade @@ -0,0 +1,9 @@ +extends base.jade +block body + section#file + h2 Your link + center + a(href=.DownloadURL) #{.DownloadURL} + center It will be available for next #{.KeepForHours} hours. + center + a(href="/") Back to index page \ No newline at end of file