catalog cleanup, email field link color, update wiper

merge-requests/208/head
fatchan 5 years ago
parent f82ad5a91e
commit 5dcb209054
  1. 18
      gulp/res/css/style.css
  2. 9
      models/forms/changeboardsettings.js
  3. 2
      views/includes/pages.pug
  4. 2
      views/mixins/post.pug
  5. 6
      views/pages/home.pug
  6. 13
      wipe.js

@ -83,7 +83,7 @@ pre {
width: -moz-max-content; width: -moz-max-content;
} }
a, a:visited { a, a:visited, a .post-name {
text-decoration: underline; text-decoration: underline;
color: #34345C; color: #34345C;
} }
@ -207,7 +207,7 @@ p {
color: green; color: green;
} }
pre a, pre a:visited, a:hover { a .post-name:hover, pre a, pre a:visited, a:hover {
color: #d00; color: #d00;
} }
@ -466,6 +466,7 @@ input textarea {
margin: -5px -5px 0 -5px; margin: -5px -5px 0 -5px;
padding: 5px; padding: 5px;
padding-left: 3px; padding-left: 3px;
display:block;
} }
.post-info * { .post-info * {
@ -632,7 +633,17 @@ hr {
.catalog-tile { .catalog-tile {
overflow-y: hidden; overflow-y: hidden;
width: 48%; width: 50%;
margin: 0 0 2px 0;
}
.catalog-tile:nth-child(odd) {
margin-right: 2px;
width: calc(50% - 2px);
}
.catalog-tile:hover {
overflow-y: scroll;
} }
.table-body { .table-body {
@ -644,3 +655,4 @@ hr {
} }
} }

@ -65,19 +65,14 @@ module.exports = async (req, res, next) => {
} }
if (oldSettings.captcha !== newSettings.captcha) { if (oldSettings.captcha !== newSettings.captcha) {
/*
&& newSettings.captcha === true
should it only delete all pages if enabling captcha, since the check is skipped if disabled?
or in both cases so that users dont enter a captcha that doesnt apply. i think in both is nicer
captcha shouldnt be toggled too often, because this could be expensive for popular boards
could also rebuild index pages here if wanted
*/
promises.push(remove(`${uploadDirectory}html/${req.params.board}/`)); promises.push(remove(`${uploadDirectory}html/${req.params.board}/`));
} }
/* disabled since homepage is built daily on schedule
if (oldSettings.name !== newSettings.name || oldSettings.description !== newSettings.description) { if (oldSettings.name !== newSettings.name || oldSettings.description !== newSettings.description) {
promises.push(buildHomepage()) promises.push(buildHomepage())
} }
*/
if (promises.length > 0) { if (promises.length > 0) {
await Promise.all(promises); await Promise.all(promises);

@ -1,4 +1,6 @@
| Page: | Page:
if maxPage === 0
a.bold(href=`/${board._id}/index.html`) [1]
- for(let i = 1; i <= maxPage; i++) - for(let i = 1; i <= maxPage; i++)
if page === i if page === i
a.bold(href=`/${board._id}/${i === 1 ? 'index' : i}.html`) [#{i}] a.bold(href=`/${board._id}/${i === 1 ? 'index' : i}.html`) [#{i}]

@ -2,7 +2,7 @@ mixin post(post, truncate, manage=false, globalmanage=false)
.anchor(id=post.postId) .anchor(id=post.postId)
article(class=`post-container ${post.thread ? '' : 'op'}`) article(class=`post-container ${post.thread ? '' : 'op'}`)
- const postURL = `/${post.board}/thread/${post.thread || post.postId}.html#${post.postId}`; - const postURL = `/${post.board}/thread/${post.thread || post.postId}.html#${post.postId}`;
header.post-info label.post-info
if globalmanage if globalmanage
input.post-check(type='checkbox', name='globalcheckedposts[]' value=post._id) input.post-check(type='checkbox', name='globalcheckedposts[]' value=post._id)
else else

@ -22,14 +22,16 @@ block content
.table-container.flex-center.mv-10 .table-container.flex-center.mv-10
table.table-body table.table-body
tr.table-head tr.table-head
th Id th Board
th Name th Title
th Description th Description
th Posts/day
each board in boards each board in boards
tr.table-row tr.table-row
td: a(href=`/${board._id}/`) /#{board._id}/ td: a(href=`/${board._id}/`) /#{board._id}/
td #{board.settings.name} td #{board.settings.name}
td #{board.settings.description} td #{board.settings.description}
td #{board.ppd}
.table-container.flex-center.mv-10 .table-container.flex-center.mv-10
table.table-body table.table-body
tr.table-head tr.table-head

@ -37,9 +37,10 @@ const Mongo = require(__dirname+'/db/db.js')
owner: '', owner: '',
moderators: [], moderators: [],
banners: [], banners: [],
sequence_value: 1,
settings: { settings: {
name: 'politically incorrect', name: 'politics',
description: 'posts about politics', description: 'talk about politics',
captcha: true, captcha: true,
forceAnon: true, forceAnon: true,
ids: true, ids: true,
@ -61,6 +62,7 @@ const Mongo = require(__dirname+'/db/db.js')
owner: '', owner: '',
moderators: [], moderators: [],
banners: [], banners: [],
sequence_value: 1,
settings: { settings: {
name: 'random', name: 'random',
description: 'anything and everything', description: 'anything and everything',
@ -81,13 +83,14 @@ const Mongo = require(__dirname+'/db/db.js')
} }
}) })
await Boards.insertOne({ await Boards.insertOne({
_id: 't', _id: 't',
name: 'text',
description: 'no images allowed',
owner: '', owner: '',
moderators: [], moderators: [],
banners: [], banners: [],
sequence_value: 1,
settings: { settings: {
name: 'test',
description: 'testing board',
captcha: true, captcha: true,
forceAnon: true, forceAnon: true,
ids: false, ids: false,

Loading…
Cancel
Save