diff --git a/public_html/css/home.css b/public_html/css/home.css index 46eb93e2..702aa4a7 100644 --- a/public_html/css/home.css +++ b/public_html/css/home.css @@ -14,7 +14,7 @@ margin: 0 auto; display: inline-block; max-width: 60%; - min-width: 32em; + min-width: 40em; } #home .post .left { display: inline-block; diff --git a/public_html/templates/home.tpl b/public_html/templates/home.tpl index 9f8238fe..0c6ef50e 100644 --- a/public_html/templates/home.tpl +++ b/public_html/templates/home.tpl @@ -1,3 +1,21 @@ +<% function showUser(name) { %> + <% var showLink = canViewUsers && name %> + + <% if (showLink) { %> + <a href="#/user/<%= name %>"> + <% } %> + + <img width="25" height="25" class="author-avatar" + src="/data/thumbnails/25x25/avatars/<%= name || '!' %>" + alt="<%= name || 'Anonymous user' %>"/> + + <%= name || 'Anonymous user' %> + + <% if (showLink) { %> + </a> + <% } %> +<% } %> + <div id="home"> <h1><%= title %></h1> <p class="subheader"> @@ -26,28 +44,15 @@ uploaded <%= util.formatRelativeTime(post.uploadTime) %> + by + <% showUser(post.user.name) %> </span> <span class="right"> featured <%= util.formatRelativeTime(post.lastFeatureTime) %> by - - <% var showLink = canViewUsers && user.name %> - - <% if (showLink) { %> - <a href="#/user/<%= user.name %>"> - <% } %> - - <img width="25" height="25" class="author-avatar" - src="/data/thumbnails/25x25/avatars/<%= user.name || '!' %>" - alt="<%= user.name || 'Anonymous user' %>"/> - - <%= user.name || 'Anonymous user' %> - - <% if (showLink) { %> - </a> - <% } %> + <% showUser(user.name) %> </span> </div>