litebb/views/new_post.pug

1extends layout 2 3include mixins/breadcrumb 4 5block content 6 +breadcrumb(breadcrumbData) 7 .card 8 .flex.flex-center 9 h2.aubergine.m-v-md #{title} 10 11 span.flex__grow 12 h3 13 small.gray in 14 | #{board.name} 15 hr 16 17 if locals.flashes 18 - const categories = Object.keys(locals.flashes) 19 each category in categories 20 each message in flashes[category] 21 .staticFlash(class=`staticFlash--${category}`).center.m-v-lg.p-h-md.p-v-sm 22 | #{message} 23 24 .m-t-md 25 form(action=`${'/b/' + board.id + '/new-post'}` method='post' autocomplete='off') 26 .m-v-sm 27 input( 28 type='text' name='name' 29 required='' maxlength='255' 30 autofocus='' placeholder='Title of the post' 31 value=`${(body && body.name) ? body.name : ''}` 32 ).input-border.p-sm.full-width.border-box.m-v-md 33 .m-v-sm 34 textarea( 35 name='content' 36 required='' minlength='8' rows="25" 37 autofocus='' placeholder='Write away!' 38 value=`${(body && body.content) ? body.content : ''}` 39 ).input-border.p-sm.full-width.border-box.textarea-v.m-v-md 40 .m-v-md 41 input(type='submit' value='Submit').button.button-primary 42 a(href='javascript:history.back()').m-l-sm 43 input(type='button' value='Cancel').button.button-gray-inverted 44