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')
avatarUrl: (->
console.log(@get('account'))
@get('account.avatarUrl') || false
).property('account')

View File

@ -13,7 +13,8 @@ Controller = Ember.Controller.extend
).property('user.login', 'user.name')
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')
defineTowerColor: (broadcastArray) ->

View File

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

View File

@ -128,9 +128,7 @@ p.profile-user-last
.profile-orglist
@media #{$large-up}
padding-right: 10em
aside
padding: 0
padding: 0 3em 0 0
.profile-hooklist
@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,22 +1,19 @@
<aside class="columns medium-4">
<section class="profile-orgs">
<ul>
{{org-item account=user}}
</ul>
<h1>Organizations</h1>
<ul>
{{#each organizations as |org|}}
{{org-item account=org}}
{{else}}
<li class="profile-text">You are not currently a member of <br> any organization.</li>
{{/each}}
</ul>
</section>
<section class="profile-orgs">
<ul>
{{org-item account=user}}
</ul>
<h1>Organizations</h1>
<ul>
{{#each organizations as |org|}}
{{org-item account=org}}
{{else}}
<li class="profile-text">You are not currently a member of <br> any organization.</li>
{{/each}}
</ul>
</section>
{{#if config.githubOrgsOauthAccessSettingsUrl}}
<section class="profile-additional">
<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>
</section>
{{/if}}
</aside>

View File

@ -56,7 +56,8 @@
<button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button>
{{/if}}
{{#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}}
{{/if}}
{{#if auth.signingIn}}

View File

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