bin/views/main.pug

42 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-03-04 02:09:05 +01:00
extends template/main.pug
2023-04-17 02:37:07 +02:00
block root
include captcha.pug
2023-03-04 02:09:05 +01:00
block content
2023-03-04 07:54:26 +01:00
- var exceeded = submitted >= process.env.MAXFILES
2023-03-04 02:09:05 +01:00
form(action='/upload' method='POST')
2023-04-17 02:37:07 +02:00
input(type='hidden' name='_csrf' value=req.session.csrf)
2023-04-17 07:23:10 +02:00
p(align='center' style='padding-bottom:10px')
textarea(name='text' class='data' placeholder='Put your text in here!' + (maxlen ? ` (Max length is ${maxlen} bytes)` : ''))= req.session.last_text
2023-03-04 02:09:05 +01:00
br
2023-03-04 06:00:53 +01:00
if (!exceeded)
2023-04-17 02:37:07 +02:00
br
| Captcha:
br
2023-04-17 07:23:10 +02:00
input(type='text' name=req.session.captcha_input style='font-family:monospace;text-align:center;padding:8px 0')
div(style='display:flex;dispaly:box;display:none')
each field in req.session.fake_fields
input(type='text' name=field style='font-family:monospace;text-align:center')
2023-04-17 02:37:07 +02:00
if (!exceeded)
+captcha(req.session.captcha)
p(align='center' style='padding-bottom:10px')
2023-03-04 06:00:53 +01:00
input(type='submit' value='Upload!')
2023-04-17 02:37:07 +02:00
2023-03-04 06:00:53 +01:00
if (exceeded)
2023-03-04 06:52:59 +01:00
p(style='color:darkred;font-weight:bold;font-size:9pt' align='center')
2023-03-04 06:00:53 +01:00
| Max uploads limit exceeded. No more uploads would be accepted.
br
2023-03-04 06:55:24 +01:00
| 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:
2023-03-04 07:54:26 +01:00
a(href='mailto:' + email)= email
else
2023-03-04 07:55:37 +01:00
if (process.env.SHOW_SUBMITTED == 'true')
p(align='center')
| Files:
| #{submitted}/#{process.env.MAXFILES}
| (#{Math.floor((submitted * 10000)/process.env.MAXFILES) / 100}%)