add submitted count
This commit is contained in:
parent
569d69367d
commit
19888e2668
|
@ -6,7 +6,7 @@ const content = require('../helpers/content');
|
||||||
async function index(req, res) {
|
async function index(req, res) {
|
||||||
res.render('main', {
|
res.render('main', {
|
||||||
maxlen: process.env.MAXLEN,
|
maxlen: process.env.MAXLEN,
|
||||||
exceeded: content.submitted() >= process.env.MAXFILES
|
submitted: content.submitted()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
extends template/main.pug
|
extends template/main.pug
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
- var exceeded = submitted >= process.env.MAXFILES
|
||||||
form(action='/upload' method='POST')
|
form(action='/upload' method='POST')
|
||||||
p(align='center')
|
p(align='center')
|
||||||
textarea(name='text' class='data' placeholder='Put your text in here!' + (maxlen ? ` (Max length is ${maxlen} bytes)` : ''))
|
textarea(name='text' class='data' placeholder='Put your text in here!' + (maxlen ? ` (Max length is ${maxlen} bytes)` : ''))
|
||||||
|
@ -18,3 +19,8 @@ block content
|
||||||
br
|
br
|
||||||
| Admin email is:
|
| Admin email is:
|
||||||
a(href='mailto:' + email)= email
|
a(href='mailto:' + email)= email
|
||||||
|
else
|
||||||
|
p(align='center')
|
||||||
|
| Files:
|
||||||
|
| #{submitted}/#{process.env.MAXFILES}
|
||||||
|
| (#{Math.floor((submitted * 10000)/process.env.MAXFILES) / 100}%)
|
Loading…
Reference in New Issue