diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 6ccb6e8d..1b9aa589 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -83,7 +83,7 @@ pre { width: -moz-max-content; } -a, a:visited { +a, a:visited, a .post-name { text-decoration: underline; color: #34345C; } @@ -207,7 +207,7 @@ p { color: green; } -pre a, pre a:visited, a:hover { +a .post-name:hover, pre a, pre a:visited, a:hover { color: #d00; } @@ -466,6 +466,7 @@ input textarea { margin: -5px -5px 0 -5px; padding: 5px; padding-left: 3px; + display:block; } .post-info * { @@ -632,7 +633,17 @@ hr { .catalog-tile { 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 { @@ -644,3 +655,4 @@ hr { } } + diff --git a/models/forms/changeboardsettings.js b/models/forms/changeboardsettings.js index 02d095a2..69774b0c 100644 --- a/models/forms/changeboardsettings.js +++ b/models/forms/changeboardsettings.js @@ -65,19 +65,14 @@ module.exports = async (req, res, next) => { } 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}/`)); } +/* disabled since homepage is built daily on schedule if (oldSettings.name !== newSettings.name || oldSettings.description !== newSettings.description) { promises.push(buildHomepage()) } +*/ if (promises.length > 0) { await Promise.all(promises); diff --git a/views/includes/pages.pug b/views/includes/pages.pug index a1b29fde..537a4d0c 100644 --- a/views/includes/pages.pug +++ b/views/includes/pages.pug @@ -1,4 +1,6 @@ | Page: +if maxPage === 0 + a.bold(href=`/${board._id}/index.html`) [1] - for(let i = 1; i <= maxPage; i++) if page === i a.bold(href=`/${board._id}/${i === 1 ? 'index' : i}.html`) [#{i}] diff --git a/views/mixins/post.pug b/views/mixins/post.pug index 5d9f5f2a..fb51def7 100644 --- a/views/mixins/post.pug +++ b/views/mixins/post.pug @@ -2,7 +2,7 @@ mixin post(post, truncate, manage=false, globalmanage=false) .anchor(id=post.postId) article(class=`post-container ${post.thread ? '' : 'op'}`) - const postURL = `/${post.board}/thread/${post.thread || post.postId}.html#${post.postId}`; - header.post-info + label.post-info if globalmanage input.post-check(type='checkbox', name='globalcheckedposts[]' value=post._id) else diff --git a/views/pages/home.pug b/views/pages/home.pug index d5fae059..da3765ce 100644 --- a/views/pages/home.pug +++ b/views/pages/home.pug @@ -22,14 +22,16 @@ block content .table-container.flex-center.mv-10 table.table-body tr.table-head - th Id - th Name + th Board + th Title th Description + th Posts/day each board in boards tr.table-row td: a(href=`/${board._id}/`) /#{board._id}/ td #{board.settings.name} td #{board.settings.description} + td #{board.ppd} .table-container.flex-center.mv-10 table.table-body tr.table-head diff --git a/wipe.js b/wipe.js index 929ee409..d60c22a4 100644 --- a/wipe.js +++ b/wipe.js @@ -37,9 +37,10 @@ const Mongo = require(__dirname+'/db/db.js') owner: '', moderators: [], banners: [], + sequence_value: 1, settings: { - name: 'politically incorrect', - description: 'posts about politics', + name: 'politics', + description: 'talk about politics', captcha: true, forceAnon: true, ids: true, @@ -61,6 +62,7 @@ const Mongo = require(__dirname+'/db/db.js') owner: '', moderators: [], banners: [], + sequence_value: 1, settings: { name: 'random', description: 'anything and everything', @@ -81,13 +83,14 @@ const Mongo = require(__dirname+'/db/db.js') } }) await Boards.insertOne({ - _id: 't', - name: 'text', - description: 'no images allowed', + _id: 't', owner: '', moderators: [], banners: [], + sequence_value: 1, settings: { + name: 'test', + description: 'testing board', captcha: true, forceAnon: true, ids: false,