fipamo/themes/dash/posts-index.pug

40 lines
1.7 KiB
Text
Raw Normal View History

2018-10-31 17:00:31 +01:00
extends frame
block main-content
#post-index
#post-index-wrapper
2019-02-22 02:19:13 +01:00
#post-index-menu
a(href="#") All Posts
| .
a(href="#") Live
| .
a(href="#") Pages
| .
a(href="#") Deleted
a.add-new-post(href="/@/dashboard/posts/add/new") + Create New Post
#posts-list
2018-10-31 17:00:31 +01:00
- var index = 0;
- for ( index; index < items.length; index++)
2019-02-22 02:19:13 +01:00
a.post-link(href="/@/dashboard/posts/edit/"+items[index].post.uuid id=items[index].post.uuid)
label= items[index].post.title
span= items[index].post.created
div.post-bg(style="background: #fc6399 url("+items[index].post.feature.substr(8)+") no-repeat center center / cover")
p= items[index].post.plaintext.substr(0, 200)+"..."
2018-10-31 17:00:31 +01:00
- var next = parseInt(page_index, 10) + 1
- var prev = parseInt(page_index, 10) - 1
- if(next > page_count) next = 1
- if(prev <= 0) prev = page_count
br
a.page-btns(href="/@/dashboard/posts/"+prev)
2018-10-31 17:00:31 +01:00
svg(viewBox="0 0 20 20" class="icons")
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-left')
span.paginate= "PAGE "+page_index+" OF "+page_count
a.page-btns(href="/@/dashboard/posts/"+next)
2018-10-31 17:00:31 +01:00
svg(viewBox="0 0 20 20" class="icons")
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')