merge-requests/208/head
fatchan 5 years ago
parent 514b55a506
commit 3d7d0f3367
  1. 8
      controllers/pages.js
  2. 1
      dist/css/style.css
  3. 2
      gulp/dist/css/style.css
  4. 76
      gulp/res/css/style.css
  5. 4
      gulpfile.js
  6. 13
      models/forms/make-post.js
  7. 6
      views/includes/actionfooter.pug
  8. 7
      views/includes/actionfooter_globalmanage.pug
  9. 7
      views/includes/actionfooter_manage.pug
  10. 3
      views/includes/bannerform.pug
  11. 4
      views/includes/pages.pug
  12. 43
      views/includes/postform.pug
  13. 34
      views/mixins/post.pug
  14. 5
      views/pages/board.pug
  15. 1
      views/pages/globalmanage.pug
  16. 11
      views/pages/login.pug
  17. 1
      views/pages/manage.pug
  18. 14
      views/pages/register.pug

@ -10,7 +10,8 @@ const express = require('express')
, home = require(__dirname+'/../models/pages/home.js')
, register = require(__dirname+'/../models/pages/register.js')
, manage = require(__dirname+'/../models/pages/manage.js')
, globalmanage = require(__dirname+'/../models/pages/globalmanage.js')
, globalManage = require(__dirname+'/../models/pages/globalmanage.js')
, changePassword = require(__dirname+'/../models/pages/changepassword.js')
, login = require(__dirname+'/../models/pages/login.js')
, board = require(__dirname+'/../models/pages/board.js')
, catalog = require(__dirname+'/../models/pages/catalog.js')
@ -25,6 +26,9 @@ router.get('/login', login);
//registration page
router.get('/register', register);
//change password page
router.get('/changepassword', changePassword);
//logout
router.get('/logout', isLoggedIn, (req, res, next) => {
@ -42,7 +46,7 @@ router.get('/logout', isLoggedIn, (req, res, next) => {
router.get('/:board/manage', Boards.exists, isLoggedIn, hasPerms, manage);
//board manage page
router.get('/globalmanage', isLoggedIn, hasPerms, globalmanage);
router.get('/globalmanage', isLoggedIn, hasPerms, globalManage);
// board page/recents
router.get('/:board', Boards.exists, numberConverter, board);

@ -1 +0,0 @@
body{font-family:arial,helvetica,sans-serif;font-size:10pt;background:#eef2ff;flex:1;display:flex;flex-direction:column;min-height:100vh;margin:0}.code{border-left:10px solid #b7c5d9;display:block;padding-left:5px;font-family:monospace;margin:.5em 0}.pages a{text-decoration:none}object{object-fit:contain}.board-header{display:flex;flex-direction:column;align-items:center}.catalog-tile-button{width:100%;line-height:30px;float:left;background:#b7c5d9;text-decoration:none;color:#000}.catalog-tile-content{padding:5px}.catalog-tile{margin:2px;text-align:center;max-height:300px;width:250px;overflow:hidden;overflow-y:auto;border:2px solid #b7c5d9;box-sizing:border-box}.no-m-p{margin:0;padding:0}.catalog-thumb{box-shadow:0 0 3px #000;min-width:64px;min-height:64px;object-fit:cover}.catalog{display:flex;align-items:flex-start;justify-content:space-evenly;flex-flow:row wrap}.spoiler{background:#000}.spoiler:hover{color:#fff}.mode{background-color:red;color:#fff;font-weight:700;text-align:center}.reports{background:#fca!important;border-color:#c97!important;border-width:1px 0;border-style:solid none}.redtext{color:maroon}.greentext{color:green}blockquote a{color:#d00}blockquote{word-break:break-all;white-space:pre-wrap}span{margin-right:5px}section{display:flex;flex-direction:column;align-items:flex-start}input,textarea{font-family:arial,helvetica,sans-serif;font-size:10pt;border-radius:3px;max-width:100%;border:none;margin:2px;padding:5px}.form-wrapper{align-items:center;margin:10px 0}.actions{background:#d6daf0;border-color:#b7c5d9;border-width:0 1px 1px 0;border-style:none solid solid none;max-width:100%;display:flex;flex-direction:column;margin:2px 0;padding:2px}.action-wrapper{display:flex;flex-direction:column;align-items:flex-start}.actions label{margin:2px 0}.toggle-label:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.toggle-label{background:#d6daf0;padding:10px;border-radius:3px;text-align:center;border:1px solid #d3d3d3;max-width:100%;box-sizing:border-box}.toggle{display:none}.toggle:checked+.form-post{display:flex}.form-post{display:flex;flex-direction:column;max-width:100%;margin-top:10px}.togglable{display:none}.user-id{text-shadow:#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px;color:#fff;padding:0 2px}.post-check{position:relative;top:3px;margin:-3px 1px!important}.post-files{float:left;margin-right:10px}.post-data{margin-top:-10px;padding-top:10px}.post-file{display:inline-flex;flex-direction:column;margin:0 4px;padding:2px 0}.post-file-info{text-align:center;margin:2px;margin-top:0;max-width:128px;word-break:break-all}.post-file-src{margin:0 auto}input textarea{padding:8px}.container{padding:10px}.board-title{color:#af0a0f;font:bolder 28px Tahoma;letter-spacing:-2px;text-align:center;margin:0}.no-decoration{text-decoration:none;color:#fff}.banner-check{display:flex;align-items:center}.board-banner{margin:10px;max-width:100%}.board-description{text-align:center;margin:0}.ban,.post-container{box-sizing:border-box;margin:2px 0;padding:2px;background:#d6daf0;border-color:#b7c5d9;border-width:0 1px 1px 0;border-style:none solid solid none;max-width:100%}.post-container:target{background-color:#d6bad0!important;border-color:#ba9dbf}.post-container.op{background:0 0;border:none;width:100%}.post-subject{color:#0f0c5d;font-weight:700}.post-capcode{font-weight:700;color:red}.post-name{color:#117743;font-weight:700}.catalog-tile-content .post-info,.post-container.op .post-info{background:0 0}.post-info{margin:-2px;padding:2px;padding-left:1px}.post-info *{margin-bottom:0;margin-top:-2px}.navbar{border-bottom:1px solid #d3d3d3}.nav-item{line-height:50px;text-decoration:none;float:left;background:#d6daf0;padding-left:10px;padding-right:10px;border-right:1px solid #d3d3d3}.right{float:right}.nav-item:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.footer{border-top:1px solid #d3d3d3;text-align:center;flex-shrink:0;margin-top:auto;line-height:50px}table,td,th{border-bottom:1px solid #d3d3d3;border-collapse:collapse}.boards-table{margin:0 auto}th{background:#d6daf0}td,th{padding:5px}hr{color:#d3d3d3}@media only screen and (max-width:800px){input{height:30px}.form-post{width:100%}.form-login{width:100%}blockquote{margin:1em}.post-check{top:2px;margin-left:2px!important;height:8px}.post-container{width:100%;border:none}.catalog-tile{overflow-y:hidden}.boards-table{width:100%}.post-info{background-color:#b7c5d9}}

@ -1 +1 @@
body{font-family:arial,helvetica,sans-serif;font-size:10pt;background:#eef2ff;flex:1;display:flex;flex-direction:column;min-height:100vh;margin:0}.code{border-left:10px solid #b7c5d9;display:block;padding-left:5px;font-family:monospace;margin:.5em 0}.pages a{text-decoration:none}object{object-fit:scale-down}.board-header{display:flex;flex-direction:column;align-items:center}.catalog-tile-button{width:100%;line-height:30px;float:left;background:#b7c5d9;text-decoration:none;color:#000}.catalog-tile-content{padding:5px}.catalog-tile{margin:2px;text-align:center;max-height:300px;width:250px;overflow:hidden;overflow-y:auto;border:2px solid #b7c5d9;box-sizing:border-box}.no-m-p{margin:0;padding:0}.catalog-thumb{box-shadow:0 0 3px #000;min-width:64px;min-height:64px;object-fit:cover}.catalog{display:flex;align-items:flex-start;justify-content:space-evenly;flex-flow:row wrap}.spoiler{background:#000}.spoiler:hover{color:#fff}.mode{background-color:red;color:#fff;font-weight:700;text-align:center}.reports{background:#fca!important;border-color:#c97!important;border-width:1px 0;border-style:solid none}.redtext{color:maroon}.greentext{color:green}blockquote a{color:#d00}blockquote{word-break:break-all;white-space:pre-wrap}span{margin-right:5px}section{display:flex;flex-direction:column;align-items:flex-start}input,textarea{font-family:arial,helvetica,sans-serif;font-size:10pt;border-radius:3px;max-width:100%;border:none;margin:2px;padding:5px}.form-wrapper{align-items:center;margin:10px 0}.actions{background:#d6daf0;border-color:#b7c5d9;border-width:0 1px 1px 0;border-style:none solid solid none;max-width:100%;display:flex;flex-direction:column;margin:2px 0;padding:2px}.action-wrapper{display:flex;flex-direction:column;align-items:flex-start}.actions label{margin:2px 0}.toggle-label:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.toggle-label{background:#d6daf0;padding:10px;border-radius:3px;text-align:center;border:1px solid #d3d3d3;max-width:100%;box-sizing:border-box}.toggle{display:none}.toggle:checked+.form-post{display:flex}.form-post{display:flex;flex-direction:column;max-width:100%;margin-top:10px}.togglable{display:none}.user-id{text-shadow:#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px;color:#fff;padding:0 2px}.post-check{position:relative;top:3px;margin:-3px 1px!important}.post-files{float:left;margin-right:10px}.post-data{margin-top:-10px;padding-top:10px}.post-file{display:inline-flex;flex-direction:column;margin:0 4px;padding:2px 0}.post-file-info{text-align:center;margin:2px;margin-top:0;max-width:128px;word-break:break-all}.post-file-src{margin:0 auto}input textarea{padding:8px}.container{padding:10px}.board-title{color:#af0a0f;font:bolder 28px Tahoma;letter-spacing:-2px;text-align:center;margin:0}.no-decoration{text-decoration:none;color:#fff}.banner-check{display:flex;align-items:center}.board-banner{margin:10px;max-width:100%}.board-description{text-align:center;margin:0}.ban,.post-container{box-sizing:border-box;margin:2px 0;padding:2px;background:#d6daf0;border-color:#b7c5d9;border-width:0 1px 1px 0;border-style:none solid solid none;max-width:100%}.post-container:target{background-color:#d6bad0!important;border-color:#ba9dbf}.post-container.op{background:0 0;border:none;width:100%}.post-subject{color:#0f0c5d;font-weight:700}.post-capcode{font-weight:700;color:red}.post-name{color:#117743;font-weight:700}.catalog-tile-content .post-info,.post-container.op .post-info{background:0 0}.post-info{margin:-2px;padding:2px;padding-left:1px}.post-info *{margin-bottom:0;margin-top:-2px}.navbar{border-bottom:1px solid #d3d3d3}.nav-item{line-height:50px;text-decoration:none;float:left;background:#d6daf0;padding-left:10px;padding-right:10px;border-right:1px solid #d3d3d3}.right{float:right}.nav-item:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.footer{border-top:1px solid #d3d3d3;text-align:center;flex-shrink:0;margin-top:auto;line-height:50px}table,td,th{border-bottom:1px solid #d3d3d3;border-collapse:collapse}.boards-table{margin:0 auto}th{background:#d6daf0}td,th{padding:5px}hr{color:#d3d3d3}@media only screen and (max-width:800px){input{height:30px}.form-post{width:100%}.form-login{width:100%}blockquote{margin:1em}.post-check{top:2px;margin-left:2px!important;height:8px}.post-container{width:100%;border:none}.catalog-tile{overflow-y:hidden}.boards-table{width:100%}.post-info{background-color:#b7c5d9}}
body{font-family:arial,helvetica,sans-serif;font-size:10pt;background:#eef2ff;flex:1;display:flex;flex-direction:column;min-height:100vh;margin:0}.code{border-left:10px solid #b7c5d9;display:block;padding-left:5px;font-family:monospace;margin:.5em 0}.pages{padding:10px;margin:10px 0}.pages a{text-decoration:none}object{object-fit:contain}.board-header{display:flex;flex-direction:column;align-items:center}.catalog-tile-button{width:100%;line-height:30px;float:left;background:#b7c5d9;text-decoration:none;color:#000}.catalog-tile-content{padding:5px}.catalog-tile{margin:2px;text-align:center;max-height:300px;width:250px;overflow:hidden;overflow-y:auto;border:2px solid #b7c5d9;box-sizing:border-box}.no-m-p{margin:0;padding:0}.catalog-thumb{box-shadow:0 0 3px #000;min-width:64px;min-height:64px;object-fit:cover}.catalog{display:flex;align-items:flex-start;justify-content:space-evenly;flex-flow:row wrap}.spoiler{background:#000}.spoiler:hover{color:#fff}.mode{background-color:red;color:#fff;font-weight:700;text-align:center}.reports{background:#fca!important;border-color:#c97!important;border-width:1px 0;border-style:solid none}.redtext{color:maroon}.greentext{color:green}blockquote a{color:#d00}blockquote{word-break:break-all;white-space:pre-wrap}span{margin-right:5px}.action-wrapper,.form-wrapper,.post-container,.thread{display:flex;flex-direction:column;align-items:flex-start}.form-wrapper{align-items:center;margin:10px 0}.actions,.pages,.post-container{background:#d6daf0;border-color:#b7c5d9;border-width:0 1px 1px 0;border-style:none solid solid none}.actions{max-width:100%;display:flex;flex-direction:column;margin:2px 0;padding:2px}.action-wrapper{display:flex;flex-direction:column;align-items:flex-start}.actions label{margin:2px 0}.toggle-label:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.toggle-label{background:#d6daf0;padding:10px;border-radius:3px;text-align:center;border:1px solid #d3d3d3;max-width:100%;box-sizing:border-box}.toggle{display:none}.toggle:checked+*{display:flex}.form-post{display:flex;flex-direction:column;max-width:100%;margin-top:10px}.togglable{display:none}.user-id{text-shadow:#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px;color:#fff;padding:0 2px}.post-check{position:relative;top:3px;margin:-3px 1px!important}.post-files{float:left;margin-right:10px}.post-data{margin-top:-10px;padding-top:10px}.post-file{display:inline-flex;flex-direction:column;margin:0 4px;padding:2px 0}.post-file-info{text-align:center;margin:2px;margin-top:0;max-width:128px;word-break:break-all}.post-file-src{margin:0 auto}input textarea{padding:8px}.no-resize{resize:none}.container{padding:10px}.board-title{color:#af0a0f;font:bolder 28px Tahoma,sans-serif;letter-spacing:-2px;text-align:center;margin:0}.no-decoration{text-decoration:none;color:#fff}.banner-check{display:flex;align-items:center}.board-banner{margin:10px;max-width:100%}.board-description{text-align:center;margin:0}.ban,.post-container{box-sizing:border-box;margin:2px 0;padding:2px;max-width:100%}.post-container:target{background-color:#d6bad0!important;border-color:#ba9dbf}.post-container.op{background:0 0;border:none}.post-subject{color:#0f0c5d;font-weight:700}.post-capcode{font-weight:700;color:red}.post-name,.post-tripcode{color:#117743}.post-name{font-weight:700}.catalog-tile-content .post-info,.post-container.op .post-info{background:0 0}.post-info{margin:-2px;padding:2px;padding-left:1px}.post-info *{margin-bottom:0;margin-top:-2px}.navbar{border-bottom:1px solid #d3d3d3}.nav-item{line-height:50px;text-decoration:none;float:left;background:#d6daf0;padding-left:10px;padding-right:10px;border-right:1px solid #d3d3d3}.right{float:right}.nav-item:hover{box-shadow:inset 0 0 100px 100px rgba(255,255,255,.25)}.footer{border-top:1px solid #d3d3d3;text-align:center;flex-shrink:0;margin-top:auto;line-height:50px}input[type=password],input[type=text],textarea{border:1px solid #a9a9a9;font-size:inherit;font-family:arial,helvetica,sans-serif;margin:0;flex-grow:1}.postform-section{display:flex;margin-bottom:1px}.postform-label{padding:3px;border:1px solid #000;min-width:80px;background:#98e;display:flex;justify-content:center;flex-direction:column;font-weight:700;margin-right:1px}.boards-table{margin:0 auto}hr{color:#d3d3d3}@media only screen and (max-width:800px){input{height:30px}.form-post{width:100%}.form-login{width:100%}blockquote{margin:1em}.post-check{top:2px;margin-left:2px!important;height:8px}.post-container{width:100%;border:none}.catalog-tile{overflow-y:hidden}.boards-table{width:100%}.post-info{background-color:#b7c5d9}}

@ -17,8 +17,13 @@ body {
margin: 0.5em 0;
}
.pages {
padding: 10px;
margin: 10px 0;
}
.pages a {
text-decoration: none;
text-decoration: none;
}
object {
@ -117,32 +122,25 @@ span {
margin-right: 5px;
}
section {
.thread, .action-wrapper, .form-wrapper, .post-container {
display: flex;
flex-direction: column;
align-items: flex-start;
}
input, textarea {
font-family: arial, helvetica, sans-serif;
font-size: 10pt;
border-radius: 3px;
max-width:100%;
border: none;
margin: 2px;
padding: 5px;
}
.form-wrapper {
align-items: center;
margin: 10px 0;
}
.actions {
.actions, .post-container, .pages {
background: #D6DAF0;
border-color: #B7C5D9;
border-width: 0 1px 1px 0;
border-style: none solid solid none;
}
.actions {
max-width: 100%;
display: flex;
flex-direction: column;
@ -181,7 +179,7 @@ input, textarea {
display: none;
}
.toggle:checked + .form-post {
.toggle:checked + * {
display: flex;
}
@ -244,13 +242,17 @@ input textarea {
padding: 8px;
}
.no-resize {
resize: none;
}
.container {
padding: 10px;
}
.board-title {
color: #af0a0f;
font: bolder 28px Tahoma;
font: bolder 28px Tahoma,sans-serif;
letter-spacing: -2px;
text-align: center;
margin: 0;
@ -285,10 +287,6 @@ input textarea {
box-sizing: border-box;
margin: 2px 0;
padding: 2px;
background: #D6DAF0;
border-color: #B7C5D9;
border-width: 0 1px 1px 0;
border-style: none solid solid none;
max-width: 100%;
}
@ -300,7 +298,6 @@ input textarea {
.post-container.op {
background: none;
border: none;
width: 100%;
}
.post-subject {
@ -313,8 +310,11 @@ input textarea {
color: red;
}
.post-name {
.post-tripcode, .post-name {
color: #117743;
}
.post-name {
font-weight: bold;
}
@ -332,8 +332,8 @@ input textarea {
}
.post-info * {
margin-bottom: 0;
margin-top: -2px;
margin-bottom: 0;
margin-top: -2px;
}
.navbar {
@ -366,21 +366,33 @@ input textarea {
line-height: 50px;
}
table, th, td {
border-bottom: 1px solid lightgray;
border-collapse: collapse;
input[type="text"], input[type="password"], textarea {
border: 1px solid #a9a9a9;
font-size: inherit;
font-family: arial,helvetica,sans-serif;
margin: 0;
flex-grow: 1;
}
.boards-table {
margin: 0 auto;
.postform-section {
display: flex;
margin-bottom: 1px;
}
th {
background: #D6DAF0;
.postform-label {
padding: 3px;
border: 1px solid black;
min-width: 80px;
background: #98E;
display: flex;
justify-content: center;
flex-direction: column;
font-weight: bold;
margin-right: 1px;
}
th, td {
padding: 5px;
.boards-table {
margin: 0 auto;
}
hr {

@ -8,7 +8,7 @@ const gulp = require('gulp')
const paths = {
styles: {
src: 'gulp/res/css/*.css',
dest: 'dist/css/'
dest: 'gulp/dist/css/'
},
images: {
src: 'gulp/res/img/*',
@ -16,7 +16,7 @@ const paths = {
},
scripts: {
src: 'gulp/res/js/*.js',
dest: 'dist/js/'
dest: 'gulp/dist/js/'
}
};

@ -135,24 +135,20 @@ module.exports = async (req, res, next, numFiles) => {
const userId = fullUserIdHash.substring(fullUserIdHash.length-6);
let name = req.body.name;
let tripcode = null;
let capcode = null;
if (name && name.length > 0) {
// get matches with names groups for name, trip and capcode in 1 regex
// get matches with named groups for name, trip and capcode in 1 regex
const matches = name.match(nameRegex);
//regex to include "insecure" tripcodes. not implemented yet
//const matches = name.match(/^(?<name>[^#]+)?(?:##|#)(?<tripcode>[^#]+)(?:(?:##) (?<capcode>.+))?$/)
if (matches && matches.groups) {
const groups = matches.groups;
//reset name
name = '';
//name
if (groups.name) {
name += groups.name
name = groups.name
}
//tripcode
if (groups.tripcode) {
const tripcode = await getTripCode(groups.tripcode);
name += `##${tripcode}`;
tripcode = `!!${(await getTripCode(groups.tripcode))}`;
}
//capcode
if (groups.capcode && hasPerms(req, res)) {
@ -174,6 +170,7 @@ module.exports = async (req, res, next, numFiles) => {
const data = {
'board': req.params.board,
'name': name || 'Anonymous',
'tripcode': tripcode,
'capcode': capcode,
'subject': req.body.subject || '',
'date': new Date(),

@ -1,5 +1,6 @@
.action-wrapper
.actions Actions:
.actions
header Actions:
label
input.post-check(type='checkbox', name='delete' value=1)
| Delete
@ -16,7 +17,8 @@
| Global Report
label
input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off')
.actions Mod Actions:
.actions
header Mod Actions:
label
input.post-check(type='checkbox', name='ban' value=1)
| Ban Poster

@ -1,5 +1,6 @@
.action-wrapper
.actions Actions:
.actions
header Actions:
label
input.post-check(type='checkbox', name='delete' value=1)
| Delete
@ -8,7 +9,8 @@
| Spoiler Images
label
input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off')
.actions Mod Actions:
.actions
header Mod Actions:
label
input.post-check(type='checkbox', name='global_dismiss' value=1)
| Dismiss Global Reports
@ -21,4 +23,3 @@
label
input#report(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off')
input(type='submit', value='submit')

@ -1,5 +1,6 @@
.action-wrapper
.actions Actions:
.actions
header Actions:
label
input.post-check(type='checkbox', name='delete' value=1)
| Delete
@ -13,7 +14,8 @@
| Global Report
label
input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off')
.actions Mod Actions:
.actions
header Mod Actions:
label
input.post-check(type='checkbox', name='dismiss' value=1)
| Dismiss Reports
@ -29,4 +31,3 @@
label
input#report(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off')
input(type='submit', value='submit')

@ -3,8 +3,7 @@ section.form-wrapper
input.toggle(type='checkbox')
form.form-post.togglable(action=`/forms/board/${board._id}/addbanners`, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf)
span
input#file(type='file', name='file' multiple)
input#file(type='file', name='file' multiple)
input(type='submit', value='submit')
section.form-wrapper

@ -1,6 +1,8 @@
span.pages Page:
nav.pages Page:
- for(let i = 1; i <= pages; i++)
if i === page
span: a(href=`/${board._id}?p=${i}`) [#{i}]
else
span: a(href=`/${board._id}?p=${i}`) #{i}
| |
a(href=`/${board._id}/catalog`) [Catalog]

@ -1,29 +1,28 @@
section.form-wrapper
label.toggle-label Show Post Form
input.toggle(type='checkbox')
form.form-post.togglable(action=`/forms/board/${board._id}/post`, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf)
input(type='hidden' name='thread' value=thread != null ? thread.postId : null)
input#title(type='text', name='subject', placeholder='subject' autocomplete='off' maxlength='50')
input#name(type='text', name='name', placeholder='name' autocomplete='off' maxlength='50')
input#name(type='text', name='email', placeholder='email' autocomplete='off' maxlength='50')
input#password(type='password', name='password', placeholder='post password' autocomplete='off' maxlength='50')
textarea#message(name='message', rows='8', cols='50', placeholder='message' autocomplete='off' maxlength='2000')
form.form-post(action=`/forms/board/${board._id}/post`, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf)
input(type='hidden' name='thread' value=thread != null ? thread.postId : null)
section.postform-section
.postform-label Name
input#name(type='text', name='name', placeholder='Anonymous' autocomplete='off' maxlength='50')
section.postform-section
.postform-label Subject
input#title(type='text', name='subject', autocomplete='off' maxlength='50')
section.postform-section
.postform-label Email
input#name(type='text', name='email', autocomplete='off' maxlength='50')
section.postform-section
.postform-label Password
input#password(type='password', name='password', autocomplete='off' maxlength='50')
section.postform-section
.postform-label Message
textarea#message(name='message', rows='5', autocomplete='off' maxlength='2000')
section.postform-section
.postform-label Files
span
input#file(type='file', name='file' multiple)
label
input.post-check#spoiler(type='checkbox', name='spoiler', value='true')
| Spoiler
input(type='submit', value='submit')
input(type='submit', value='submit')

@ -2,21 +2,25 @@ mixin post(post, truncate, manage=false, globalmanage=false)
article(id=post.postId class='post-container '+(post.thread ? '' : 'op'))
header.post-info
span
if globalmanage
input.post-check(type='checkbox', name='globalcheckedposts[]' value=post._id)
else
input.post-check(type='checkbox', name='checkedposts[]' value=post.postId)
if post.subject
span.post-subject #{post.subject}
if post.email
a(href=`mailto:${post.email}`)
span.post-name #{post.name}
else
span.post-name #{post.name}
if post.capcode
span.post-capcode #{post.capcode}
span #{post.date.toLocaleString()}
span.user-id(style=`background: #${post.userId}`) #{post.userId}
label
if globalmanage
input.post-check(type='checkbox', name='globalcheckedposts[]' value=post._id)
else
input.post-check(type='checkbox', name='checkedposts[]' value=post.postId)
|
if post.subject
span.post-subject #{post.subject}
if post.email
a(href=`mailto:${post.email}`)
span.post-name #{post.name}
else
span.post-name #{post.name}
if post.tripcode
span.post-tripcode #{post.tripcode}
if post.capcode
span.post-capcode #{post.capcode}
span #{post.date.toLocaleString()}
span.user-id(style=`background: #${post.userId}`) #{post.userId}
span: a(href=`/${post.board}/thread/${post.thread || post.postId}#${post.postId}`) ##{post.postId}
.post-data
if post.files.length > 0

@ -7,8 +7,7 @@ block head
block content
include ../includes/boardheader.pug
include ../includes/postform.pug
.mode Posting mode: Thread [#[a.no-decoration(href=`/${board._id}/catalog`) Catalog]]
hr(size=1)
.mode Posting mode: Thread
include ../includes/pages.pug
hr(size=1)
form(action='/forms/board/'+board._id+'/actions' method='POST' enctype='application/x-www-form-urlencoded')
@ -22,6 +21,4 @@ block content
for post in thread.replies
+post(post, true)
hr(size=1)
include ../includes/pages.pug
hr(size=1)
include ../includes/actionfooter.pug

@ -7,6 +7,7 @@ block head
block content
h1.board-title Global Management
p: a(href='/changepassword') Change password
h4 All Reports:
form(action=`/forms/global/actions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)

@ -8,7 +8,12 @@ block content
form.form-post(action='/forms/login' method='POST')
input(type='hidden' name='_csrf' value=csrf)
input(type='hidden' name='redirect' value=redirect)
input#username(type='text', name='username', placeholder='username' maxlength='50')
input#password(type='password', name='password', placeholder='password' maxlength='100')
section.postform-section
.postform-label Username
input#username(type='text', name='username', placeholder='username' maxlength='50')
section.postform-section
.postform-label Password
input#password(type='password', name='password', placeholder='password' maxlength='100')
input(type='submit', value='submit')
span No account? #[a(href='/register') Click here to Register]
p No account? #[a(href='/register') Register]

@ -8,6 +8,7 @@ block head
block content
include ../includes/boardheader.pug
include ../includes/bannerform.pug
p: a(href='/changepassword') Change password
h4 Reports:
form(action=`/forms/board/${board._id}/actions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)

@ -7,8 +7,14 @@ block content
section.form-wrapper
form.form-post(action='/forms/register' method='POST')
input(type='hidden' name='_csrf' value=csrf)
input#username(type='text', name='username', placeholder='username' maxlength='50')
input#password(type='password', name='password', placeholder='password' maxlength='100')
input#password(type='password', name='passwordconfirm', placeholder='confirm password' maxlength='100')
section.postform-section
.postform-label Username
input#username(type='text', name='username', placeholder='username' maxlength='50')
section.postform-section
.postform-label Password
input#password(type='password', name='password', placeholder='password' maxlength='100')
section.postform-section
.postform-label Confirm Password
input#password(type='password', name='passwordconfirm', placeholder='confirm password' maxlength='100')
input(type='submit', value='submit')
span Already have an account? #[a(href='/login') Click here to Login]
p Already have an account? #[a(href='/login') Login]

Loading…
Cancel
Save