rearrange templates, start unifying avatar

This commit is contained in:
Lisa P 2015-11-18 13:06:22 +01:00 committed by Piotr Sarnacki
parent 201a37aa70
commit 875ff4fb44
8 changed files with 38 additions and 23 deletions

View File

@ -14,7 +14,6 @@ OrgItemComponent = Ember.Component.extend
).property('account') ).property('account')
avatarUrl: (-> avatarUrl: (->
console.log(@get('account'))
@get('account.avatarUrl') || false @get('account.avatarUrl') || false
).property('account') ).property('account')

View File

@ -13,7 +13,8 @@ Controller = Ember.Controller.extend
).property('user.login', 'user.name') ).property('user.login', 'user.name')
gravatarUrl: (-> gravatarUrl: (->
"#{location.protocol}//www.gravatar.com/avatar/#{@get('user.gravatarId')}?s=48&d=mm" if @get('user.gravatarId')
"#{location.protocol}//www.gravatar.com/avatar/#{@get('user.gravatarId')}?s=36&d=mm"
).property('user.gravatarId') ).property('user.gravatarId')
defineTowerColor: (broadcastArray) -> defineTowerColor: (broadcastArray) ->

View File

@ -43,6 +43,7 @@
@import "app/modules/forms"; @import "app/modules/forms";
@import "app/modules/notice"; @import "app/modules/notice";
@import "app/modules/build-header"; @import "app/modules/build-header";
@import "app/modules/avatar";
@import "app/layout"; @import "app/layout";
@import "app/layouts/dashboard"; @import "app/layouts/dashboard";

View File

@ -128,9 +128,7 @@ p.profile-user-last
.profile-orglist .profile-orglist
@media #{$large-up} @media #{$large-up}
padding-right: 10em padding: 0 3em 0 0
aside
padding: 0
.profile-hooklist .profile-hooklist
@include resetul @include resetul

View File

@ -0,0 +1,17 @@
%avatar
background-color: hotpink
border-radius: 50%
background-image: linear-gradient(top left, $grey-dark 30%, $grey-medium 40%, $grey-medium 60%, $grey-dark 70%)
.default-avatar--profile
@extend %avatar
width: 2.6rem
height: 2.6rem
.default-avatar--topbar
@extend %avatar
width: 2.7rem
height: 2.7rem
display: inline-block
vertical-align: middle
margin-left: 0.3em

View File

@ -1,6 +1,4 @@
<section class="profile-orgs">
<aside class="columns medium-4">
<section class="profile-orgs">
<ul> <ul>
{{org-item account=user}} {{org-item account=user}}
</ul> </ul>
@ -12,11 +10,10 @@
<li class="profile-text">You are not currently a member of <br> any organization.</li> <li class="profile-text">You are not currently a member of <br> any organization.</li>
{{/each}} {{/each}}
</ul> </ul>
</section> </section>
{{#if config.githubOrgsOauthAccessSettingsUrl}} {{#if config.githubOrgsOauthAccessSettingsUrl}}
<section class="profile-additional"> <section class="profile-additional">
<p>Is an organization missing?<br> <p>Is an organization missing?<br>
<a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Orgs Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p> <a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Orgs Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p>
</section> </section>
{{/if}} {{/if}}
</aside>

View File

@ -56,7 +56,8 @@
<button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button> <button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button>
{{/if}} {{/if}}
{{#if auth.signedIn}} {{#if auth.signedIn}}
{{#link-to "profile" class="navigation-anchor signed-in"}}{{userName}}<img src={{gravatarUrl}} /> {{#link-to "profile" class="navigation-anchor signed-in"}}{{userName}}
{{#if gravatarUrl }}<img src={{gravatarUrl}} />{{else}}<div class="default-avatar--topbar"></div>{{/if}}
{{/link-to}} {{/link-to}}
{{/if}} {{/if}}
{{#if auth.signingIn}} {{#if auth.signingIn}}

View File

@ -2,7 +2,8 @@
View = BasicView.extend View = BasicView.extend
tabBinding: 'controller.tab' tabBinding: 'controller.tab'
classNames: ['profile-orglist'] classNames: ['profile-orglist', 'columns', 'medium-4']
tagName: 'aside'
templateName: 'profile/accounts' templateName: 'profile/accounts'
classAccounts: (-> classAccounts: (->
'active' if @get('tab') == 'accounts' 'active' if @get('tab') == 'accounts'