mirror of https://gitgud.io/fatchan/jschan.git
parent
2a658e7098
commit
a17732d137
4 changed files with 95 additions and 64 deletions
@ -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} |
||||||
|
|
||||||
|
Loading…
Reference in new issue