szurubooru/public_html/templates/home.tpl

70 lines
1.5 KiB
Smarty
Raw Normal View History

<% 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>
<% } %>
<% } %>
2014-09-24 23:24:51 +02:00
<div id="home">
<h1><%= title %></h1>
2014-12-07 13:43:15 +01:00
<p class="subheader">
2014-12-20 10:30:10 +01:00
Serving <%= globals.postCount || 0 %> posts (<%= util.formatFileSize(globals.postSize || 0) %>)
2014-09-25 11:45:46 +02:00
</p>
2014-09-24 23:24:51 +02:00
<% if (post && post.id) { %>
2015-03-13 20:56:12 +01:00
<div class="post" style="width: <%= post.imageWidth || 800 %>px">
2014-10-22 10:42:15 +02:00
<div id="post-content-target">
</div>
2014-09-24 23:24:51 +02:00
<div class="post-footer">
2014-12-07 13:43:15 +01:00
<span class="left">
2014-09-30 22:09:43 +02:00
<% var showLink = canViewPosts %>
<% if (showLink) { %>
<a href="#/post/<%= post.id %>">
<% } %>
<%= post.idMarkdown %>
<% if (showLink) { %>
</a>
<% } %>
2014-09-24 23:24:51 +02:00
uploaded
2014-12-20 10:30:10 +01:00
<%= util.formatRelativeTime(post.uploadTime) %>
by
<% showUser(post.user.name) %>
2014-12-07 13:43:15 +01:00
</span>
2014-09-24 23:24:51 +02:00
2014-12-07 13:43:15 +01:00
<span class="right">
2014-11-09 20:10:01 +01:00
featured
2014-12-20 10:30:10 +01:00
<%= util.formatRelativeTime(post.lastFeatureTime) %>
2014-11-09 20:10:01 +01:00
by
<% showUser(user.name) %>
2014-12-07 13:43:15 +01:00
</span>
2014-09-24 23:24:51 +02:00
</div>
</div>
<% } %>
<p>
2014-11-07 14:40:45 +01:00
<small class="version">
2014-12-20 10:30:10 +01:00
Version: <a href="//github.com/rr-/szurubooru/commits/master"><%= version %></a> (built <%= util.formatRelativeTime(buildTime) %>)
2014-11-07 14:40:45 +01:00
|
<a href="#/history">Recent tag and post edits</a>
</small>
</p>
2014-09-24 23:24:51 +02:00
</div>