details/summary tags instead of hacky hidden post form check css

merge-requests/208/head
fatchan 5 years ago
parent f7a5ce50dd
commit 54ff8b8c0e
  1. 7
      gulp/res/css/style.css
  2. 113
      views/includes/actionfooter.pug
  3. 62
      views/includes/actionfooter_globalmanage.pug
  4. 69
      views/includes/actionfooter_manage.pug
  5. 82
      views/includes/postform.pug
  6. 2
      views/pages/board.pug
  7. 1
      views/pages/thread.pug

@ -72,6 +72,7 @@ object {
.navbar { .navbar {
border-bottom: 1px solid #a9a9a9; border-bottom: 1px solid #a9a9a9;
background: #d6daf0;
} }
.catalog-tile-button { .catalog-tile-button {
@ -133,6 +134,7 @@ object {
} }
.mode { .mode {
margin-top: 1px;
background-color: red; background-color: red;
color: white; color: white;
font-weight: bold; font-weight: bold;
@ -211,7 +213,8 @@ td, th {
} }
.actions { .actions {
max-width: 100%; text-align: left;
max-width: 200px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 2px 0; margin: 2px 0;
@ -439,6 +442,7 @@ input textarea {
margin-top: auto; margin-top: auto;
line-height: 30px; line-height: 30px;
border-top: 1px solid #a9a9a9; border-top: 1px solid #a9a9a9;
background: #d6daf0;
} }
input[type="text"], input[type="submit"], input[type="password"], input[type="file"], textarea { input[type="text"], input[type="submit"], input[type="password"], input[type="file"], textarea {
@ -536,6 +540,7 @@ hr {
.catalog-tile { .catalog-tile {
overflow-y: hidden; overflow-y: hidden;
width: 48%;
} }
.table-body { .table-body {

@ -1,57 +1,56 @@
label.toggle-label Toggle Post Actions details.toggle-label
input.toggle(type='checkbox') summary Show Post Actions
.action-wrapper.togglable .actions
.actions h4.no-m-p Actions:
h4.no-m-p Actions: label
label input.post-check(type='checkbox', name='delete' value=1)
input.post-check(type='checkbox', name='delete' value=1) | Delete
| Delete label
label input.post-check(type='checkbox', name='delete_file' value=1)
input.post-check(type='checkbox', name='delete_file' value=1) | Delete File Only
| Delete File Only label
label input.post-check(type='checkbox', name='spoiler' value=1)
input.post-check(type='checkbox', name='spoiler' value=1) | Spoiler Images
| Spoiler Images label
label input#password(type='text', name='password', placeholder='post password' autocomplete='off')
input#password(type='text', name='password', placeholder='post password' autocomplete='off') label
label input.post-check(type='checkbox', name='report' value=1)
input.post-check(type='checkbox', name='report' value=1) | Report
| Report label
label input.post-check(type='checkbox', name='global_report' value=1)
input.post-check(type='checkbox', name='global_report' value=1) | Global Report
| Global Report label
label input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off')
input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off') .actions
.actions h4.no-m-p Mod Actions:
h4.no-m-p Mod Actions: label
label input.post-check(type='checkbox', name='delete_ip_board' value=1)
input.post-check(type='checkbox', name='delete_ip_board' value=1) | Delete from IP on board
| Delete from IP on board label
label input.post-check(type='checkbox', name='delete_ip_global' value=1)
input.post-check(type='checkbox', name='delete_ip_global' value=1) | Delete from IP globally
| Delete from IP globally label
label input.post-check(type='checkbox', name='sticky' value=1)
input.post-check(type='checkbox', name='sticky' value=1) | Sticky
| Sticky label
label input.post-check(type='checkbox', name='lock' value=1)
input.post-check(type='checkbox', name='lock' value=1) | Lock
| Lock label
label input.post-check(type='checkbox', name='sage' value=1)
input.post-check(type='checkbox', name='sage' value=1) | Sage
| Sage label
label input.post-check(type='checkbox', name='ban' value=1)
input.post-check(type='checkbox', name='ban' value=1) | Ban Poster
| Ban Poster label
label input.post-check(type='checkbox', name='global_ban' value=1)
input.post-check(type='checkbox', name='global_ban' value=1) | Global Ban Poster
| Global Ban Poster label
label input.post-check(type='checkbox', name='preserve_post' value=1)
input.post-check(type='checkbox', name='preserve_post' value=1) | Show Post In Ban
| Show Post In Ban label
label input#report(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off')
input#report(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off') .actions
.actions h4.no-m-p Captcha:
h4.no-m-p Captcha: img.captcha(src='/captcha' width=200 height=80)
img.captcha(src='/captcha' width=200 height=80) input#captcha(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6')
input#captcha(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6') input(type='submit', value='submit')
input(type='submit', value='submit')

@ -1,32 +1,30 @@
label.toggle-label Toggle Post Actions details.toggle-label
input.toggle(type='checkbox') summary Show Post Actions
.action-wrapper.togglable .actions
.actions h4.no-m-p Actions:
h4.no-m-p Actions: label
label input.post-check(type='checkbox', name='delete' value=1)
input.post-check(type='checkbox', name='delete' value=1) | Delete
| Delete label
label input.post-check(type='checkbox', name='delete_file' value=1)
input.post-check(type='checkbox', name='delete_file' value=1) | Delete File Only
| Delete File Only label
label input.post-check(type='checkbox', name='spoiler' value=1)
input.post-check(type='checkbox', name='spoiler' value=1) | Spoiler Images
| Spoiler Images label
label input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off')
input#report(type='text', name='report_reason', placeholder='report reason' autocomplete='off') label
label input.post-check(type='checkbox', name='delete_ip_global' value=1)
input.post-check(type='checkbox', name='delete_ip_global' value=1) | Delete from IP globally
| Delete from IP globally label
label input.post-check(type='checkbox', name='global_dismiss' value=1)
input.post-check(type='checkbox', name='global_dismiss' value=1) | Dismiss Global Reports
| Dismiss Global Reports label
label input.post-check(type='checkbox', name='global_ban' value=1)
input.post-check(type='checkbox', name='global_ban' value=1) | Global Ban Poster
| Global Ban Poster label
label input.post-check(type='checkbox', name='preserve_post' value=1)
input.post-check(type='checkbox', name='preserve_post' value=1) | Show Post In Ban
| Show Post In Ban label
label input#ban_reason(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off')
input#ban_reason(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off') input(type='submit', value='submit')
input(type='submit', value='submit')

@ -1,36 +1,35 @@
label.toggle-label Toggle Post Actions details.toggle-label
input.toggle(type='checkbox') summary Show Post Actions
.action-wrapper.togglable .actions
.actions h4.no-m-p Actions:
h4.no-m-p Actions: label
label input.post-check(type='checkbox', name='delete' value=1)
input.post-check(type='checkbox', name='delete' value=1) | Delete
| Delete label
label input.post-check(type='checkbox', name='delete_file' value=1)
input.post-check(type='checkbox', name='delete_file' value=1) | Delete File Only
| Delete File Only label
label input.post-check(type='checkbox', name='spoiler' value=1)
input.post-check(type='checkbox', name='spoiler' value=1) | Spoiler Images
| Spoiler Images label
label input.post-check(type='checkbox', name='delete_ip_board' value=1)
input.post-check(type='checkbox', name='delete_ip_board' value=1) | Delete from IP on board
| Delete from IP on board label
label input.post-check(type='checkbox', name='delete_ip_global' value=1)
input.post-check(type='checkbox', name='delete_ip_global' value=1) | Delete from IP globally
| Delete from IP globally label
label input.post-check(type='checkbox', name='dismiss' value=1)
input.post-check(type='checkbox', name='dismiss' value=1) | Dismiss Reports
| Dismiss Reports label
label input.post-check(type='checkbox', name='ban' value=1)
input.post-check(type='checkbox', name='ban' value=1) | Ban Poster
| Ban Poster label
label input.post-check(type='checkbox', name='global_ban' value=1)
input.post-check(type='checkbox', name='global_ban' value=1) | Global Ban Poster
| Global Ban Poster label
label input.post-check(type='checkbox', name='preserve_post' value=1)
input.post-check(type='checkbox', name='preserve_post' value=1) | Show Post In Ban
| Show Post In Ban label
label input#ban_reason(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off')
input#ban_reason(type='text', name='ban_reason', placeholder='ban reason' autocomplete='off') input(type='submit', value='submit')
input(type='submit', value='submit')

@ -1,46 +1,46 @@
section.form-wrapper.flex-center.mv-10 section.form-wrapper.flex-center.mv-10
form.form-post(action=`/forms/board/${board._id}/post`, enctype='multipart/form-data', method='POST') details.toggle-label
//input(type='hidden' name='_csrf' value=csrf) summary Show Post Form
input(type='hidden' name='thread' value=thread != null ? thread.postId : null) form.form-post(action=`/forms/board/${board._id}/post`, enctype='multipart/form-data', method='POST')
unless board.settings.forceAnon //input(type='hidden' name='_csrf' value=csrf)
section.postform-row input(type='hidden' name='thread' value=thread != null ? thread.postId : null)
.postform-label Name unless board.settings.forceAnon
input#name(type='text', name='name', placeholder=board.defaultName autocomplete='off' maxlength='50') section.postform-row
section.postform-row .postform-label Name
.postform-label Subject input#name(type='text', name='name', placeholder=board.defaultName autocomplete='off' maxlength='50')
input#title(type='text', name='subject', autocomplete='off' maxlength='50')
section.postform-row
.postform-label Email
input#name(type='text', name='email', autocomplete='off' maxlength='50')
else
section.postform-row
.postform-label Sage
label.postform-style.ph-5
input#spoiler(type='checkbox', name='email', value='sage')
| Sage
if !thread
section.postform-row section.postform-row
.postform-label Subject .postform-label Subject
input#title(type='text', name='subject', autocomplete='off' maxlength='50') input#title(type='text', name='subject', autocomplete='off' maxlength='50')
section.postform-row section.postform-row
.postform-label Message .postform-label Email
textarea#message(name='message', rows='5', autocomplete='off' maxlength='2000') input#name(type='text', name='email', autocomplete='off' maxlength='50')
if board.settings.maxFiles !== 0 else
section.postform-row
.postform-label Sage
label.postform-style.ph-5
input#spoiler(type='checkbox', name='email', value='sage')
| Sage
if !thread
section.postform-row
.postform-label Subject
input#title(type='text', name='subject', autocomplete='off' maxlength='50')
section.postform-row
.postform-label Message
textarea#message(name='message', rows='5', autocomplete='off' maxlength='2000')
if board.settings.maxFiles !== 0
section.postform-row
.postform-label Files
input#file(type='file', name='file' multiple='multiple')
label.postform-style.ph-5.ml-1
input#spoiler(type='checkbox', name='spoiler', value='true')
| Spoiler
section.postform-row
.postform-label Password
input#password(type='password', name='password', autocomplete='off' placeholder='password for deleting post later' maxlength='50')
section.postform-row section.postform-row
.postform-label Files .postform-label Captcha
input#file(type='file', name='file' multiple='multiple') .postform-col
label.postform-style.ph-5.ml-1 img.captcha(src='/captcha' width=200 height=80)
input#spoiler(type='checkbox', name='spoiler', value='true') input#captcha(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6')
| Spoiler input(type='submit', value=`New ${threads ? 'Thread' : 'Reply'}`)
section.postform-row //.mode Posting mode: #{threads ? 'Thread' : 'Reply'}
.postform-label Password
input#password(type='password', name='password', autocomplete='off' placeholder='password for deleting post later' maxlength='50')
section.postform-row
.postform-label Captcha
.postform-col
img.captcha(src='/captcha' width=200 height=80)
input#captcha(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6')
if !thread
input(type='submit', value='New Thread')
else
input(type='submit', value='Reply')

@ -7,7 +7,6 @@ block head
block content block content
include ../includes/boardheader.pug include ../includes/boardheader.pug
include ../includes/postform.pug include ../includes/postform.pug
.mode Posting mode: Thread
nav.pages#top nav.pages#top
include ../includes/pages.pug include ../includes/pages.pug
a(href='#bottom') [Bottom] a(href='#bottom') [Bottom]
@ -26,6 +25,7 @@ block content
+post(post, true) +post(post, true)
hr(size=1) hr(size=1)
nav.pages#bottom nav.pages#bottom
include ../includes/pages.pug
a(href='#top') [Top] a(href='#top') [Top]
| |
a(href=`/${board._id}/catalog.html`) [Catalog] a(href=`/${board._id}/catalog.html`) [Catalog]

@ -12,7 +12,6 @@ block head
block content block content
include ../includes/boardheader.pug include ../includes/boardheader.pug
include ../includes/postform.pug include ../includes/postform.pug
.mode Posting mode: Reply
nav.pages#top nav.pages#top
a(href='#bottom') [Bottom] a(href='#bottom') [Bottom]
| |

Loading…
Cancel
Save