forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request TryGhost#2404 from hswolff/ember-scaffold-ui
Flesh out more of the Ember admin
- Loading branch information
Showing
34 changed files
with
568 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
var ApplicationController = Ember.Controller.extend({ | ||
isLogin: Ember.computed.equal('currentPath', 'login') | ||
isLoggedOut: Ember.computed.match('currentPath', /(signin|signup|forgotten|reset)/) | ||
}); | ||
|
||
export default ApplicationController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,135 @@ | ||
var posts = [ | ||
{ | ||
"id": 2, | ||
"id": 4, | ||
"uuid": "4dc16b9e-bf90-44c9-97c5-40a0a81e8297", | ||
"title": "This post is featured", | ||
"slug": "this-post-is-featured", | ||
"markdown": "Lorem **ipsum** dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.", | ||
"html": "<p>Lorem <strong>ipsum<\/strong> dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.<\/p>", | ||
"image": null, | ||
"featured": 1, | ||
"page": 0, | ||
"status": "published", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"author_id": 1, | ||
"created_at": "2014-02-15T23:27:08.000Z", | ||
"created_by": 1, | ||
"updated_at": "2014-02-15T23:27:08.000Z", | ||
"updated_by": 1, | ||
"published_at": "2014-02-15T23:27:08.000Z", | ||
"published_by": 1, | ||
"author": { | ||
"id": 1, | ||
"uuid": "ba9c67e4-8046-4b8c-9349-0eed3cca7529", | ||
"name": "Bill Murray", | ||
"slug": "manuel_mitasch", | ||
"email": "[email protected]", | ||
"image": null, | ||
"cover": null, | ||
"bio": null, | ||
"website": null, | ||
"location": null, | ||
"accessibility": null, | ||
"status": "active", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"created_at": "2014-02-15T20:02:25.000Z", | ||
"updated_at": "2014-02-15T20:02:25.000Z" | ||
}, | ||
"user": { | ||
"id": 1, | ||
"uuid": "ba9c67e4-8046-4b8c-9349-0eed3cca7529", | ||
"name": "manuel_mitasch", | ||
"slug": "manuel_mitasch", | ||
"email": "[email protected]", | ||
"image": null, | ||
"cover": null, | ||
"bio": null, | ||
"website": null, | ||
"location": null, | ||
"accessibility": null, | ||
"status": "active", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"created_at": "2014-02-15T20:02:25.000Z", | ||
"updated_at": "2014-02-15T20:02:25.000Z" | ||
}, | ||
"tags": [ | ||
|
||
] | ||
}, | ||
{ | ||
"id": 3, | ||
"uuid": "4dc16b9e-bf90-44c9-97c5-40a0a81e8297", | ||
"title": "Ghost Ember Demo Post", | ||
"slug": "ghost-ember-demo-post", | ||
"title": "Example page entry", | ||
"slug": "example-page-entry", | ||
"markdown": "Lorem **ipsum** dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.", | ||
"html": "<p>Lorem <strong>ipsum<\/strong> dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.<\/p>", | ||
"image": null, | ||
"featured": 0, | ||
"page": 1, | ||
"status": "published", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"author_id": 1, | ||
"created_at": "2014-02-15T23:27:08.000Z", | ||
"created_by": 1, | ||
"updated_at": "2014-02-15T23:27:08.000Z", | ||
"updated_by": 1, | ||
"published_at": null, | ||
"published_by": null, | ||
"author": { | ||
"id": 1, | ||
"uuid": "ba9c67e4-8046-4b8c-9349-0eed3cca7529", | ||
"name": "Slimer", | ||
"slug": "manuel_mitasch", | ||
"email": "[email protected]", | ||
"image": null, | ||
"cover": null, | ||
"bio": null, | ||
"website": null, | ||
"location": null, | ||
"accessibility": null, | ||
"status": "active", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"created_at": "2014-02-15T20:02:25.000Z", | ||
"updated_at": "2014-02-15T20:02:25.000Z" | ||
}, | ||
"user": { | ||
"id": 1, | ||
"uuid": "ba9c67e4-8046-4b8c-9349-0eed3cca7529", | ||
"name": "manuel_mitasch", | ||
"slug": "manuel_mitasch", | ||
"email": "[email protected]", | ||
"image": null, | ||
"cover": null, | ||
"bio": null, | ||
"website": null, | ||
"location": null, | ||
"accessibility": null, | ||
"status": "active", | ||
"language": "en_US", | ||
"meta_title": null, | ||
"meta_description": null, | ||
"created_at": "2014-02-15T20:02:25.000Z", | ||
"updated_at": "2014-02-15T20:02:25.000Z" | ||
}, | ||
"tags": [ | ||
|
||
] | ||
}, | ||
{ | ||
"id": 2, | ||
"uuid": "4dc1cb9e-bf90-44c9-97c5-40a8381e8297", | ||
"title": "Dummy draft post", | ||
"slug": "dummy-draft-post", | ||
"markdown": "Lorem **ipsum** dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.", | ||
"html": "<p>Lorem <strong>ipsum<\/strong> dolor sit amet, consectetur adipiscing elit. Fusce id felis nec est suscipit scelerisque vitae eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Sed pellentesque metus vel velit tincidunt aliquet. Nunc condimentum tempus convallis. Sed tincidunt, leo et congue blandit, lorem tortor imperdiet sapien, et porttitor turpis nisl sed tellus. In ultrices urna sit amet mauris suscipit adipiscing.<\/p>", | ||
"image": null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import count from 'ghost/utils/word-count'; | ||
|
||
var countWords = Ember.Handlebars.makeBoundHelper(function (markdown) { | ||
return count(markdown); | ||
return count(markdown || ''); | ||
}); | ||
|
||
export default countWords; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styleBody from 'ghost/mixins/style-body'; | ||
|
||
var ForgottenRoute = Ember.Route.extend(styleBody, { | ||
classNames: ['ghost-forgotten'] | ||
}); | ||
|
||
export default ForgottenRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styleBody from 'ghost/mixins/style-body'; | ||
import AuthenticatedRoute from 'ghost/routes/authenticated'; | ||
|
||
var NewRoute = AuthenticatedRoute.extend(styleBody, { | ||
classNames: ['editor'], | ||
|
||
renderTemplate: function () { | ||
this.render('editor'); | ||
} | ||
}); | ||
|
||
export default NewRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styleBody from 'ghost/mixins/style-body'; | ||
|
||
var ResetRoute = Ember.Route.extend(styleBody, { | ||
classNames: ['ghost-reset'] | ||
}); | ||
|
||
export default ResetRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import styleBody from 'ghost/mixins/style-body'; | ||
import AuthenticatedRoute from 'ghost/routes/authenticated'; | ||
|
||
var SettingsRoute = AuthenticatedRoute.extend(styleBody, { | ||
classNames: ['settings'] | ||
}); | ||
|
||
export default SettingsRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var SettingsIndexRoute = Ember.Route.extend({ | ||
// redirect to general tab | ||
redirect: function () { | ||
this.transitionTo('settings.general'); | ||
} | ||
}); | ||
|
||
export default SettingsIndexRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styleBody from 'ghost/mixins/style-body'; | ||
|
||
var SignupRoute = Ember.Route.extend(styleBody, { | ||
classNames: ['ghost-signup'] | ||
}); | ||
|
||
export default SignupRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,37 @@ | ||
<header id="global-header" class="navbar"> | ||
<a class="ghost-logo" href="/" data-off-canvas="left" title="/"> | ||
<span class="hidden">Ghost </span> | ||
</a> | ||
<nav id="global-nav" role="navigation"> | ||
<ul id="main-menu" > | ||
<li class="content">{{#link-to "posts"}}Content{{/link-to}}</li> | ||
<li class="editor">{{#link-to "new"}}New post{{/link-to}}</li> | ||
{{!-- @TODO: don't nest link-to attributes | ||
currently required to get proper class styling --}} | ||
{{#link-to "posts" class="content" tagName="li" disabled=true}} | ||
{{#link-to "posts"}}Content{{/link-to}} | ||
{{/link-to}} | ||
{{#link-to "new" class="editor" tagName="li" disabled=true}} | ||
{{#link-to "new"}}New post{{/link-to}} | ||
{{/link-to}} | ||
{{#link-to "settings" class="settings" tagName="li" disabled=true}} | ||
{{#link-to "settings"}}Settings{{/link-to}} | ||
{{/link-to}} | ||
|
||
<li id="usermenu" class="usermenu subnav"> | ||
<a href="#" class="dropdown"> | ||
{{!-- @TODO: show avatar of logged in user --}} | ||
<img class="avatar" src="/shared/img/user-image.png" alt="Avatar" /> | ||
{{!-- @TODO: show logged in user name or email --}} | ||
<span class="name">Fake Ghost</span> | ||
</a> | ||
{{!-- @TODO: add functionality to allow for dropdown to work --}} | ||
<ul class="overlay"> | ||
<li class="usermenu-profile"><a href="#">Your Profile</a></li> | ||
<li class="divider"></li> | ||
<li class="usermenu-help"><a href="http://ghost.org/forum/">Help / Support</a></li> | ||
<li class="divider"></li> | ||
<li class="usermenu-signout"><a href="#">Sign Out</a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#unless isLogin}} | ||
{{#unless isLoggedOut}} | ||
{{partial "navbar"}} | ||
{{/unless}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
<section class="entry-preview-content"> | ||
<div class="rendered-markdown"> | ||
{{format-markdown markdown}} | ||
</div> | ||
</section> | ||
<div class="rendered-markdown"> | ||
{{format-markdown markdown}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<section class="forgotten-box js-forgotten-box"> | ||
<form id="forgotten" class="forgotten-form" method="post" novalidate="novalidate"> | ||
<div class="email-wrap"> | ||
<input class="email" type="email" placeholder="Email Address" name="email" autocapitalize="off" autocorrect="off"> | ||
</div> | ||
<button class="button-save" type="submit">Send new password</button> | ||
</form> | ||
</section> |
Oops, something went wrong.