From f3b40dcd7583498bf43f0a12fad2a951562d7a4e Mon Sep 17 00:00:00 2001 From: fatchan Date: Tue, 23 Jul 2019 08:31:11 +0000 Subject: [PATCH] shorten some names in css and remove unnecessary classes from ~tables --- gulp/res/css/style.css | 21 +++----- views/custompages/faq.pug | 10 ++++ views/custompages/rules.pug | 12 +++++ views/includes/footer.pug | 6 ++- views/includes/postform.pug | 38 +++++++------- views/pages/changepassword.pug | 22 ++++----- views/pages/home.pug | 18 +++---- views/pages/login.pug | 8 +-- views/pages/manage.pug | 90 +++++++++++++++++----------------- views/pages/register.pug | 18 +++---- 10 files changed, 132 insertions(+), 111 deletions(-) create mode 100644 views/custompages/rules.pug diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 20995252..781c0dfe 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -10,7 +10,6 @@ --highlighted-post-outline-color: #ba9dbf; --report-color: #fca; --report-outline-color: #c97; - --table-row-even-color: #eef2ff; --board-title: #af0a0f; --hr: lightgray; --font-color: black; @@ -273,18 +272,14 @@ a .post-name:hover, a:hover { margin-top: -10px; } -.table-row:nth-child(2n+1) { - background: var(--table-row-even-color); -} - -.table-body { - background: var(--post-color); +table { + background: var(--background-rest); border: 1px solid var(--box-border-color); border-spacing: 0; width: 600px; } -.table-head { +th { background: var(--label-color); text-align: left; } @@ -626,17 +621,17 @@ input[type="file"] { display: flex; } -.postform-row, .postform-col { +.row, .col { display: flex; } -.postform-row { +.row { margin-bottom: 1px; overflow: hidden; max-width: 100%; } -.postform-col { +.col { flex-direction: column; flex-grow: 1; } @@ -657,7 +652,7 @@ input[type="file"] { object-fit: contain; } -.postform-label { +.label { padding: 3px; border: 1px solid var(--box-border-color); min-width: 80px; @@ -724,7 +719,7 @@ hr { width: calc(50% - 2px); } - .table-body { + table { width: 100%; } diff --git a/views/custompages/faq.pug b/views/custompages/faq.pug index c4330dde..3f2740c2 100644 --- a/views/custompages/faq.pug +++ b/views/custompages/faq.pug @@ -69,3 +69,13 @@ block content b Hyperlinking div https://example.com → #[a(href='https://example.com') https://example.com] + br + + b Quotes + div >>123 → #[a(class="quote" href="#!") >>123] + br + + b Cross Board Quotes + div >>>/b/ → #[a(class="quote" href="#!") >>>/b/] + div >>>/b/123 → #[a(class="quote" href="#!") >>>/b/123] + br diff --git a/views/custompages/rules.pug b/views/custompages/rules.pug new file mode 100644 index 00000000..89b40051 --- /dev/null +++ b/views/custompages/rules.pug @@ -0,0 +1,12 @@ +extends ../layout.pug + +block head + title Rules + +block content + h1.board-title Rules + .table-container.flex-center.mv-10 + table.table-body + tr.table-row + td + p No content should be posted or linked to that is illegal in the United States of America. diff --git a/views/includes/footer.pug b/views/includes/footer.pug index ac7fe3ac..5b5248b2 100644 --- a/views/includes/footer.pug +++ b/views/includes/footer.pug @@ -1,4 +1,8 @@ small.footer | - + a(href='/rules.html') rules + | - + a(href='/faq.html') faq + | - a(href='https://github.com/fatchan/jschan/') source code - | - + | - diff --git a/views/includes/postform.pug b/views/includes/postform.pug index f0d23bb4..5996e212 100644 --- a/views/includes/postform.pug +++ b/views/includes/postform.pug @@ -3,39 +3,39 @@ section.form-wrapper.flex-center form.form-post#postform(action=`/forms/board/${board._id}/post`, enctype='multipart/form-data', method='POST') input(type='hidden' name='thread' value=isThread ? thread.postId : null) unless board.settings.forceAnon - section.postform-row - .postform-label Name + section.row + .label Name input.mr-1(type='text', name='name', placeholder=board.settings.defaultName autocomplete='off' maxlength='50') a.close.postform-style(href='#!') X - section.postform-row - .postform-label Subject + section.row + .label Subject if !isThread && board.settings.forceOPSubject .required * input(type='text', name='subject', autocomplete='off' maxlength='50' required=!isThread && board.settings.forceOPSubject) - section.postform-row - .postform-label Email + section.row + .label Email input(type='text', name='email', autocomplete='off' maxlength='50') else - section.postform-row - .postform-label Sage + section.row + .label Sage label.postform-style.ph-5 input(type='checkbox', name='email', value='sage') | Sage a.close.postform-style(href='#!') X if !isThread - section.postform-row - .postform-label Subject + section.row + .label Subject if board.settings.forceOPSubject .required * input(type='text', name='subject', autocomplete='off' maxlength='50' required=board.settings.forceOPSubject) - section.postform-row - .postform-label Message + section.row + .label Message if !isThread && board.settings.forceOPMessage .required * textarea(name='message', rows='5', autocomplete='off' maxlength='4000' required=!isThread && board.settings.forceOPMessage) if board.settings.maxFiles > 0 - section.postform-row - .postform-label Files + section.row + .label Files if !isThread && board.settings.forceOPFile .required * input(type='file', name='file' multiple required=!isThread && board.settings.forceOPFile) @@ -44,14 +44,14 @@ section.form-wrapper.flex-center input(type='checkbox', name='spoiler', value='true') | Spoiler if board.settings.userPostSpoiler || board.settings.userPostDelete || board.settings.userPostUnlink - section.postform-row - .postform-label Password + section.row + .label Password input(type='password', name='password', autocomplete='off' placeholder='password to delete/spoiler/unlink later' maxlength='50') if board.settings.captcha - section.postform-row - .postform-label Captcha + section.row + .label Captcha .required * - .postform-col + .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') if !isThread && ((board.settings.forceOPFile && board.settings.maxFiles > 0) || board.settings.forceOPMessage || board.settings.forceOPSubject) diff --git a/views/pages/changepassword.pug b/views/pages/changepassword.pug index a35a05ec..8b8bd5ac 100644 --- a/views/pages/changepassword.pug +++ b/views/pages/changepassword.pug @@ -7,26 +7,26 @@ block content section.form-wrapper.flex-center.mv-10 form.form-post(action='/forms/changepassword' method='POST') //input(type='hidden' name='_csrf' value=csrf) - section.postform-row - .postform-label Username + section.row + .label Username .required * input#username(type='text', name='username', maxlength='50' required) - section.postform-row - .postform-label Existing Password + section.row + .label Existing Password .required * input#password(type='password', name='password', maxlength='100' required) - section.postform-row - .postform-label New Password + section.row + .label New Password .required * input#password(type='password', name='newpassword', maxlength='100' required) - section.postform-row - .postform-label Confirm New Password + section.row + .label Confirm New Password .required * input#password(type='password', name='newpasswordconfirm', maxlength='100' required) - section.postform-row - .postform-label Captcha + section.row + .label Captcha .required * - span.postform-col + span.col 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') input(type='submit', value='Change Password') diff --git a/views/pages/home.pug b/views/pages/home.pug index 78c0412b..586b5365 100644 --- a/views/pages/home.pug +++ b/views/pages/home.pug @@ -6,10 +6,10 @@ block head block content h1.board-title Fatchan .table-container.flex-center.mv-10 - table.table-body - tr.table-head + table + tr th Welcome - tr.table-row + tr td p | This is an anonymous imageboard, a type of discussion board where users share images and text about various topics. @@ -20,25 +20,25 @@ block content p | Choose a board below and join the discussion! .table-container.flex-center.mv-10 - table.table-body - tr.table-head + table + tr th Board th Title th Description th Posts/h th Total Posts each board in boards - tr.table-row + tr td: a(href=`/${board._id}/`) /#{board._id}/ td #{board.settings.name} td #{board.settings.description} td #{board.pph} td #{board.sequence_value-1} .table-container.flex-center.mv-10 - table.table-body - tr.table-head + table + tr th Source Code - tr.table-row + tr td p | The source code for this site is available diff --git a/views/pages/login.pug b/views/pages/login.pug index 17dfca1f..5730203e 100644 --- a/views/pages/login.pug +++ b/views/pages/login.pug @@ -7,12 +7,12 @@ block content section.form-wrapper.flex-center.mv-10 form.form-post(action='/forms/login' method='POST') input(type='hidden' name='goto' value=goto) - section.postform-row - .postform-label Username + section.row + .label Username .required * input#username(type='text', name='username', maxlength='50' required) - section.postform-row - .postform-label Password + section.row + .label Password .required * input#password(type='password', name='password', maxlength='100' required) input(type='submit', value='submit') diff --git a/views/pages/manage.pug b/views/pages/manage.pug index 2b4cccd7..0241f7aa 100644 --- a/views/pages/manage.pug +++ b/views/pages/manage.pug @@ -12,65 +12,65 @@ block content section.form-wrapper.flexleft.mv-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.postform-row - .postform-label Board name + section.row + .label Board name input(type='text' name='name' placeholder=board.settings.name) - section.postform-row - .postform-label Board Description + section.row + .label Board Description input(type='text' name='description' placeholder=board.settings.description) - section.postform-row - .postform-label IDs - label.postform-style.ph-5 + section.row + .label IDs + label.style.ph-5 input(type='checkbox', name='ids', value='true' checked=board.settings.ids) - section.postform-row - .postform-label Force Anon - label.postform-style.ph-5 + section.row + .label Force Anon + label.style.ph-5 input(type='checkbox', name='force_anon', value='true' checked=board.settings.forceAnon) - section.postform-row - .postform-label Post Captcha - label.postform-style.ph-5 + section.row + .label Post Captcha + label.style.ph-5 input(type='checkbox', name='captcha', value='true' checked=board.settings.captcha) - section.postform-row - .postform-label Captcha PPH Trigger + section.row + .label Captcha PPH Trigger input(type='number' name='captcha_trigger' placeholder=board.settings.captchaTrigger) - section.postform-row - .postform-label Post Deletion - label.postform-style.ph-5 + section.row + .label Post Deletion + label.style.ph-5 input(type='checkbox', name='user_post_delete', value='true' checked=board.settings.userPostDelete) - section.postform-row - .postform-label File Spoilers - label.postform-style.ph-5 + section.row + .label File Spoilers + label.style.ph-5 input(type='checkbox', name='user_post_spoiler', value='true' checked=board.settings.userPostSpoiler) - section.postform-row - .postform-label File Unlinking - label.postform-style.ph-5 + section.row + .label File Unlinking + label.style.ph-5 input(type='checkbox', name='user_post_unlink', value='true' checked=board.settings.userPostUnlink) - section.postform-row - .postform-label Force OP Message - label.postform-style.ph-5 + section.row + .label Force OP Message + label.style.ph-5 input(type='checkbox', name='force_op_message', value='true' checked=board.settings.forceOPMessage) - section.postform-row - .postform-label Force OP Subject - label.postform-style.ph-5 + section.row + .label Force OP Subject + label.style.ph-5 input(type='checkbox', name='force_op_subject', value='true' checked=board.settings.forceOPSubject) - section.postform-row - .postform-label Force OP File - label.postform-style.ph-5 + section.row + .label Force OP File + label.style.ph-5 input(type='checkbox', name='force_op_file', value='true' checked=board.settings.forceOPFile) - section.postform-row - .postform-label Anon Name + section.row + .label Anon Name input(type='text' name='default_name' placeholder=board.settings.defaultName) - section.postform-row - .postform-label Min Message Length + section.row + .label Min Message Length input(type='number' name='min_message_length' placeholder=board.settings.minMessageLength) - section.postform-row - .postform-label Thread Limit + section.row + .label Thread Limit input(type='number' name='thread_limit' placeholder=board.settings.threadLimit) - section.postform-row - .postform-label Reply Limit + section.row + .label Reply Limit input(type='number' name='reply_limit' placeholder=board.settings.replyLimit) - section.postform-row - .postform-label Max Files + section.row + .label Max Files input(type='number' name='max_files' placeholder=board.settings.maxFiles) input(type='submit', value='save settings') hr(size=1) @@ -78,8 +78,8 @@ block content section.form-wrapper.flexleft.mv-10 form.form-post(action=`/forms/board/${board._id}/addbanners`, enctype='multipart/form-data', method='POST') input(type='hidden' name='_csrf' value=csrf) - section.postform-row - .postform-label Upload + section.row + .label Upload .required * input#file(type='file', name='file' multiple required) input(type='submit', value='submit') diff --git a/views/pages/register.pug b/views/pages/register.pug index f0a4da9f..483c2681 100644 --- a/views/pages/register.pug +++ b/views/pages/register.pug @@ -7,22 +7,22 @@ block content section.form-wrapper.flex-center.mv-10 form.form-post(action='/forms/register' method='POST') //input(type='hidden' name='_csrf' value=csrf) - section.postform-row - .postform-label Username + section.row + .label Username .required * input#username(type='text', name='username', maxlength='50' required) - section.postform-row - .postform-label Password + section.row + .label Password .required * input#password(type='password', name='password', maxlength='100' required) - section.postform-row - .postform-label Confirm Password + section.row + .label Confirm Password .required * input#password(type='password', name='passwordconfirm', maxlength='100' required) - section.postform-row - .postform-label Captcha + section.row + .label Captcha .required * - span.postform-col + span.col 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') input(type='submit', value='Register')