remove useless semantics elements

merge-requests/208/head
fatchan 5 years ago
parent 503900594a
commit f3a203fba9
  1. 13
      gulp/res/css/style.css
  2. 12
      helpers/timeutils.js
  3. 2
      views/mixins/ban.pug
  4. 2
      views/mixins/boardheader.pug
  5. 6
      views/mixins/catalogtile.pug
  6. 4
      views/mixins/post.pug
  7. 6
      views/pages/ban.pug
  8. 6
      views/pages/banners.pug
  9. 2
      views/pages/board.pug
  10. 12
      views/pages/boardlist.pug
  11. 2
      views/pages/catalog.pug
  12. 12
      views/pages/changepassword.pug
  13. 12
      views/pages/create.pug
  14. 12
      views/pages/globalmanageaccounts.pug
  15. 2
      views/pages/globalmanagebans.pug
  16. 8
      views/pages/globalmanagenews.pug
  17. 2
      views/pages/globalmanagerecent.pug
  18. 2
      views/pages/globalmanagereports.pug
  19. 6
      views/pages/login.pug
  20. 14
      views/pages/manage.pug
  21. 6
      views/pages/managebanners.pug
  22. 2
      views/pages/managebans.pug
  23. 2
      views/pages/managereports.pug
  24. 6
      views/pages/managesettings.pug
  25. 10
      views/pages/register.pug
  26. 2
      views/pages/thread.pug

