Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1727 from openjck/profile-icons-fontawesome
Browse files Browse the repository at this point in the history
Fix bug 942370: Use Font Awesome for profile links
  • Loading branch information
lmorchard committed Dec 5, 2013
2 parents af9cc75 + 267ff86 commit 91074ee
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
9 changes: 8 additions & 1 deletion apps/devmo/models.py
Expand Up @@ -64,36 +64,43 @@ class UserProfile(ModelBase):
label=_(u'Website'),
prefix='http://',
regex='^https?://',
fa_icon='icon-link',
)),
('twitter', dict(
label=_(u'Twitter'),
prefix='https://twitter.com/',
regex='^https?://twitter.com/',
fa_icon='icon-twitter',
)),
('github', dict(
label=_(u'GitHub'),
prefix='https://github.com/',
regex='^https?://github.com/',
fa_icon='icon-github',
)),
('stackoverflow', dict(
label=_(u'StackOverflow'),
label=_(u'Stack Overflow'),
prefix='https://stackoverflow.com/users/',
regex='^https?://stackoverflow.com/users/',
fa_icon='icon-stackexchange',
)),
('linkedin', dict(
label=_(u'LinkedIn'),
prefix='https://www.linkedin.com/in/',
regex='^https?://www.linkedin.com/in/',
fa_icon='icon-linkedin',
)),
('mozillians', dict(
label=_(u'Mozillians'),
prefix='https://mozillians.org/u/',
regex='^https?://mozillians.org/u/',
fa_icon='icon-group',
)),
('facebook', dict(
label=_(u'Facebook'),
prefix='https://www.facebook.com/',
regex='^https?://www.facebook.com/',
fa_icon='icon-facebook',
))
]

Expand Down
2 changes: 1 addition & 1 deletion apps/devmo/templates/devmo/profile_redesign.html
Expand Up @@ -38,7 +38,7 @@
{% set site_meta = site[1] %}
{% set href = profile.websites[site_name] %}
{% if href %}
<li class="{{site_name}}"><a href="{{href}}" rel="me external" class="url">{{site_meta['label']}}</a></li>
<li class="{{site_name}}"><i class="{{site_meta['fa_icon']}}" aria-hidden="true"></i><a href="{{href}}" rel="me external" class="url">{{site_meta['label']}}</a></li>
{% endif %}
{% endfor %}
</ul>
Expand Down
27 changes: 25 additions & 2 deletions media/redesign/stylus/profile.styl
Expand Up @@ -45,6 +45,31 @@
width: auto;
margin-left: 150px;
}

.links {
display: table;
border-spacing: (grid-spacing / 2);
margin: -(@border-spacing); // Offset outer border

li {
display: table-row;
}

i, a {
display: table-cell;
vertical-align: middle;
}

i {
font-size: 14px;
text-align: center;
}

a {
compat-only(background, none);
padding: 0;
}
}
}
}

Expand Down Expand Up @@ -79,5 +104,3 @@
}
}
}


0 comments on commit 91074ee

Please sign in to comment.