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: |
||||
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='thread' value=thread != null ? thread._id : null) |
||||
|
||||
input#title(type='text', name='subject', placeholder='subject' autocomplete='off') |
||||
|
||||
input#name(type='text', name='name', placeholder='name' autocomplete='off') |
||||
|
||||
input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off') |
||||
|
||||
textarea#messagey(name='message', rows='8', cols='50', placeholder='message' autocomplete='off') |
||||
|
||||
input#file(type='file', name='file' multiple) |
||||
|
||||
input(type='submit', value='submit') |
||||
section.form-post-wrapper |
||||
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='thread' value=thread != null ? thread._id : null) |
||||
|
||||
input#title(type='text', name='subject', placeholder='subject' autocomplete='off' maxlength='50') |
||||
|
||||
input#name(type='text', name='name', placeholder='name' autocomplete='off' maxlength='50') |
||||
|
||||
input#password(type='password', name='password', placeholder='password (for deletion)' autocomplete='off' maxlength='50') |
||||
|
||||
textarea#message(name='message', rows='8', cols='50', placeholder='message' autocomplete='off' maxlength='2000') |
||||
|
||||
input#file(type='file', name='file' multiple) |
||||
|
||||
input(type='submit', value='submit') |
||||
|
||||
|
@ -1,27 +1,28 @@ |
||||
mixin post(board, post) |
||||
.post-wrapper |
||||
div(class='post-container '+(post.thread ? '' : 'op')) |
||||
.post-info |
||||
input.post-check(type='checkbox', name='checked[]' value=post._id) |
||||
article(class='post-container '+(post.thread ? '' : 'op')) |
||||
header.post-info |
||||
input.post-check(type='checkbox', name='checked[]' value=post._id) |
||||
if post.subject |
||||
span.post-subject #{post.subject} |
||||
span.post-name #{post.name} |
||||
span #{post.date.toLocaleString()} |
||||
span No. |
||||
if post.thread == null |
||||
a(href=`/${board._id}/thread/${post._id}`) ##{post._id} |
||||
else |
||||
a(href=`/${board._id}/thread/${post.thread}#${post._id}`) ##{post._id} |
||||
if post.files.length > 0 |
||||
.post-files |
||||
each file in post.files |
||||
.post-file |
||||
.post-file-info |
||||
span: a(href='/img/thumb-'+file.filename download=file.originalFilename) #{file.originalFilename} |
||||
span ( Size: #{file.sizeString} |
||||
span Dimensions: #{file.geometryString} ) |
||||
.post-file |
||||
a(href='/img/'+file.filename) |
||||
object(data='/img/thumb-'+file.filename type=file.mimetype) |
||||
span.post-name #{post.name} |
||||
time #{post.date.toLocaleString()} |
||||
span No. |
||||
if post.thread == null |
||||
a(href=`/${board._id}/thread/${post._id}`) ##{post._id} |
||||
else |
||||
a(href=`/${board._id}/thread/${post.thread}#${post._id}`) ##{post._id} |
||||
if post.files.length > 0 |
||||
.post-files |
||||
each file in post.files |
||||
.post-file |
||||
.post-file-info |
||||
span: a(href='/img/thumb-'+file.filename download=file.originalFilename) #{file.originalFilename} |
||||
br |
||||
span (#{file.sizeString} #{file.geometryString}) |
||||
.post-file-src |
||||
a(href='/img/'+file.filename) |
||||
object(data='/img/thumb-'+file.filename type=file.mimetype) |
||||
if post.message |
||||
.post-message |
||||
p(style='white-space: pre-wrap;') #{post.message} |
||||
|
||||
|
Loading…
Reference in new issue