Merge pull request #1704 from ErisDS/featured-star

Markup & style fixes for post list statuses
This commit is contained in:
Hannah Wolfe 2013-12-21 12:37:39 -08:00
commit 007aec2e07
4 changed files with 18 additions and 16 deletions

View File

@ -95,13 +95,21 @@
} }
} }
.featured .date { .featured .status {
@include icon($i-featured, 11px) { @include icon($i-featured, 11px) {
margin-right:12px; margin-right: 10px;
vertical-align: 0; vertical-align: 7%;
}; };
} }
.status .draft {
color: $red;
}
.status .scheduled {
color: $orange;
}
ol { ol {
list-style: none; list-style: none;
padding:0; padding:0;

View File

@ -1678,11 +1678,3 @@ main {
} }
} }
.status-draft {
color: $red;
}
.status-scheduled {
color: $orange;
}

View File

@ -1,16 +1,18 @@
<a class="permalink{{#if featured}} featured{{/if}}{{#if page}} page{{/if}}" href="#" title="Edit this post"> <a class="permalink{{#if featured}} featured{{/if}}{{#if page}} page{{/if}}" href="#" title="Edit this post">
<h3 class="entry-title">{{{title}}}</h3> <h3 class="entry-title">{{{title}}}</h3>
<section class="entry-meta"> <section class="entry-meta">
<span class="status">
{{#if published}} {{#if published}}
{{#if page}} {{#if page}}
<span class="page">Page</span> <span class="page">Page</span>
{{else}} {{else}}
<time datetime="{{date published_at format="YYYY-MM-DD hh:mm"}}" class="date"> <time datetime="{{date published_at format="YYYY-MM-DD hh:mm"}}" class="date published">
Published {{date published_at timeago="True"}} Published {{date published_at timeago="True"}}
</time> </time>
{{/if}} {{/if}}
{{else}} {{else}}
<span class="status-draft">Draft</span> <span class="draft">Draft</span>
{{/if}} {{/if}}
</span>
</section> </section>
</a> </a>

View File

@ -138,7 +138,7 @@
initialize: function () { initialize: function () {
this.listenTo(Backbone, 'blog:activeItem', this.checkActive); this.listenTo(Backbone, 'blog:activeItem', this.checkActive);
this.listenTo(this.model, 'change:page', this.render); this.listenTo(this.model, 'change:page change:featured', this.render);
this.listenTo(this.model, 'destroy', this.removeItem); this.listenTo(this.model, 'destroy', this.removeItem);
}, },