Flesh out more of the Ember admin

no issue

- this ports over screens from old admin to
 allow people to begin working on aspects of the screen

- All logged out screens have been imported: Signup, Signin,
 Forgotten password, reset password

- Those screens are now ready for behavior to be ported over

- This also updates templates to be more in line with how they were
 in the old admin

- Littered through the code are @TODO comments of functionality that is
 missing and will need to be resolved before this is production ready

- Also scaffolds out the settings screen and every tab
This commit is contained in:
Harry Wolff 2014-03-09 23:44:08 -04:00
parent 22fe020d7c
commit 3296a3a41c
34 changed files with 568 additions and 60 deletions

View File

@ -425,6 +425,9 @@ var path = require('path'),
},
test: {
src: ['content/data/ghost-test.db']
},
tmp: {
src: ['.tmp/**']
}
},

View File

@ -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;

View File

@ -1,9 +1,135 @@
var posts = [
{
"id": 2,
"id": 4,
"uuid": "4dc16b9e-bf90-44c9-97c5-40a0a81e8297",
"title": "Ghost Ember Demo Post",
"slug": "ghost-ember-demo-post",
"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": "manuel@cms.mine.nu",
"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": "manuel@cms.mine.nu",
"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": "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": "manuel@cms.mine.nu",
"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": "manuel@cms.mine.nu",
"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,

View File

@ -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;

View File

@ -2,7 +2,7 @@
var showdown = new Showdown.converter();
var formatMarkdown = Ember.Handlebars.makeBoundHelper(function (markdown) {
return new Handlebars.SafeString(showdown.makeHtml(markdown));
return new Handlebars.SafeString(showdown.makeHtml(markdown || ''));
});
export default formatMarkdown;

View File

@ -9,12 +9,21 @@ Router.reopen({
});
Router.map(function () {
this.route('login', { path: '/signin' });
this.route('signin');
this.route('signup');
this.route('forgotten');
this.route('reset');
this.resource('posts', { path: '/' }, function () {
this.route('post', { path: ':post_id' });
});
this.resource('editor', { path: '/editor/:post_id' });
this.route('new', { path: '/editor' });
this.resource('settings', function () {
this.route('general');
this.route('user');
this.route('debug');
this.route('apps');
});
});
export default Router;

View File

@ -2,7 +2,7 @@ var AuthenticatedRoute = Ember.Route.extend({
actions: {
error: function (error) {
if (error.jqXHR.status === 401) {
this.transitionTo('login');
this.transitionTo('signin');
}
}
}

View File

@ -0,0 +1,7 @@
import styleBody from 'ghost/mixins/style-body';
var ForgottenRoute = Ember.Route.extend(styleBody, {
classNames: ['ghost-forgotten']
});
export default ForgottenRoute;

12
core/client/routes/new.js Normal file
View File

@ -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;

View File

@ -0,0 +1,7 @@
import styleBody from 'ghost/mixins/style-body';
var ResetRoute = Ember.Route.extend(styleBody, {
classNames: ['ghost-reset']
});
export default ResetRoute;

View File

@ -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;

View File

@ -0,0 +1,8 @@
var SettingsIndexRoute = Ember.Route.extend({
// redirect to general tab
redirect: function () {
this.transitionTo('settings.general');
}
});
export default SettingsIndexRoute;

View File

@ -3,7 +3,7 @@ import styleBody from 'ghost/mixins/style-body';
var isEmpty = Ember.isEmpty;
var LoginRoute = Ember.Route.extend(styleBody, {
var SigninRoute = Ember.Route.extend(styleBody, {
classNames: ['ghost-login'],
actions: {
@ -29,4 +29,4 @@ var LoginRoute = Ember.Route.extend(styleBody, {
}
});
export default LoginRoute;
export default SigninRoute;

View File

@ -0,0 +1,7 @@
import styleBody from 'ghost/mixins/style-body';
var SignupRoute = Ember.Route.extend(styleBody, {
classNames: ['ghost-signup']
});
export default SignupRoute;

View File

@ -1,12 +1,14 @@
<header class="floatingheader">
<button class="button-back" href="#">Back</button>
<a class="unfeatured" href="#" title="Feature this post">
{{!-- @TODO: add back title updates depending on featured state --}}
<a {{bind-attr class="featured:featured:unfeatured"}} href="#" title="Feature this post">
<span class="hidden">Star</span>
</a>
<small>
<span class="status">Written</span>
{{!-- @TODO: the if published doesn't seem to work, needs to be fixed --}}
<span class="status">{{#if published}}Published{{else}}Written{{/if}}</span>
<span class="normal">by</span>
<span class="author">{{author.name}}</span>
<span class="author">{{#if author.name}}{{author.name}}{{else}}{{author.email}}{{/if}}</span>
</small>
<section class="post-controls">
{{#link-to "editor" this class="post-edit" title="Edit Post"}}

View File

@ -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>

View File

@ -2,7 +2,7 @@
<nav>
<section id="entry-tags" href="#" class="left">
<label class="tag-label" for="tags" title="Tags"><span class="hidden">Tags</span></label>
<div class="tags">Nothing implemented</div>
<div class="tags"></div>
<input type="hidden" class="tags-holder" id="tags-holder">
<input class="tag-input" id="tags" type="text" data-input-behaviour="tag" />
<ul class="suggestions overlay"></ul>
@ -46,8 +46,9 @@
</section>
<section id="entry-actions" class="js-publish-splitbutton splitbutton-save">
<button type="button" class="js-publish-button button-save"></button>
<button type="button" class="js-publish-button button-save">Save Draft</button>
<a class="options up" data-toggle="ul" href="#" title="Post Settings"><span class="hidden">Post Settings</span></a>
{{!-- @TODO: implement popover --}}
<ul class="editor-options overlay" style="display:none">
<li data-set-status="published"><a href="#"></a></li>
<li data-set-status="draft"><a href="#"></a></li>

View File

@ -1,4 +1,4 @@
{{#unless isLogin}}
{{#unless isLoggedOut}}
{{partial "navbar"}}
{{/unless}}

View File

@ -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>

View File

@ -19,7 +19,9 @@
<header class="floatingheader">
<small>Preview <span class="entry-word-count js-entry-word-count">{{count-words markdown}} words</span></small>
</header>
{{-markdown markdown=markdown scrollPosition=view.scrollPosition}}
<section class="entry-preview-content">
{{-markdown markdown=markdown scrollPosition=view.scrollPosition}}
</section>
</section>
</section>

View File

@ -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>

View File

@ -1,19 +0,0 @@
<main role="main" id="main">
<aside id="notifications" class="notifications">
</aside>
<section class="login-box js-login-box" style="opacity: 1;">
<form id="login" class="login-form" method="post" novalidate="novalidate">
<div class="email-wrap">
{{input class="email" type="email" placeholder="Email Address" name="email" autocapitalize="off" autocorrect="off" value=email}}
</div>
<div class="password-wrap">
{{input class="password" type="password" placeholder="Password" name="password" value=password}}
</div>
<button class="button-save" type="submit" {{action "login"}}>Log in</button>
<section class="meta">
<a class="forgotten-password" href="/ghost/forgotten/">Forgotten password?</a>
</section>
</form>
</section>
</main>

View File

@ -4,22 +4,26 @@
<section class="content-filter">
<small>All Posts</small>
</section>
{{#link-to "new" class="button button-add" title="New Post"}}New Post{{/link-to}}
{{#link-to "new" class="button button-add" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}}
</header>
<section class="content-list-content">
<ol class="posts-list">
{{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}}
{{!-- @TODO: Restore functionality where 'featured' and 'page' classes are added for proper posts --}}
{{#link-to 'posts.post' this class="permalink" title="Edit this post"}}
<h3 class="entry-title">{{title}}</h3>
<section class="entry-meta">
<span class="status">
{{#if isDraft}}
<span class="draft">Draft</span>
{{/if}}
{{#if isPublished}}
<time datetime="{{unbound published_at}}" class="date published">
Published {{format-timeago published_at}}
</time>
{{#if page}}
<span class="page">Page</span>
{{else}}
<time datetime="{{unbound published_at}}" class="date published">
Published {{format-timeago published_at}}
</time>
{{/if}}
{{else}}
<span class="draft">Draft</span>
{{/if}}
</span>
</section>

View File

@ -1,8 +1,21 @@
{{partial "floating-header"}}
{{#if title}}
<section class="content-preview-content">
<div class="wrapper">
<h1>{{title}}</h1>
{{format-markdown markdown}}
{{partial "floating-header"}}
<section class="content-preview-content">
<div class="wrapper">
<h1>{{title}}</h1>
{{format-markdown markdown}}
</div>
</section>
{{else}}
<div class="no-posts-box">
<div class="no-posts">
<h3>You Haven't Written Any Posts Yet!</h3>
{{#link-to 'new'}}<button class="button-add large" title="New Post">Write a new Post</button>{{/link-to}}
</div>
</div>
</section>
{{/if}}

View File

@ -0,0 +1,11 @@
<section class="reset-box js-reset-box">
<form id="reset" class="reset-form" method="post" novalidate="novalidate">
<div class="password-wrap">
<input class="password" type="password" placeholder="Password" name="newpassword" />
</div>
<div class="password-wrap">
<input class="password" type="password" placeholder="Confirm Password" name="ne2password" />
</div>
<button class="button-save" type="submit">Reset Password</button>
</form>
</section>

View File

@ -0,0 +1,18 @@
<div class="wrapper">
<aside class="settings-sidebar" role="complementary">
<header>
<h1 class="title">Settings</h1>
</header>
<nav class="settings-menu">
<ul>
<li class="general">{{#link-to 'settings.general'}}General{{/link-to}}</li>
<li class="users">{{#link-to 'settings.user'}}User{{/link-to}}</li>
<li class="apps">{{#link-to 'settings.apps'}}Apps{{/link-to}}</li>
</ul>
</nav>
</aside>
<section class="settings-content active">
{{outlet}}
</section>
</div>

View File

@ -0,0 +1,15 @@
<header>
<button class="button-back">Back</button>
<h2 class="title">Apps</h2>
</header>
<section class="content">
<ul class="js-apps">
{{#each availableApps}}
<li>
{{#if package}}{{package.name}} - {{package.version}}{{else}}{{name}} - package.json missing :({{/if}}
<button data-app="{{name}}" class="{{#if active}}button-delete js-button-deactivate js-button-active">Deactivate{{else}}button-add js-button-activate">Activate{{/if}}</button>
</li>
{{/each}}
</ul>
</section>

View File

@ -0,0 +1,34 @@
<header>
<h2 class="title">General</h2>
</header>
<section class="content">
<form id="settings-export">
<input type="hidden" name="_csrf" value="{{csrfToken}}" />
<fieldset>
<div class="form-group">
<label>Export</label>
<a href="{{admin_url}}/export/" class="button-save">Export</a>
<p>Export the blog settings and data.</p>
</div>
</fieldset>
</form>
<form id="settings-import" enctype="multipart/form-data">
<fieldset>
<div class="form-group">
<label>Import</label>
<input type="file" class="button-add" name="importfile" id="importfile" />
<button type="submit" class="button-save" value="Import" id="startupload" >Import</button>
<p>Import from another Ghost installation. If you import a user, this will replace the current user & log you out.</p>
</div>
</fieldset>
</form>
<form id="settings-resetdb">
<fieldset>
<div class="form-group">
<label>Delete all Content</label>
<a href="javascript:void(0);" class="button-delete js-delete">Delete</a>
<p>Delete all posts and tags from the database.</p>
</div>
</fieldset>
</form>
</section>

View File

@ -0,0 +1,81 @@
<header>
<button class="button-back">Back</button>
<h2 class="title">General</h2>
<section class="page-actions">
<button class="button-save">Save</button>
</section>
</header>
<section class="content">
<form id="settings-general" novalidate="novalidate">
<fieldset>
<div class="form-group">
<label for="blog-title">Blog Title</label>
{{input id="blog-title" name="general[title]" type="text" value=title}}
<p>The name of your blog</p>
</div>
<div class="form-group description-container">
<label for="blog-description">Blog Description</label>
{{textarea id="blog-description" value=description}}
<p>
Describe what your blog is about
<span class="word-count">0</span>
</p>
</div>
</fieldset>
<div class="form-group">
<label for="blog-logo">Blog Logo</label>
{{#if logo}}
<a class="js-modal-logo" href="#"><img id="blog-logo" src="{{logo}}" alt="logo"></a>
{{else}}
<a class="button-add js-modal-logo" >Upload Image</a>
{{/if}}
<p>Display a sexy logo for your publication</p>
</div>
<div class="form-group">
<label for="blog-cover">Blog Cover</label>
{{#if cover}}
<a class="js-modal-cover" href="#"><img id="blog-cover" src="{{cover}}" alt="cover photo"></a>
{{else}}
<a class="button-add js-modal-cover">Upload Image</a>
{{/if}}
<p>Display a cover image on your site</p>
</div>
<fieldset>
<div class="form-group">
<label for="email-address">Email Address</label>
{{input id="email-address" name="general[email-address]" type="email" value=email autocapitalize="off" autocorrect="off"}}
<p>Address to use for admin notifications</p>
</div>
<div class="form-group">
<label for="postsPerPage">Posts per page</label>
{{input id="postsPerPage" name="general[postsPerPage]" type="number" value=postsPerPage}}
<p>How many posts should be displayed on each page</p>
</div>
<div class="form-group">
<label for="permalinks">Dated Permalinks</label>
{{input id="permalinks" name="general[permalinks]" type="checkbox" value='permalink'}}
<label class="checkbox" for="permalinks"></label>
<p>Include the date in your post URLs</p>
</div>
<div class="form-group">
<label for="activeTheme">Theme</label>
<select id="activeTheme" name="general[activeTheme]">
{{#each availableThemes}}
<option value="{{name}}" {{#if active}}selected{{/if}}>{{#if package}}{{package.name}} - {{package.version}}{{else}}{{name}}{{/if}}</option>
{{#unless package}}<script>console.log('Hi! The theme named "{{name}}" does not have a package.json file or it\'s malformed. This will be required in the future. For more info, see http://docs.ghost.org/themes/.');</script>{{/unless}}
{{/each}}
</select>
<p>Select a theme for your blog</p>
</div>
</fieldset>
</form>
</section>

View File

@ -0,0 +1,94 @@
<header>
<button class="button-back">Back</button>
<h2 class="title">Your Profile</h2>
<section class="page-actions">
<button class="button-save">Save</button>
</section>
</header>
<section class="content no-padding">
<header class="user-profile-header">
{{!-- @TODO: once we have asset helper in place we can restore this, right now it errors
<img id="user-cover" class="cover-image" src="{{#if cover}}{{cover}}{{else}}{{asset "shared/img/user-cover.png"}}{{/if}}" title="{{name}}'s Cover Image"/>
--}}
<a class="edit-cover-image js-modal-cover button" href="#">Change Cover</a>
</header>
<form class="user-profile" novalidate="novalidate">
<fieldset class="user-details-top">
<figure class="user-image">
{{!-- @TODO: once we have asset helper in place we can restore this, right now it errors
<div id="user-image" class="img" style="background-image: url({{#if image}}{{image}}{{else}}{{asset "shared/img/user-image.png"}}{{/if}});" href="#"><span class="hidden">{{name}}'s Picture</span></div>
--}}
<a href="#" class="edit-user-image js-modal-image">Edit Picture</a>
</figure>
<div class="form-group">
<label for="user-name" class="hidden">Full Name</label>
<input type="url" value="{{name}}" id="user-name" placeholder="Full Name" autocorrect="off" />
<p>Use your real name so people can recognise you</p>
</div>
</fieldset>
<fieldset class="user-details-bottom">
<div class="form-group">
<label for"user-email">Email</label>
{{input type="email" value=email id="user-email" placeholder="Email Address" autocapitalize="off" autocorrect="off"}}
<p>Used for notifications</p>
</div>
<div class="form-group">
<label for="user-location">Location</label>
{{input type="text" value=location id="user-location"}}
<p>Where in the world do you live?</p>
</div>
<div class="form-group">
<label for="user-website">Website</label>
{{input type="text" value=website id="user-website" autocapitalize="off" autocorrect="off"}}
<p>Have a website or blog other than this one? Link it!</p>
</div>
<div class="form-group bio-container">
<label for="user-bio">Bio</label>
{{textarea id="user-bio" value=bio}}
<p>
Write about you, in 200 characters or less.
<span class="word-count">0</span>
</p>
</div>
<hr />
</fieldset>
<fieldset>
<div class="form-group">
<label for="user-password-old">Old Password</label>
{{input type="password" id="user-password-old"}}
</div>
<div class="form-group">
<label for="user-password-new">New Password</label>
{{input type="password" id="user-password-new"}}
</div>
<div class="form-group">
<label for="user-new-password-verification">Verify Password</label>
{{input type="password" id="user-new-password-verification"}}
</div>
<div class="form-group">
<button type="button" class="button-delete button-change-password">Change Password</button>
</div>
</fieldset>
</form>
</section>

View File

@ -0,0 +1,14 @@
<section class="login-box js-login-box" style="opacity: 1;">
<form id="login" class="login-form" method="post" novalidate="novalidate">
<div class="email-wrap">
{{input class="email" type="email" placeholder="Email Address" name="email" autocapitalize="off" autocorrect="off" value=email}}
</div>
<div class="password-wrap">
{{input class="password" type="password" placeholder="Password" name="password" value=password}}
</div>
<button class="button-save" type="submit" {{action "login"}}>Log in</button>
<section class="meta">
{{#link-to 'forgotten' class="forgotten-password"}}Forgotten password?{{/link-to}}
</section>
</form>
</section>

View File

@ -0,0 +1,14 @@
<section class="signup-box js-signup-box">
<form id="signup" class="signup-form" method="post" novalidate="novalidate">
<div class="name-wrap">
<input class="name" type="text" placeholder="Full Name" name="name" autocorrect="off" />
</div>
<div class="email-wrap">
<input class="email" type="email" placeholder="Email Address" name="email" autocapitalize="off" autocorrect="off" />
</div>
<div class="password-wrap">
<input class="password" type="password" placeholder="Password" name="password" />
</div>
<button class="button-save" type="submit">Sign Up</button>
</form>
</section>

View File

@ -3,6 +3,10 @@ var admin = require('../controllers/admin'),
middleware = require('../middleware').middleware;
module.exports = function (server) {
// Have ember route look for hits first
// to prevent conflicts with pre-existing routes
server.get('/ghost/ember/*', admin.index);
var subdir = config().paths.subdir;
// ### Admin routes
server.get('/logout/', function redirect(req, res) {
@ -57,6 +61,4 @@ module.exports = function (server) {
res.redirect(subdir + '/ghost/');
});
server.get('/ghost/', admin.indexold);
server.get('/ghost/ember/*', admin.index);
};

View File

@ -38,7 +38,7 @@
<script src="/ghost/scripts/ghost-dev-ember.js"></script>
<script>
window.App = require('ghost/app')['default'].create();
window.App = require('ghost/app')['default'].create();
</script>
</body>
</html>