Merge pull request #1317 from jgillich/no-posts

Show "Write a new Post" message when there are no posts
This commit is contained in:
Hannah Wolfe 2013-11-11 14:35:56 -08:00
commit 256cd6ecd0
2 changed files with 38 additions and 0 deletions

View File

@ -250,4 +250,34 @@
}//.preview-post
.no-posts-box {
position: relative;
height: 90%;
margin: 0px auto;
padding: 0px;
display: table;
z-index: 600;
@include breakpoint($tablet) {
position: fixed;
top: 45%;
left: 50%;
}
.no-posts {
vertical-align: middle;
display: table-cell;
text-align: center;
@include breakpoint($tablet) {
display: block;
position: relative;
left: -50%;
}
h3 {
color: $brown;
font-weight: 200;
font-size: 2em;
}
}
}//.no-posts-box
}//.manage

View File

@ -42,3 +42,11 @@
<section class="content-preview-content">
<div class="wrapper"><h1>{{{title}}}</h1>{{{html}}}</div>
</section>
{{#unless title}}
<div class="no-posts-box">
<div class="no-posts">
<h3>You Haven't Written Any Posts Yet!</h3>
<form action="/ghost/editor/"><button class="button-add large" title="New Post">Write a new Post</button></form>
</div>
</div>
{{/unless}}