I modified templates to include a base.jade, and to alter blocks defined in a base with block append.
But jade behave that that blocks are actually being appended to theirs places, but they are also being included to the end of a file. So, I had to manually modify resulted .jade.go files.
This commit is contained in:
parent
6a9c5d0655
commit
7a8b7964ec
@ -18,7 +18,6 @@ html(lang="en")
|
|||||||
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
|
|
||||||
block body
|
block body
|
||||||
footer
|
footer
|
||||||
| 2022 Arav <#[a(href="mailto:me@arav.top") me@arav.top]>
|
| 2022 Arav <#[a(href="mailto:me@arav.top") me@arav.top]>
|
@ -1,6 +1,8 @@
|
|||||||
:go:func Error404(mainSite string)
|
:go:func Error404(mainSite string)
|
||||||
|
|
||||||
include base/top.jade
|
include base.jade
|
||||||
|
|
||||||
|
block append head
|
||||||
style(type="text/css").
|
style(type="text/css").
|
||||||
#error {
|
#error {
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
@ -9,11 +11,11 @@ include base/top.jade
|
|||||||
margin: 6rem 0; }
|
margin: 6rem 0; }
|
||||||
|
|
||||||
#error h1 { font-size: 8rem; }
|
#error h1 { font-size: 8rem; }
|
||||||
include base/body.header.jade
|
|
||||||
|
block append header
|
||||||
h1 404
|
h1 404
|
||||||
|
|
||||||
|
block append body
|
||||||
section#error
|
section#error
|
||||||
h1 404
|
h1 404
|
||||||
| Nod Found xD
|
| Nod Found xD
|
||||||
|
|
||||||
include base/body.footer.jade
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
:go:func Index(mainSite string, storageCapacity, storageUsed int64, keepForHours int, fileMaxSize, storageUsedStr, storageCapacityStr, storageAvailableStr string)
|
:go:func Index(mainSite string, storageCapacity, storageUsed int64, keepForHours int, fileMaxSize, storageUsedStr, storageCapacityStr, storageAvailableStr string)
|
||||||
|
|
||||||
include base/top.jade
|
include base.jade
|
||||||
include base/body.header.jade
|
|
||||||
|
block append header
|
||||||
h1 Upload
|
h1 Upload
|
||||||
|
|
||||||
|
block body
|
||||||
section#rules.center
|
section#rules.center
|
||||||
h2 Rules
|
h2 Rules
|
||||||
ul
|
ul
|
||||||
@ -34,5 +36,3 @@ section
|
|||||||
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 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 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.
|
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,8 @@
|
|||||||
:go:func ErrorNoSpace(mainSite string)
|
:go:func ErrorNoSpace(mainSite string)
|
||||||
|
|
||||||
include base/top.jade
|
include base.jade
|
||||||
|
|
||||||
|
block append head
|
||||||
style(type="text/css").
|
style(type="text/css").
|
||||||
#error {
|
#error {
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
@ -9,10 +11,10 @@ include base/top.jade
|
|||||||
margin: 6rem 0; }
|
margin: 6rem 0; }
|
||||||
|
|
||||||
#error h1 { font-size: 6rem; }
|
#error h1 { font-size: 6rem; }
|
||||||
include base/body.header.jade
|
|
||||||
|
block append header
|
||||||
h1 :(
|
h1 :(
|
||||||
|
|
||||||
|
block append body
|
||||||
section#error
|
section#error
|
||||||
h1 Not enough space left
|
h1 Not enough space left
|
||||||
|
|
||||||
include base/body.footer.jade
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
:go:func Uploaded(mainSite, downloadLink string, keepForHours int)
|
:go:func Uploaded(mainSite, downloadLink string, keepForHours int)
|
||||||
|
|
||||||
include base/top.jade
|
include base.jade
|
||||||
include base/body.header.jade
|
|
||||||
|
block append header
|
||||||
h1 Upload
|
h1 Upload
|
||||||
|
|
||||||
|
block append body
|
||||||
section#file
|
section#file
|
||||||
h2 Your link
|
h2 Your link
|
||||||
center
|
center
|
||||||
@ -11,5 +13,3 @@ section#file
|
|||||||
center It will be available for next #{keepForHours} hours.
|
center It will be available for next #{keepForHours} hours.
|
||||||
center
|
center
|
||||||
a(href="/") Back to index page
|
a(href="/") Back to index page
|
||||||
|
|
||||||
include base/body.footer.jade
|
|
||||||
|
Loading…
Reference in New Issue
Block a user