aboutsummaryrefslogtreecommitdiff
path: root/client/html/home.tpl
diff options
context:
space:
mode:
authorrr-2016-05-29 12:28:52 +0200
committerrr-2016-05-29 12:41:22 +0200
commit53fd6fb29bb489c112a87c5effaf6c650a1e5fba (patch)
treea1503e48b6d6e3baf039076a4258a63cffe683f8 /client/html/home.tpl
parent6d6cce20dd176e19401f4c4ae8f8c32eb7834cf1 (diff)
client/home: view featured post, add search form
Diffstat (limited to 'client/html/home.tpl')
-rw-r--r--client/html/home.tpl50
1 files changed, 48 insertions, 2 deletions
diff --git a/client/html/home.tpl b/client/html/home.tpl
index b14b0c9..78d995f 100644
--- a/client/html/home.tpl
+++ b/client/html/home.tpl
@@ -2,7 +2,53 @@
<div class='messages'></div>
<header>
<h1><%= ctx.name %></h1>
- <p>Serving <%= ctx.postCount %> posts (<%= ctx.makeFileSize(ctx.diskUsage) %>)</p>
</header>
- <footer>Version: <a class='version' href='https://github.com/rr-/szurubooru/commits/master'><%= ctx.version %></a> (built <%= ctx.makeRelativeTime(ctx.buildDate) %>)</footer>
+ <nav>
+ <ul>
+ <% if (ctx.canListPosts) { %>
+ <li><a href='/posts'><%= ctx.makeAccessKey('Posts', 'P') %></a></li>
+ <% } %>
+ <% if (ctx.canListComments) { %>
+ <li><a href='/comments'><%= ctx.makeAccessKey('Comments', 'C') %></a></li>
+ <% } %>
+ <% if (ctx.canListTags) { %>
+ <li><a href='/tags'><%= ctx.makeAccessKey('Tags', 'T') %></a></li>
+ <% } %>
+ <% if (ctx.canListUsers) { %>
+ <li><a href='/users'><%= ctx.makeAccessKey('Users', 'U') %></a></li>
+ <% } %>
+ <li><a href='/help'><%= ctx.makeAccessKey('Help', 'E') %></a></li>
+ </ul>
+ </nav>
+ <% if (ctx.canListPosts) { %>
+ <form class='horizontal'>
+ <div class='input'>
+ <ul>
+ <li>
+ <%= ctx.makeTextInput({id: 'search-text', name: 'search-text'}) %>
+ </li>
+ </ul>
+ </div>
+ <div class='buttons'>
+ <input type='submit' value='Search'/>
+ </div>
+ </form>
+ <% } %>
+ <div class='post-container'></div>
+ <% if (ctx.featuredPost) { %>
+ <aside>
+ <%= ctx.makePostLink(ctx.featuredPost.id) %>
+ uploaded
+ <%= ctx.makeRelativeTime(ctx.featuredPost.creationTime) %>
+ by
+ <%= ctx.makeUserLink(ctx.featuredPost.user) %>
+ </aside>
+ <% } %>
+ <footer>
+ Serving <%= ctx.postCount %> posts (<%= ctx.makeFileSize(ctx.diskUsage) %>)
+ &bull;
+ Running <a class='version' href='https://github.com/rr-/szurubooru/commits/master'><%= ctx.version %></a>
+ &bull;
+ Built <%= ctx.makeRelativeTime(ctx.buildDate) %>
+ </footer>
</div>

© 2015 - 2026 Jakob L. Kreuze