Skip to content

Commit

Permalink
[authors] author name in info box is now linked to author page. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Sep 10, 2012
1 parent 2a6797b commit 524fc7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/templates/author/info.html
@@ -1,6 +1,6 @@
<a class="author-avatar-link" href=""><img src="" class="avatar"></img></a>
<div class="meta">
<h3 class="name"></h3>
<h3><a class="name" href=""></a></h3>
<ul class="unstyled clearfix links">
<li role="link"><span role="link-type" class=""><a class="author-link" href=""></a></span></li>
<li><span role="count" ></span> articles written</li>
Expand Down
2 changes: 2 additions & 0 deletions server/templates/author/info.js
Expand Up @@ -8,6 +8,7 @@ module.exports = function(html, templates, conf, bind, Map, content) {
map.className('author-avatar-link').to('author-link-to').as('href');

map.className('name').to('name');
map.className('name').use('url').as('href');

map.where('role').is('link').to('link');
map.where('role').is('link-type').use('link-class').as('class');
Expand Down Expand Up @@ -46,6 +47,7 @@ module.exports = function(html, templates, conf, bind, Map, content) {
'author-avatar-url': avatarURL,
'author-avatar-link': '/authors/' + encodeURIComponent(author.meta.name),
'name': author.meta.name,
'url': '/authors/' + encodeURIComponent(author.meta.name),
'link': links,
'written_count': author.articles.length
};
Expand Down

0 comments on commit 524fc7c

Please sign in to comment.