started redesign of posts index

sql-version-freeze
Ro 6 years ago
parent 464f45136c
commit fb7e55369b

@ -61,9 +61,11 @@ router.get('/:page?', function(req, res)
{ {
title: 'Dashbord | Posts', title: 'Dashbord | Posts',
mode: 'admin', mode: 'admin',
welcome: "Your Posts",
items: pageItems, items: pageItems,
page_index: pageNum, page_index: pageNum,
page_count: count page_count: count,
user_status: true
}); });
}).then(function(value) }).then(function(value)
{ {

@ -2149,50 +2149,61 @@ select {
#post-index #post-index-wrapper { #post-index #post-index-wrapper {
padding: 0.75rem; padding: 0.75rem;
} }
#post-index #post-index-wrapper a { #post-index #post-index-wrapper #post-index-menu {
display: inline-block; color: #f2f1ef;
vertical-align: top; }
padding: 3px; #post-index #post-index-wrapper #post-index-menu a {
text-decoration-color: #fc6399;
} }
#post-index #post-index-wrapper a.add-new-post { #post-index #post-index-wrapper #post-index-menu a.add-new-post {
display: inline-block;
background: #fc6399; background: #fc6399;
border-radius: 3px; border-radius: 3px;
padding: 3px; padding: 3px;
color: #f2f1ef; color: #f2f1ef;
width: 115px;
text-align: center; text-align: center;
margin-bottom: 10px; margin-bottom: 10px;
} float: right;
#post-index #post-index-wrapper a.add-new-post svg {
display: inline-block;
vertical-align: top;
}
#post-index #post-index-wrapper a.add-new-post label {
padding: 5px;
}
#post-index #post-index-wrapper a.add-new-post span {
font-size: 0.8em;
color: #62809b;
}
#post-index #post-index-wrapper a.add-new-post:hover {
background: #344453;
} }
#post-index #post-index-wrapper #posts-list { #post-index #post-index-wrapper #posts-list {
color: #f2f1ef; margin: 20px 0 0 0;
} }
#post-index #post-index-wrapper #posts-list a.post-list-link { #post-index #post-index-wrapper #posts-list a.post-link {
background: #f2f1ef;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
padding: 3px; width: 100%;
width: 48%;
font-size: 1.2em;
text-decoration: none; text-decoration: none;
line-height: 0.8em;
margin: 0 0 20px 0; margin: 0 0 20px 0;
border-radius: 3px;
color: #161d23;
} }
#post-index #post-index-wrapper #posts-list a.post-list-link span { #post-index #post-index-wrapper #posts-list a.post-link label {
font-size: 0.7em; font-size: 1.3em;
font-weight: 500;
padding: 10px;
display: inline-block;
vertical-align: top;
width: 45%;
}
#post-index #post-index-wrapper #posts-list a.post-link span {
display: inline-block;
vertical-align: top;
font-size: 0.8em;
font-family: 'Apercu-Mono'; font-family: 'Apercu-Mono';
width: 50%;
text-align: right;
padding: 10px;
}
#post-index #post-index-wrapper #posts-list a.post-link div.post-bg {
width: 100%;
height: 350px;
background-color: #fc6399;
}
#post-index #post-index-wrapper #posts-list a.post-link p {
padding: 10px;
font-size: 1.2em;
font-weight: 400;
} }
#post-edit-index { #post-edit-index {
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

@ -9075,7 +9075,7 @@ var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') { if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = "" || location.hostname; var hostname = "" || location.hostname;
var protocol = location.protocol === 'https:' ? 'wss' : 'ws'; var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "64724" + '/'); var ws = new WebSocket(protocol + '://' + hostname + ':' + "49367" + '/');
ws.onmessage = function (event) { ws.onmessage = function (event) {
var data = JSON.parse(event.data); var data = JSON.parse(event.data);

@ -1,6 +1,5 @@
#dash-recent #dash-recent
#recent-list #recent-list
.recent-header .recent-header
h3 Recent h3 Recent
.index-menu .index-menu

@ -2,19 +2,25 @@ extends frame
block main-content block main-content
#post-index #post-index
#post-index-wrapper #post-index-wrapper
h2 Entries #post-index-menu
a.add-new-post(href="/@/dashboard/posts/add/new") a(href="#") All Posts
svg#new-upload-link(viewBox="0 0 20 20" class="icons") | .
use(xlink:href='/dash/assets/images/sprite.svg#entypo-plus') a(href="#") Live
| NEW POST | .
a(href="#") Pages
| .
a(href="#") Deleted
a.add-new-post(href="/@/dashboard/posts/add/new") + Create New Post
#posts-list #posts-list
- var index = 0; - var index = 0;
- for ( index; index < items.length; index++) - for ( index; index < items.length; index++)
- var date = new Date(items[index].post.created) a.post-link(href="/@/dashboard/posts/edit/"+items[index].post.uuid id=items[index].post.uuid)
a.post-list-link(href="/@/dashboard/posts/edit/"+items[index].post.uuid id=items[index].post.uuid) label= items[index].post.title
= items[index].post.title span= items[index].post.created
br div.post-bg(style="background: #fc6399 url("+items[index].post.feature.substr(8)+") no-repeat center center / cover")
span= date.getFullYear()+"-"+date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes() p= items[index].post.plaintext.substr(0, 200)+"..."
- var next = parseInt(page_index, 10) + 1 - var next = parseInt(page_index, 10) + 1
- var prev = parseInt(page_index, 10) - 1 - var prev = parseInt(page_index, 10) - 1
- if(next > page_count) next = 1 - if(next > page_count) next = 1

@ -5,51 +5,55 @@
#post-index-wrapper #post-index-wrapper
padding 0.75rem padding 0.75rem
#post-index-menu
a
display inline-block
vertical-align top
padding 3px
a.add-new-post
background $highlight
border-radius 3px
padding 3px
color $white color $white
width 115px a
text-align center text-decoration-color: $highlight
margin-bottom 10px a.add-new-post
svg
display inline-block display inline-block
vertical-align top background $highlight
border-radius 3px
label padding 3px
padding 5px color $white
text-align center
span margin-bottom 10px
font-size 0.8em float right
color $primary + 30%
&:hover
background $primary - 5%
#posts-list #posts-list
color $white margin 20px 0 0 0
a.post-link
a.post-list-link background $white
display inline-block display inline-block
vertical-align top vertical-align top
padding 3px width 100%
width 48%
font-size 1.2em
text-decoration none text-decoration none
line-height 0.8em
margin 0 0 20px 0 margin 0 0 20px 0
border-radius: 3px
color $primary - 60%
label
font-size 1.3em
font-weight: 500
padding 10px
display inline-block
vertical-align: top
width: 45%
span span
font-size 0.7em display inline-block
vertical-align: top
font-size 0.8em
font-family 'Apercu-Mono' font-family 'Apercu-Mono'
width: 50%
text-align: right
padding 10px
div.post-bg
width: 100%
height 350px
background-color: $highlight
p
padding 10px
font-size 1.2em
font-weight: 400
#post-edit-index #post-edit-index
width 100% width 100%

Loading…
Cancel
Save