changed reference 'entry' to 'post'; implemented status states for posts (featured, page, published)
parent
e75b50d804
commit
625bab02e5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,61 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
if(edit)
|
|
||||||
-post_title = post.title
|
|
||||||
-post_plaintext = post.entry_plaintext
|
|
||||||
-post_feature = feature
|
|
||||||
-post_tags = post.tags
|
|
||||||
-post_date = date
|
|
||||||
|
|
||||||
#entries-edit-index
|
|
||||||
#entries-edit-index-wrapper
|
|
||||||
//h2 EDIT
|
|
||||||
=post_title
|
|
||||||
#entry-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)
|
|
||||||
#entry-header.columns
|
|
||||||
#entry-title.column
|
|
||||||
textarea(id="entry_title" type='text', name='entry_title' class='post-edit', placeholder='title', required, autofocus)
|
|
||||||
=post_title
|
|
||||||
label Date Posted
|
|
||||||
input(id="entry-date" type="text" value=post_date)
|
|
||||||
br
|
|
||||||
#entry-meta.column
|
|
||||||
textarea(id='entry_tags' type='text', name='entry_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-content
|
|
||||||
|
|
||||||
|
|
||||||
#edit-content-wrapper
|
|
||||||
pre
|
|
||||||
code#edit-text-code(contenteditable="true") !{colored}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,36 +1,36 @@
|
|||||||
#edit-control
|
#edit-control
|
||||||
button#option-bold.content-editor-btn-text.editor-button(title="bold")
|
button#edit-bold.content-editor-btn-text.editor-button(title="bold")
|
||||||
| B
|
| B
|
||||||
button#option-italic.content-editor-btn-text.editor-button(title="italics")
|
button#edit-italic.content-editor-btn-text.editor-button(title="italics")
|
||||||
| I
|
| I
|
||||||
button#option-strikethrough.content-editor-btn-text.editor-button(title="strikethrough")
|
button#edit-strikethrough.content-editor-btn-text.editor-button(title="strikethrough")
|
||||||
| S
|
| S
|
||||||
button#option-link.content-editor-btn-icon.editor-button(title="insert link")
|
button#edit-link.content-editor-btn-icon.editor-button(title="insert link")
|
||||||
svg#option-link(viewBox="0 0 20 20" class="icons")
|
svg#edit-link(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-link')
|
use(xlink:href='/dash/assets/images/sprite.svg#entypo-link')
|
||||||
button#option-header1.content-editor-btn-text.editor-button(title="header 1")
|
button#edit-header1.content-editor-btn-text.editor-button(title="header 1")
|
||||||
| H1
|
| H1
|
||||||
button#option-header2.content-editor-btn-text.editor-button(title="header 2")
|
button#edit-header2.content-editor-btn-text.editor-button(title="header 2")
|
||||||
| H2
|
| H2
|
||||||
button#option-header3.content-editor-btn-text.editor-button(title="header 3")
|
button#edit-header3.content-editor-btn-text.editor-button(title="header 3")
|
||||||
| H3
|
| H3
|
||||||
button#option-image.content-editor-btn-icon.editor-button(title='insert image')
|
button#edit-image.content-editor-btn-icon.editor-button(title='insert image')
|
||||||
svg#option-image(viewBox="0 0 20 20" class="icons")
|
svg#edit-image(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-image')
|
use#edit-image(xlink:href='/dash/assets/images/sprite.svg#entypo-image')
|
||||||
|
|
||||||
if(edit)
|
if(edit)
|
||||||
button#option-update.post-sumbit-btn.submit-start.editor-button(data-action='blog-update' data-id=post.id type='submit')
|
button#edit-update.post-sumbit-btn.submit-start.editor-button(data-action='blog-update' data-id=post.id type='submit')
|
||||||
svg#submit-update(viewBox="0 0 20 20" class="icons")
|
svg#submit-update(viewBox="0 0 20 20" class="icons")
|
||||||
use#submit-update(xlink:href='/dash/assets/images/sprite.svg#entypo-save' data-action='blog-update' data-id=post.id)
|
use#submit-update(xlink:href='/dash/assets/images/sprite.svg#entypo-save' data-action='blog-update' data-id=post.id)
|
||||||
svg#submit-good.icon-hide(viewBox="0 0 20 20" class="icons")
|
svg#submit-good.icon-hide(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-up')
|
use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-up')
|
||||||
svg#submit-error.icon-hide(viewBox="0 0 20 20" class="icons")
|
svg#submit-error.icon-hide(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-down')
|
use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-down')
|
||||||
button#option-delete.content-editor-btn-icon.editor-button.submit-delete(for="post-delete" title='delete post')
|
button#edit-delete.content-editor-btn-icon.editor-button.submit-delete(for="post-delete" title='delete post')
|
||||||
svg#option-delete(viewBox="0 0 20 20" class="icons")
|
svg#option-delete(viewBox="0 0 20 20" class="icons")
|
||||||
use#option-delete(xlink:href='/dash/assets/images/sprite.svg#entypo-cross')
|
use#option-delete(xlink:href='/dash/assets/images/sprite.svg#entypo-cross')
|
||||||
else
|
else
|
||||||
button#option-save.post-sumbit-btn.submit-start.editor-button(data-action='blog-add' type='submit')
|
button#edit-save.post-sumbit-btn.submit-start.editor-button(data-action='blog-add' type='submit')
|
||||||
svg#submit-save(viewBox="0 0 20 20" class="icons")
|
svg#submit-save(viewBox="0 0 20 20" class="icons")
|
||||||
use#submit-save(xlink:href='/dash/assets/images/sprite.svg#entypo-plus' data-action='blog-add')
|
use#submit-save(xlink:href='/dash/assets/images/sprite.svg#entypo-plus' data-action='blog-add')
|
||||||
|
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
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}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue