superior styling

merge-requests/208/head
fatchan 5 years ago
parent 2a658e7098
commit a17732d137
  1. 63
      static/css/style.css
  2. 37
      views/includes/postform.pug
  3. 45
      views/mixins/post.pug
  4. 14
      views/pages/board.pug

@ -13,22 +13,45 @@ span {
margin-right: 5px; margin-right: 5px;
} }
section {
display: flex;
flex-direction: column;
align-items: flex-start;
}
input, textarea { input, textarea {
display: block; display: flex;
display: flex;
font-family: arial, helvetica, sans-serif; font-family: arial, helvetica, sans-serif;
font-size: 10pt; font-size: 10pt;
border-radius: 3px; border-radius: 3px;
max-width:100%; max-width:100%;
} }
.form-post-wrapper {
align-items: center;
}
.form-post {
display: flex;
flex-direction: column;
max-width: 100%;
}
.post-check { .post-check {
vertical-align: sub; position: relative;
top: 3px;
display: inline-block; display: inline-block;
} }
.post-file { .post-file {
vertical-align: top; display: inline-flex;
display: inline-block; flex-direction: column;
margin: 5px;
}
.post-file-info {
margin: 2px;
} }
input textares { input textares {
@ -36,24 +59,29 @@ input textares {
} }
.container { .container {
margin: 5px; padding: 35px 10px;
margin-top: 57px;
} }
.board-title { .board-title {
color: #AF0A0F; color: #af0a0f;
font-size: 20pt; font: bolder 28px Tahoma;
font-weight: bold;
font-family: tahoma;
letter-spacing: -2px; letter-spacing: -2px;
text-align: center;
margin-bottom: 0;
}
.board-description {
text-align:center;
margin-top: 0;
} }
.post-container { .post-container {
margin-top: 5px; margin-top: 2px;
margin-left: 15px; padding: 3px;
padding: 5px;
background: #D6DAF0; background: #D6DAF0;
display: inline-block; display: flex;
flex-direction: column;
align-items: flex-start;
border-color: #B7C5D9; border-color: #B7C5D9;
border-width: 0 1px 1px 0; border-width: 0 1px 1px 0;
border-style: none solid solid none; border-style: none solid solid none;
@ -89,10 +117,8 @@ input textares {
} }
.navbar { .navbar {
border-bottom: 1px solid black; border-bottom: 1px solid gray;
margin: 0; margin: 0;
line-height: 50px;
height: 50px;
position: fixed; position: fixed;
width: 100%; width: 100%;
background: #eef2ff; background: #eef2ff;
@ -112,8 +138,7 @@ input textares {
} }
.footer { .footer {
line-height: 50px; border-top: 1px solid gray;
border-top: 1px solid black;
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
margin-top: auto; margin-top: auto;

@ -1,18 +1,19 @@
p make a post: section.form-post-wrapper
form.form-post(action='/api/board/'+board._id, enctype='multipart/form-data', method='POST') form.form-post(action='/api/board/'+board._id, enctype='multipart/form-data', method='POST')
input(type='hidden' name='_csrf' value=csrf) input(type='hidden' name='_csrf' value=csrf)
input(type='hidden' name='thread' value=thread != null ? thread._id : null) input(type='hidden' name='thread' value=thread != null ? thread._id : null)
input#title(type='text', name='subject', placeholder='subject' autocomplete='off') input#title(type='text', name='subject', placeholder='subject' autocomplete='off' maxlength='50')
input#name(type='text', name='name', placeholder='name' autocomplete='off') input#name(type='text', name='name', placeholder='name' autocomplete='off' maxlength='50')
input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off') input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off' maxlength='50')
textarea#messagey(name='message', rows='8', cols='50', placeholder='message' autocomplete='off') textarea#message(name='message', rows='8', cols='50', placeholder='message' autocomplete='off' maxlength='2000')
input#file(type='file', name='file' multiple) input#file(type='file', name='file' multiple)
input(type='submit', value='submit') input(type='submit', value='submit')

@ -1,27 +1,28 @@
mixin post(board, post) mixin post(board, post)
.post-wrapper article(class='post-container '+(post.thread ? '' : 'op'))
div(class='post-container '+(post.thread ? '' : 'op')) header.post-info
.post-info input.post-check(type='checkbox', name='checked[]' value=post._id)
input.post-check(type='checkbox', name='checked[]' value=post._id) if post.subject
span.post-subject #{post.subject} span.post-subject #{post.subject}
span.post-name #{post.name} span.post-name #{post.name}
span #{post.date.toLocaleString()} time #{post.date.toLocaleString()}
span No. span No.
if post.thread == null if post.thread == null
a(href=`/${board._id}/thread/${post._id}`) ##{post._id} a(href=`/${board._id}/thread/${post._id}`) ##{post._id}
else else
a(href=`/${board._id}/thread/${post.thread}#${post._id}`) ##{post._id} a(href=`/${board._id}/thread/${post.thread}#${post._id}`) ##{post._id}
if post.files.length > 0 if post.files.length > 0
.post-files .post-files
each file in post.files each file in post.files
.post-file .post-file
.post-file-info .post-file-info
span: a(href='/img/thumb-'+file.filename download=file.originalFilename) #{file.originalFilename} span: a(href='/img/thumb-'+file.filename download=file.originalFilename) #{file.originalFilename}
span ( Size: #{file.sizeString} br
span Dimensions: #{file.geometryString} ) span (#{file.sizeString} #{file.geometryString})
.post-file .post-file-src
a(href='/img/'+file.filename) a(href='/img/'+file.filename)
object(data='/img/thumb-'+file.filename type=file.mimetype) object(data='/img/thumb-'+file.filename type=file.mimetype)
if post.message
.post-message .post-message
p(style='white-space: pre-wrap;') #{post.message} p(style='white-space: pre-wrap;') #{post.message}

@ -5,16 +5,20 @@ block head
title /#{board._id}/ - Recent Posts title /#{board._id}/ - Recent Posts
block content block content
span #{board.name} - #{board.description} h1.board-title /#{board._id}/ - #{board.name}
hr(size=1) h4.board-description #{board.description}
include ../includes/postform.pug include ../includes/postform.pug
hr(size=1) hr(size=1)
form(action='/api/board/'+board._id+'/delete' method='POST' enctype='application/x-www-form-urlencoded') form(action='/api/board/'+board._id+'/delete' method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf) input(type='hidden' name='_csrf' value=csrf)
if threads.length === 0
p No posts.
hr(size=1)
for thread in threads for thread in threads
+post(board, thread) section.thread(id=thread._id)
for post in thread.replies +post(board, thread)
+post(board, post) for post in thread.replies
+post(board, post)
hr(size=1) hr(size=1)
input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off') input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off')
input(type='submit', value='delete') input(type='submit', value='delete')

Loading…
Cancel
Save