From 76f447314dc0592799714098fd8f61bec1407c38 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 22 Nov 2014 17:19:38 +1100 Subject: [PATCH 1/2] Link the owner image to their github profile. This temporarily provides more info about the owners of crates, without having to find the repository or recognise the image (temporary until crates.io has its own profile pages). --- app/components/user-link.js | 17 +++++++++++++++++ app/templates/crate/index.hbs | 7 +++++-- app/templates/me/index.hbs | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 app/components/user-link.js diff --git a/app/components/user-link.js b/app/components/user-link.js new file mode 100644 index 00000000000..a5ac8b17584 --- /dev/null +++ b/app/components/user-link.js @@ -0,0 +1,17 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + user: null, + attributeBindings: ['title', 'href'], + tagName: 'a', + + title: function() { + return this.get('user.login'); + }.property('user'), + + 'href': function() { + // TODO replace this with a link to a native crates.io profile + // page when they exist. + return 'https://github.com/' + this.get('user.login'); + }.property('user'), +}); diff --git a/app/templates/crate/index.hbs b/app/templates/crate/index.hbs index 844c3e1a7c4..890bc814046 100644 --- a/app/templates/crate/index.hbs +++ b/app/templates/crate/index.hbs @@ -94,8 +94,11 @@

Owners

diff --git a/app/templates/me/index.hbs b/app/templates/me/index.hbs index 762736aea2e..b7d3e402b49 100644 --- a/app/templates/me/index.hbs +++ b/app/templates/me/index.hbs @@ -7,7 +7,7 @@

Profile Information

- {{user-avatar user=this size='medium'}} + {{#user-link user=this }} {{user-avatar user=this size='medium'}} {{/user-link}}
Name
From 4282a4f8cf8a7b3733d203ee51018306cb3ef796 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 22 Nov 2014 17:21:32 +1100 Subject: [PATCH 2/2] Tweak some alignment relating to profile images. The personal logged-in avatar was a little too high. Fixes #60. The vertical margins around a persons' personal information were too large, causing the image to be misplaced. --- app/styles/app.scss | 4 ++++ app/styles/me.scss | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/styles/app.scss b/app/styles/app.scss index 22f48ce8c46..5a1b1de8b81 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -105,6 +105,10 @@ body { background: rgb(42, 79, 39); box-shadow: inset -2px 2px 4px 0px rgb(36, 61, 38); } + + img { + vertical-align: top; + } } #current-user-links { diff --git a/app/styles/me.scss b/app/styles/me.scss index 3896c872881..289ecb7c6de 100644 --- a/app/styles/me.scss +++ b/app/styles/me.scss @@ -5,7 +5,7 @@ .info { @include display-flex; } dl { - margin-left: 30px; + margin: 0 0 0 30px; line-height: 150%; font-size: 110%; dt {