fipamo/themes/dash/post-edit.pug

74 lines
3.3 KiB
Text
Raw Normal View History

extends frame
block main-content
-var post_title = ''
-var post_plaintext = ''
-var post_feature = 'null'
-var post_tags = ''
-var post_id = ''
-var post_date = date
-var post_status = ['false', 'false', 'false',]
if(edit)
-post_title = post.title
-post_plaintext = post.plaintext
-post_feature = feature
-post_tags = post.tags
-post_date = date
-post_status = status
#post-edit-index
#post-edit-index-wrapper
//h2 EDIT
=post_title
#post-feature
//label FEATURE IMAGE
if(post_feature == 'null')
#featured-image-drop
| DRAG AND DROP IMAGE OR
label(for="featured-click") CLICK TO CHOOSE
else
#featured-new-image-btn
button#new-upload-link
svg#new-upload-link(viewBox="0 0 20 20" class="icons")
use(xlink:href='/dash/assets/images/sprite.svg#entypo-image-inverted')
#featured-image-drop
img(src=post_feature)
#post-header.columns
#post-title.column
textarea(id="post_title" type='text', name='post_title' class='post-edit', placeholder='title', required, autofocus)
=post_title
label Date Posted
input(id="post-date" type="text" value=post_date)
#post-options
button#option-page.option-inactive.post-option-btn(data-active= status[0])
svg#option-page-icon(viewBox="0 0 20 20" class="icons")
use#option-page-icon(xlink:href='/dash/assets/images/sprite.svg#entypo-pin')
button#option-feature.option-inactive.post-option-btn(data-active= status[1])
svg#option-feature-icon(viewBox="0 0 20 20" class="icons")
use#option-feature-icon(xlink:href='/dash/assets/images/sprite.svg#entypo-star')
button#option-published.option-inactive.post-option-btn(data-active= status[2])
svg#option-published-icon(viewBox="0 0 20 20" class="icons")
use#option-published-icon(xlink:href='/dash/assets/images/sprite.svg#entypo-globe')
button#option-preview.option-inactive(data-active="false")
svg#option-preview-icon(viewBox="0 0 20 20" class="icons")
use#option-preview-icon(xlink:href='/dash/assets/images/sprite.svg#entypo-eye')
#post-meta.column
textarea(id='post_tags' type='text', name='post_tags' class='form-control', placeholder='tags [comma seperated]', autofocus)
=post_tags
include partials/editor
input(id="featured-click" type="file" name="featured-click")
input(id="post-image" type="file" name="post-image")
#edit-post
#edit-post-wrapper
pre
code#edit-post-text(contenteditable="true") !{colored}