bin/views/main.pug

39 lines
1.6 KiB
Plaintext

extends template/main.pug
block root
include captcha.pug
block content
- var exceeded = submitted >= process.env.MAXFILES
form(action='/upload' method='POST')
input(type='hidden' name='_csrf' value=req.session.csrf)
p(align='center')
textarea(name='text' class='data' placeholder='Put your text in here!' + (maxlen ? ` (Max length is ${maxlen} bytes)` : ''))
br
if (!exceeded)
br
| Captcha:
br
input(type='text' name=req.session.captcha_input)
if (!exceeded)
+captcha(req.session.captcha)
p(align='center' style='padding-bottom:10px')
input(type='submit' value='Upload!')
if (exceeded)
p(style='color:darkred;font-weight:bold;font-size:9pt' align='center')
| Max uploads limit exceeded. No more uploads would be accepted.
br
| Contact site administrator so they would increase the limit or delete some uploads.
if (process.env.ADMIN_EMAIL)
- let email = process.env.ADMIN_EMAIL;
br
br
| Admin email is:
a(href='mailto:' + email)= email
else
if (process.env.SHOW_SUBMITTED == 'true')
p(align='center')
| Files:
| #{submitted}/#{process.env.MAXFILES}
| (#{Math.floor((submitted * 10000)/process.env.MAXFILES) / 100}%)