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 hr
12
13 if locals.flashes
14 - const categories = Object.keys(locals.flashes)
15 each category in categories
16 each message in flashes[category]
17 .staticFlash(class=`staticFlash--${category}`).center.m-v-lg.p-h-md.p-v-sm
18 | #{message}
19
20 .m-t-md
21 form(action=`${'/p/' + post.id + '/update'}` method='POST' autocomplete='off')
22 if (post.name)
23 .m-v-sm
24 input(
25 type='text' name='name' disabled=""
26 required='' maxlength='255'
27 autofocus='' placeholder='Title of the post'
28 value=`${post.name}`
29 ).input-border.p-sm.full-width.border-box.m-v-md
30 .m-v-sm
31 textarea(
32 name='content'
33 required='' minlength='8' rows="25"
34 autofocus='' placeholder='Write away!'
35 ).input-border.p-sm.full-width.border-box.textarea-v.m-v-md #{post.content}
36 .m-v-md
37 input(type='submit' value='Update').button.button-primary
38 a(href='javascript:history.back()').m-l-sm
39 input(type='button' value='Cancel').button.button-gray-inverted
40