You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fipamo/themes/dash/entries-index.pug

30 lines
1.3 KiB
Plaintext

extends frame
block main-content
#entries-index
#entries-index-wrapper
h2 Entries
#entries-list
- var index = 0;
- for ( index; index < items.length; index++)
- var date = new Date(items[index].created_at)
a.entry-list-link(href="/@/dashboard/entries/edit/"+items[index].slug id=items[index].uuid)
= items[index].title
br
span= date.getFullYear()+"-"+date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()
- 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/entries/"+prev)
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/entries/"+next)
svg(viewBox="0 0 20 20" class="icons")
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')