Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
Fixed author name rendering.
Browse files Browse the repository at this point in the history
The code was expecting item.author to be a single item whereas it
is an array in practice.
  • Loading branch information
tidoust committed Apr 26, 2012
1 parent 7f105a7 commit 4bfd7c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/css/common.css
Expand Up @@ -312,6 +312,10 @@ body {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;

/* Minimum height to ensure author name displayed below title
is not too close to container borders when title is missing */
min-height: 5px;
}

/* The author next to the title */
Expand Down
2 changes: 1 addition & 1 deletion app/srcjs/templates.js
Expand Up @@ -9,7 +9,7 @@ Joshfire.define(['joshfire/vendor/underscore'], function(_){
templates.newsTitle = '<h3><%=item.name%></h3>';
templates.newsImage = '<%if (item.contentURL) {%><div class="image"><img src="<%=item.contentURL%>" alt=""></div><%} else if (item.image && item.image.contentURL){%><div class="image"><img src="<%=item.image.contentURL%>" alt=""></div><%}%>';
templates.newsContent = '<div class="content"><%=item.description%></div>';
templates.newsAuthor = '<%if (item.author){%><div class="author"><span>by </span><%=item.author.name%></div><%}%>';
templates.newsAuthor = '<%if (item.author && item.author[0]){%><div class="author"><span>by </span><%=item.author[0].name%></div><%}%>';
templates.newsCaption = '<div class="caption"><%=item.description%></div>';
templates.newsHtmlCaption = '<div class="caption"><%if (item.articleBody) {%><%=item.articleBody%><%} else if (item.content) {%><%=item.content%><%} else {%><%=item.description%><%}%></div>';
templates.news = templates.newsTitle +
Expand Down

0 comments on commit 4bfd7c3

Please sign in to comment.