@ -483,7 +483,6 @@ details.actions div {
.user-id {
text-shadow: #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px;
background: attr(data-user-id);
color: white;
padding: 0px 2px;
border: 1px solid rgba(0, 0, 0, 0.4);
@ -492,7 +491,7 @@ details.actions div {
.post-check {
position: relative;
top: 3px;
top: 2px;
margin: -3px 1px !important;
}
@ -800,7 +799,11 @@ hr + .thread {
}
table.boardtable th:nth-child(6) {
min-width: 130px;
min-width: 100px;
}
table.boardtable td:nth-child(6) {
text-shadow: #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px;
color: white;
}
@media only screen and (max-width: 700px) {
@ -838,7 +841,7 @@ table.boardtable th:nth-child(6) {
width: 30px;
}
input, .postform-style {
input[type="number"], input[type="text"], input[type="submit"], input[type="password"], input[type="file"], .postform-style {
height: 30px;
box-sizing: border-box;
}
@ -858,7 +861,7 @@ table.boardtable th:nth-child(6) {
.post-check {
top: 1px;
margin-left: 2px!important;
height: 8px;
/*height: 8px;*/
}
.pages {

@ -21,27 +21,33 @@ module.exports = {
const difference = currentTime.getTime() - eventTime.getTime();
let amount = 0;
let ret = '';
let color;
if (difference < MINUTE) {
return 'Now';
return { color: '#39d6bc', text:'Now' };
} else if (difference < HOUR) {
amount = Math.floor(difference / MINUTE);
color = '#008000';
ret += `${amount} minute`
} else if (difference < DAY) {
amount = Math.floor(difference / HOUR);
color = '#84c100';
ret += `${amount} hour`
} else if (difference < WEEK) {
amount = Math.floor(difference / DAY);
color = '#fffd00';
ret += `${amount} day`;
} else if (difference < MONTH) {
amount = Math.floor(difference / WEEK);
color = '#ff6700';
ret += `${amount} week`;
} else if (difference < YEAR) {
amount = Math.floor(difference / MONTH);
color = '#ff0000';
ret += `${amount} month`;
} else {
return 'More than a year ago';
return { color: '#ff000047', text: 'More than a year ago' };
}
return `${ret}${amount > 1 ? 's' : ''} ago`;
return { color, text: `${ret}${amount > 1 ? 's' : ''} ago` };
}
};

@ -17,7 +17,7 @@ mixin ban(ban, banpage)
td.banposts
if ban.posts && ban.posts.length > 0
| Hover to view
section.thread
.thread
each p in ban.posts
+post(p, false, false, false, true)
else

@ -1,5 +1,5 @@
mixin boardheader(pagename)
section.board-header
.board-header
img.board-banner(src=`/randombanner?board=${board._id}` width='300' height='100')
br
if pagename

@ -1,10 +1,10 @@
mixin catalogtile(board, post, index)
article(class='catalog-tile')
.catalog-tile
- const postURL = `/${board._id}/thread/${post.postId}.html#${post.postId}`
header.post-info
.post-info
include ../includes/postmods.pug
a.no-decoration.post-subject(href=postURL) #{post.subject || 'No subject'}
| -
br
span(title='Replies') R: #{post.replyposts}
| /
span(title='Files') F: #{post.replyfiles}

@ -1,9 +1,9 @@
include ./report.pug
mixin post(post, truncate, manage=false, globalmanage=false, ban=false)
.anchor(id=post.postId)
article(class=`post-container ${post.thread || ban === true ? '' : 'op'}`)
div(class=`post-container ${post.thread || ban === true ? '' : 'op'}`)
- const postURL = `/${post.board}/thread/${post.thread || post.postId}.html`;
header.post-info
.post-info
label
if globalmanage
input.post-check(type='checkbox', name='globalcheckedposts' value=post._id)

@ -15,12 +15,12 @@ block content
+ban(ban, true)
if allowAppeal === true
h4.no-m-p Appeal bans:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
input(type='hidden' name='_csrf' value=csrf)
section.row
.row
.label Message
textarea(rows='5' name='message' required)
section.row
.row
.label Captcha
span.col
include ../includes/captcha.pug

@ -10,16 +10,16 @@ block content
+boardheader('Banners')
br
include ../includes/stickynav.pug
nav.pages
.pages
+boardnav('banners', true, false)
hr(size=1)
if board.banners.length > 0
section.catalog
.catalog
each banner in board.banners
img.board-banner(src=`/banner/${board._id}/${banner}` width='300' height='100')
else
p Board has no custom banners.
include ../includes/stickynav.pug
hr(size=1)
nav.pages
.pages
+boardnav('banners', true, false)

@ -23,7 +23,7 @@ block content
p No posts.
hr(size=1)
for thread in threads
section.thread
.thread
+post(thread, true)
for post in thread.replies
+post(post, true)

@ -6,7 +6,7 @@ block head
block content
h1.board-title Board List
section.flexcenter.mv-10
.flexcenter.mv-10
form.form-post(action=`/boards.html` method='GET')
input(type='hidden' value=page)
.row
@ -37,7 +37,10 @@ block content
td #{board.pph}
td #{board.ips}
td #{board.sequence_value-1}
td #{board.lastPostTimestamp || '-'}
if board.lastPostTimestamp
td(style=`background-color: ${board.lastPostTimestamp.color}`) #{board.lastPostTimestamp.text}
else
td -
if webringBoards && webringBoards.length > 0
h4.board-description Webring Boards
include ../includes/webringboardtable.pug
@ -52,6 +55,9 @@ block content
td #{board.postsPerHour}
td #{board.uniqueUsers}
td #{board.totalPosts}
td #{board.lastPostTimestamp || '-'}
if board.lastPostTimestamp
td(style=`background-color: ${board.lastPostTimestamp.color}`) #{board.lastPostTimestamp.text}
else
td -
nav.pages.text-center.mt-5.mv-0
include ../includes/boardlistpages.pug

@ -17,7 +17,7 @@ block content
if threads.length === 0
p No posts.
else
section.catalog
.catalog
for thread, i in threads
+catalogtile(board, thread, i+1)
hr(size=1)

@ -7,21 +7,21 @@ block head
block content
h1.board-title Change Password
section.form-wrapper.flex-center.mv-10
.form-wrapper.flex-center.mv-10
form.form-post(action='/forms/changepassword' method='POST')
section.row
.row
.label Username
input(type='text', name='username', maxlength='50' required)
section.row
.row
.label Existing Password
input(type='password', name='password', maxlength='100' required)
section.row
.row
.label New Password
input(type='password', name='newpassword', maxlength='100' required)
section.row
.row
.label Confirm New Password
input(type='password', name='newpasswordconfirm', maxlength='100' required)
section.row
.row
.label Captcha
span.col
include ../includes/captcha.pug

@ -7,21 +7,21 @@ block head
block content
h1.board-title Create Board
section.form-wrapper.flex-center.mv-10
.form-wrapper.flex-center.mv-10
form.form-post(action='/forms/create' method='POST')
section.row
.row
.label URI e.g. /uri/
input(type='text', name='uri', maxlength='50' pattern='[a-zA-Z0-9]+' required title='alphanumeric only')
section.row
.row
.label Name
input(type='text', name='name', maxlength='50' required)
section.row
.row
.label Description
input(type='text', name='description', maxlength='50' required)
section.row
.row
.label Tags
textarea(name='tags' placeholder='newline separated, max 10')
section.row
.row
.label Captcha
span.col
include ../includes/captcha.pug

@ -11,20 +11,20 @@ block content
+globalmanagenav('accounts')
hr(size=1)
h4.no-m-p Delete board:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/deleteboard`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
.row
.label I'm sure
label.postform-style.ph-5
input(type='checkbox', name='confirm', value='true' required)
section.row
.row
.label Board URI
input(type='text' name='uri' required)
input(type='submit', value='submit')
hr(size-1)
h4.no-m-p Accounts:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/editaccounts` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
.table-container.flex-left.mv-10
@ -38,11 +38,11 @@ block content
td: input(type='checkbox', name='checkedaccounts' value=account._id)
td #{account._id}
td #{account.authLevel}
section.row
.row
.label Delete Accounts
label.postform-style.ph-5
input(type='checkbox', name='delete_account', value='true')
section.row
.row
.label Set Auth Level
input(type='number' name='auth_level')
input(type='submit', value='apply')

@ -20,5 +20,5 @@ block content
include ../includes/bantable.pug
for ban in bans
+ban(ban)
section.action-wrapper
.action-wrapper
input(type='submit', value='unban')

@ -12,20 +12,20 @@ block content
+globalmanagenav('news')
hr(size=1)
h4.no-m-p Add News:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/addnews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
.row
.label Title
input(type='text' name='title' required)
section.row
.row
.label Message
textarea(name='message' rows='10' placeholder='supports post styling' required)
input(type='submit', value='submit')
if news.length > 0
hr(size=1)
h4.no-m-p Delete News:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/global/deletenews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
each post in news

@ -18,7 +18,7 @@ block content
p No posts.
else
for p in posts
section.thread
.thread
+post(p, false, false, true)
hr(size=1)
include ../includes/actionfooter_globalmanage.pug

@ -18,7 +18,7 @@ block content
p No reports.
else
for report in reports
section.thread
.thread
+post(report, false, false, true)
hr(size=1)
include ../includes/actionfooter_globalmanage.pug

@ -6,13 +6,13 @@ block head
block content
h1.board-title Login
section.form-wrapper.flex-center.mv-10
.form-wrapper.flex-center.mv-10
form.form-post(action='/forms/login' method='POST')
input(type='hidden' name='goto' value=goto)
section.row
.row
.label Username
input(type='text', name='username', maxlength='50' required)
section.row
.row
.label Password
input(type='password', name='password', maxlength='100' required)
input(type='submit', value='submit')

@ -1,14 +0,0 @@
extends ../layout.pug
include ../mixins/managenav.pug
include ../mixins/boardheader.pug
block head
script(src='/js/all.js')
title /#{board._id}/ - Manage
block content
+boardheader('Manage')
br
+managenav('main')
hr(size=1)
p Welcome to the management page. #[a(href=`/{board._id}/index.html`) Return]

@ -12,10 +12,10 @@ block content
+managenav('banners')
hr(size=1)
h4.no-m-p Add Banners:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/addbanners`, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf)
section.row
.row
.label Upload
.required *
input#file(type='file', name='file' multiple required)
@ -23,7 +23,7 @@ block content
if board.banners.length > 0
hr(size=1)
h4.no-m-p Delete Banners:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/deletebanners`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
each banner in board.banners

@ -23,6 +23,6 @@ block content
include ../includes/bantable.pug
for ban in bans
+ban(ban)
section.action-wrapper
.action-wrapper
input(type='submit', value='unban')

@ -20,7 +20,7 @@ block content
p No reports.
else
for report in reports
section.thread
.thread
+post(report, false, true)
hr(size=1)
include ../includes/actionfooter_manage.pug

@ -14,7 +14,7 @@ block content
+managenav('settings')
hr(size=1)
h4.no-m-p Transfer ownership:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/transfer`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
.row
@ -23,7 +23,7 @@ block content
input(type='submit', value='submit')
hr(size=1)
h4.no-m-p Delete board:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-10
form.form-post(action=`/forms/board/${board._id}/deleteboard`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
.row
@ -36,7 +36,7 @@ block content
input(type='submit', value='submit')
hr(size=1)
h4.no-m-p Settings:
section.form-wrapper.flexleft.mt-10
.form-wrapper.flexleft.mt-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)
.row

@ -7,18 +7,18 @@ block head
block content
h1.board-title Register
section.form-wrapper.flex-center.mv-10
.form-wrapper.flex-center.mv-10
form.form-post(action='/forms/register' method='POST')
section.row
.row
.label Username
input(type='text', name='username', maxlength='50' pattern='[a-zA-Z0-9]+' required title='alphanumeric only')
section.row
.row
.label Password
input(type='password', name='password', maxlength='100' required)
section.row
.row
.label Confirm Password
input(type='password', name='passwordconfirm', maxlength='100' required)
section.row
.row
.label Captcha
span.col
include ../includes/captcha.pug

@ -29,7 +29,7 @@ block content
+boardnav(null, true, true)
form(action=`/forms/board/${board._id}/actions` method='POST' enctype='application/x-www-form-urlencoded')
hr(size=1)
section.thread
.thread
+post(thread)
for post in thread.replies
+post(post)

Loading…
Cancel
Save