aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/home.twig
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:25:11 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:25:11 +0200
commit8cbb2a88024969f7efd90f8053f3b0805fa2f8fa (patch)
tree0bb5c7fb3adc752d9ea9a933b524bd08631ca11a /tpl/home.twig
parentc67e13e04baab64bcc63fd0dca46125513250c44 (diff)
downloadwallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.tar.gz
wallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.tar.zst
wallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.zip
twig implementation
Diffstat (limited to 'tpl/home.twig')
-rw-r--r--tpl/home.twig44
1 files changed, 32 insertions, 12 deletions
diff --git a/tpl/home.twig b/tpl/home.twig
index 8b602a25..7b5b88a2 100644
--- a/tpl/home.twig
+++ b/tpl/home.twig
@@ -1,21 +1,41 @@
1 <body class="light-style"> 1{% extends "layout.twig" %}
2 <header> 2
3 <h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1> 3{% block title %}Home{% endblock %}
4 </header>
5 <div id="main">
6{% block menu %} 4{% block menu %}
7 <ul id="links"> 5 <ul id="links">
8 <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li> 6 <li><a href="index.php" {% if view == 'home' %}class="current"{% endif %}>home</a></li>
9 <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li> 7 <li><a href="?view=fav" {% if view == 'fav' %}class="current"{% endif %}>favorites</a></li>
10 <li><a href="?view=archive" {if="$view == 'archive'"}class="current"{/if}>archive</a></li> 8 <li><a href="?view=archive" {% if view == 'archive' %}class="current"{% endif %}>archive</a></li>
11 <li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li> 9 <li><a href="?view=config" {% if view == 'config' %}class="current"{% endif %}>config</a></li>
12 <li><a href="?logout" title="Logout">logout</a></li> 10 <li><a href="?logout" title="Logout">logout</a></li>
13 </ul> 11 </ul>
14{% endblock %} 12{% endblock %}
15{% block precontent %} 13{% block precontent %}
16 <ul id="sort"> 14 <ul id="sort">
17 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{$view}', 'id');" title="by date desc" /></li> 15 <li><img src="img/up.png" onclick="sort_links('{{ view }}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{{ view }}', 'id');" title="by date desc" /></li>
18 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{$view}', 'td');" title="by title desc" /></li> 16 <li><img src="img/up.png" onclick="sort_links('{{ view }}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{{ view }}', 'td');" title="by title desc" /></li>
19 </ul> 17 </ul>
20{% endblock %} 18{% endblock %}
21 {include="messages"} \ No newline at end of file 19{% block content %}
20 <div id="content">
21 {% for entry in entries %}
22 <div id="entry-{{ entry.id|e }}" class="entrie mb2">
23 <span class="content">
24 <h2 class="h6-like">
25 <a href="index.php?&view=view&id={{ entry.id|e }}">{{ entry.title|e }}</a>
26 </h2>
27 <div class="tools">
28 <ul>
29 <li>
30 <a title="toggle mark as read" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" onclick="toggle_archive(this, {{ entry.id|e }})"><span></span></a></li>
31 <li><a title="toggle favorite" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" onclick="toggle_favorite(this, {{ entry.id|e }})"><span></span></a></li>
32 <li><form method="post" onsubmit="return confirm('Are you sure?')" style="display: inline;"><input type="hidden" name="token" id="token" value="{{ token }}" /><input type="hidden" id="action" name="action" value="delete" /><input type="hidden" id="view" name="view" value="{{ view }}" /><input type="hidden" id="id" name="id" value="{{ entry.id|e }}" /><input type="submit" class="delete" title="toggle delete" /></form>
33 </li>
34 </ul>
35 </div>
36 <div class="url">{{ entry.url|e }}</div>
37 </span>
38 </div>
39 {% endfor %}
40 </div>
41{% endblock %} \ No newline at end of file