refactor captcha to separate template include, change to match theme

merge-requests/208/head
fatchan 5 years ago
parent 2c9fa8f9b6
commit 8484d12e38
  1. 13
      gulp/res/css/style.css
  2. 4
      helpers/captcha/captchagenerate.js
  3. 3
      views/includes/actionfooter.pug
  4. 4
      views/includes/captcha.pug
  5. 3
      views/includes/postform.pug
  6. 8
      views/pages/banners.pug
  7. 4
      views/pages/captcha.pug
  8. 3
      views/pages/changepassword.pug
  9. 3
      views/pages/create.pug
  10. 29
      views/pages/globalmanage.pug
  11. 33
      views/pages/manage.pug
  12. 3
      views/pages/register.pug

@ -448,15 +448,20 @@ a, video, img, input, summary {
overflow: hidden;
}
.post-file:nth-child(1) {
margin-left: 4px;
}
.post-file {
display: inline-flex;
display: flex;
flex-direction: column;
margin: 0 4px;
padding: 2px 0;
margin-right: 10px;
align-items: center;
}
.post-file-info:hover {
word-break: break-all;
/*word-break: break-all;*/
}
.post-file-info {
@ -495,7 +500,7 @@ input:invalid, textarea:invalid {
}
textarea {
min-width: 250px;
/*min-width: 250px;*/
}
.no-resize {

@ -20,8 +20,8 @@ module.exports = (text, captchaId) => {
{x:destx,y:desty} //dest
]);
}
const x = gm(width,height, '#fff')
.fill('#000')
const x = gm(width,height, '#282a2e')
.fill('#c5c8c6')
.fontSize(65)
let lastx = 7;
for (let i = 0; i <6; i++) {

@ -59,6 +59,5 @@ details.toggle-label
| Toggle Cycle
.actions
h4.no-m-p Captcha:
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input#captcha(type='text', name='captcha', autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')
include ./captcha.pug
input(type='submit', value='submit')

@ -0,0 +1,4 @@
iframe.captcha(src='/captcha.html' 'width=200' height='80' scrolling='no')
input(type='text' name='captcha' autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')

@ -54,8 +54,7 @@ section.form-wrapper.flex-center
.label Captcha
.required *
.col
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')
include ./captcha.pug
input(type='submit', value=`New ${isThread ? 'Reply' : 'Thread'}`)
.toggle-hidden
a.toggle-summary(href='#postform') Open Postform

@ -16,12 +16,12 @@ block content
|
a(href=`/${board._id}/logs.html`) [Logs]
hr(size=1)
section.catalog
if board.banners.length > 0
if board.banners.length > 0
section.catalog
each banner in board.banners
img.board-banner(src=`/banner/${board._id}/${banner}` width='300' height='100')
else
p Board has no custom banners.
else
p Board has no custom banners.
include ../includes/stickynav.pug
hr(size=1)
nav.pages

@ -2,7 +2,7 @@ doctype html
html
head
link(rel='stylesheet', href='/css/style.css')
body(style='margin:0;padding:0;background:white;')
body(style='margin:0;padding:0;background:#282a2e;')
img(src='/captcha', style='width:200px;height:80px;margin:0 auto;')
form(action='/forms/newcaptcha', method='POST')
input(style='width: 100%;border-width: 1px 0 0 0;', type='submit', value='New Captcha')
input(style='position:fixed;left:-1px;bottom:-1px;opacity:0.9;' type='submit' value='🗘')

@ -22,8 +22,7 @@ block content
section.row
.label Captcha
span.col
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')
include ../includes/captcha.pug
input(type='submit', value='Change Password')
p: a(href='/login.html') Login
p: a(href='/register.html') Register

@ -23,7 +23,6 @@ block content
section.row
.label Captcha
span.col
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')
include ../includes/captcha.pug
input(type='submit', value='submit')

@ -10,7 +10,7 @@ block content
h1.board-title Global Management
hr(size=1)
h4.no-m-p Add News:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/addnews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -23,7 +23,7 @@ block content
hr(size=1)
if news.length > 0
h4.no-m-p Delete News:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/deletenews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
each post in news
@ -33,7 +33,7 @@ block content
input(type='submit', value='delete')
hr(size=1)
h4.no-m-p Delete board:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/deleteboard`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -45,19 +45,18 @@ block content
input(type='text' name='uri' required)
input(type='submit', value='submit')
h4.no-m-p Global Reports:
.mv-10
form(action=`/forms/global/actions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
if reports.length === 0
p No reports.
hr(size=1)
else
for report in reports
section.thread
+post(report, false, false, true)
hr(size=1)
include ../includes/actionfooter_globalmanage.pug
form(action=`/forms/global/actions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
if reports.length === 0
p No reports.
hr(size=1)
else
for report in reports
section.thread
+post(report, false, false, true)
hr(size=1)
include ../includes/actionfooter_globalmanage.pug
hr(size=1)
h4.no-m-p Global Bans:
form(action=`/forms/global/unban` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)

@ -9,7 +9,7 @@ block content
include ../includes/boardheader.pug
br
h4.no-m-p Transfer ownership:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/transfer`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -18,7 +18,7 @@ block content
input(type='submit', value='submit')
hr(size=1)
h4.no-m-p Delete board:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/deleteboard`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -31,7 +31,7 @@ block content
input(type='submit', value='submit')
hr(size=1)
h4.no-m-p Settings:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/settings` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -155,7 +155,7 @@ block content
input(type='submit', value='save settings')
hr(size=1)
h4.no-m-p Add Banners:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/addbanners`, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
@ -166,7 +166,7 @@ block content
hr(size=1)
if board.banners.length > 0
h4.no-m-p Delete Banners:
section.form-wrapper.flexleft.mv-10
section.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/deletebanners`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
each banner in board.banners
@ -176,19 +176,18 @@ block content
input(type='submit', value='delete')
hr(size=1)
h4.no-m-p Reports:
.mv-10
form(action=`/forms/board/${board._id}/modactions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
if reports.length === 0
p No reports.
hr(size=1)
else
for report in reports
section.thread
+post(report, false, true)
hr(size=1)
include ../includes/actionfooter_manage.pug
form(action=`/forms/board/${board._id}/modactions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
if reports.length === 0
p No reports.
hr(size=1)
else
for report in reports
section.thread
+post(report, false, true)
hr(size=1)
include ../includes/actionfooter_manage.pug
hr(size=1)
h4.no-m-p Bans:
form(action=`/forms/board/${board._id}/unban` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)

@ -19,8 +19,7 @@ block content
section.row
.label Captcha
span.col
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' pattern=".{6}" required title='6 characters')
include ../includes/captcha.pug
input(type='submit', value='Register')
p: a(href='/login.html') Login
p: a(href='/changepassword.html') Change Password

Loading…
Cancel
Save