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.
Editable user profiles in settings screen
closes TryGhost#276 - settings screen now loads a model when a pane is requested, rather than when the whole screen is requested - added browse, read and edit methods and routes for users to the API - added user model & template to client and wired everything up. - provided default images for cover and profile picture
- Loading branch information
Showing
10 changed files
with
196 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/*global window, document, Ghost, $, _, Backbone */ | ||
(function () { | ||
"use strict"; | ||
|
||
Ghost.Models.User = Backbone.Model.extend({ | ||
url: Ghost.settings.apiRoot + '/users/1' | ||
}); | ||
|
||
// Ghost.Collections.Users = Backbone.Collection.extend({ | ||
// url: Ghost.settings.apiRoot + '/users' | ||
// }); | ||
|
||
}()); |
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,76 @@ | ||
<header> | ||
<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"> | ||
<figure class="cover-image"> | ||
<img id="user-cover-picture" src="{{#if cover_picture}}{{cover_picture}}{{else}}/shared/img/default-user-cover-picture.jpg{{/if}}" title="{{full_name}} Cover Image"/> | ||
<button class="button-change-cover">Change Cover</button> | ||
</figure> | ||
</header> | ||
<form class="user-details-container"> | ||
<fieldset class="user-details-top"> | ||
<figure class="user-avatar-image"> | ||
<img id="user-profile-picture" src="{{#if profile_picture}}{{profile_picture}}{{else}}/shared/img/default-user-profile-picture.jpg{{/if}}" title="{{full_name}}"/> | ||
<button class="button-change-avatar">Update Avatar</button> | ||
</figure> | ||
<label> | ||
<input type="text" value="{{full_name}}" id="user-name" placeholder="Joe Bloggs"> | ||
<p>Use your real name so people can recognise you.</p> | ||
</label> | ||
</fieldset> | ||
<fieldset class="user-details-bottom"> | ||
<div class="form-group"> | ||
<label><strong>Email</strong></label> | ||
<input type="text" value="{{email_address}}" id="user-email"> | ||
<p>Email will not be publicly displayed. <a class="highlight" href="#" >Learn more</a>.</p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label><strong>Location</strong></label> | ||
<input type="text" value="{{location}}" id="user-location"> | ||
<p>Where in the world do you live?</p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label><strong>Website</strong></label> | ||
<input type="text" value="{{url}}" id="user-website"> | ||
<p>Have a website or blog other than this one? Link it.</p> | ||
</div> | ||
|
||
<div class="form-group bio-container"> | ||
<label><strong>Bio</strong></label> | ||
<textarea id="user-bio">{{bio}}</textarea> | ||
<p class="bio-desc">Write about you, in <strong>200</strong> characters or less.</p> | ||
<span class="word-count">97</span> | ||
</div> | ||
|
||
<hr> | ||
|
||
</fieldset> | ||
|
||
<fieldset class="user-details-bottom"> | ||
|
||
<div class="form-group"> | ||
<label><strong>Old Password</strong></label> | ||
<input type="password" id="user-password-old"> | ||
<p><a href="#" >Forgot your password?</a></p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label><strong>New Password</strong></label> | ||
<input type="password" id="user-password-new"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label><strong>Verify Password</strong></label> | ||
<input type="password" id="user-new-password-verification"> | ||
</div> | ||
|
||
</fieldset> | ||
|
||
</form> | ||
</section> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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