aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:57:35 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:57:35 +0200
commit2b840e0cfb63a453bea67a98541f3df9c273c5f5 (patch)
tree8c5aa51ba6481f29f9734373d6abd55917d1a671 /tpl
parent8cbb2a88024969f7efd90f8053f3b0805fa2f8fa (diff)
downloadwallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.tar.gz
wallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.tar.zst
wallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.zip
twig implementation
Diffstat (limited to 'tpl')
-rw-r--r--tpl/config.twig (renamed from tpl/config.html)16
-rw-r--r--tpl/footer.html7
-rw-r--r--tpl/head.html42
-rw-r--r--tpl/home.twig45
-rw-r--r--tpl/install.twig2
-rw-r--r--tpl/js.html22
-rw-r--r--tpl/login.twig2
7 files changed, 50 insertions, 86 deletions
diff --git a/tpl/config.html b/tpl/config.twig
index 2c7df4f7..10c481de 100644
--- a/tpl/config.html
+++ b/tpl/config.twig
@@ -1,3 +1,16 @@
1{% extends "layout.twig" %}
2
3{% block title %}{% trans "config" %}{% endblock %}
4{% block menu %}
5 <ul id="links">
6 <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li>
7 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
8 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
9 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
10 <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
11 </ul>
12{% endblock %}
13{% block content %}
1 <div id="content"> 14 <div id="content">
2 <h2>Bookmarklet</h2> 15 <h2>Bookmarklet</h2>
3 <p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p> 16 <p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
@@ -24,4 +37,5 @@
24 </form> 37 </form>
25 <h2>Export</h2> 38 <h2>Export</h2>
26 <p><a href="?view=export" target="_blank">Click here</a> to export your poche datas.</p> 39 <p><a href="?view=export" target="_blank">Click here</a> to export your poche datas.</p>
27 </div> \ No newline at end of file 40 </div>
41{% endblock %} \ No newline at end of file
diff --git a/tpl/footer.html b/tpl/footer.html
deleted file mode 100644
index b8bd755c..00000000
--- a/tpl/footer.html
+++ /dev/null
@@ -1,7 +0,0 @@
1 </div>
2 <footer class="mr2 mt3 smaller">
3 <p>powered by <a href="http://inthepoche.com">poche</a><br />follow us on <a href="https://twitter.com/getpoche" title="follow us on twitter">twitter</a></p>
4 </footer>
5
6 </body>
7</html> \ No newline at end of file
diff --git a/tpl/head.html b/tpl/head.html
deleted file mode 100644
index dfb12788..00000000
--- a/tpl/head.html
+++ /dev/null
@@ -1,42 +0,0 @@
1<!DOCTYPE html>
2<!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]-->
3<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
4<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
6<html>
7 <head>
8 <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
9 <meta charset="utf-8">
10 <meta http-equiv="X-UA-Compatible" content="IE=10">
11 <title>{$title}</title>
12 <link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico" />
13 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="./img/apple-touch-icon-144x144-precomposed.png">
14 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="./img/apple-touch-icon-72x72-precomposed.png">
15 <link rel="apple-touch-icon-precomposed" href="./img/apple-touch-icon-precomposed.png">
16 <link rel="stylesheet" href="./css/knacss.css" media="all">
17 <link rel="stylesheet" href="./css/style.css" media="all">
18 <!-- Light Theme -->
19 <link rel="stylesheet" href="./css/style-light.css" media="all" title="light-style">
20 <!-- Dark Theme -->
21 <link rel="alternate stylesheet" href="./css/style-dark.css" media="all" title="dark-style">
22 <script>
23 top["bookmarklet-url@inthepoche.com"] = ''
24 +'<!DOCTYPE html>'
25 +'<html>'
26 +'<head>'
27 +'<title>poche it !</title>'
28 +'<link rel="icon" href="{$poche_url}img/favicon.ico" />'
29 +'</head>'
30 +'<body>'
31 +'<script>'
32 +'window.onload=function(){'
33 +'window.setTimeout(function(){'
34 +'history.back();'
35 +'},250);'
36 +'};'
37 +'</scr'+'ipt>'
38 +'</body>'
39 +'</html>'
40 ;
41 </script>
42 </head> \ No newline at end of file
diff --git a/tpl/home.twig b/tpl/home.twig
index 7b5b88a2..c79d4276 100644
--- a/tpl/home.twig
+++ b/tpl/home.twig
@@ -1,19 +1,18 @@
1{% extends "layout.twig" %} 1{% extends "layout.twig" %}
2 2{% block title %}{% trans "home" %}{% endblock %}
3{% block title %}Home{% endblock %}
4{% block menu %} 3{% block menu %}
5 <ul id="links"> 4 <ul id="links">
6 <li><a href="index.php" {% if view == 'home' %}class="current"{% endif %}>home</a></li> 5 <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li>
7 <li><a href="?view=fav" {% if view == 'fav' %}class="current"{% endif %}>favorites</a></li> 6 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
8 <li><a href="?view=archive" {% if view == 'archive' %}class="current"{% endif %}>archive</a></li> 7 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
9 <li><a href="?view=config" {% if view == 'config' %}class="current"{% endif %}>config</a></li> 8 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
10 <li><a href="?logout" title="Logout">logout</a></li> 9 <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
11 </ul> 10 </ul>
12{% endblock %} 11{% endblock %}
13{% block precontent %} 12{% block precontent %}
14 <ul id="sort"> 13 <ul id="sort">
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> 14 <li><img src="img/up.png" onclick="sort_links('{{ view }}', 'ia');" title="{% trans "by date asc" %}" /> {% trans "by date" %} <img src="img/down.png" onclick="sort_links('{{ view }}', 'id');" title="{% trans "by date 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> 15 <li><img src="img/up.png" onclick="sort_links('{{ view }}', 'ta');" title="{% trans "by title asc" %}" /> {% trans "by title" %} <img src="img/down.png" onclick="sort_links('{{ view }}', 'td');" title="{% trans "by title desc" %}" /></li>
17 </ul> 16 </ul>
18{% endblock %} 17{% endblock %}
19{% block content %} 18{% block content %}
@@ -27,9 +26,9 @@
27 <div class="tools"> 26 <div class="tools">
28 <ul> 27 <ul>
29 <li> 28 <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> 29 <a title="{% trans "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> 30 <li><a title="{% trans "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> 31 <li><form method="post" onsubmit="return confirm('{% trans "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="{% trans "toggle delete" %}" /></form>
33 </li> 32 </li>
34 </ul> 33 </ul>
35 </div> 34 </div>
@@ -38,4 +37,26 @@
38 </div> 37 </div>
39 {% endfor %} 38 {% endfor %}
40 </div> 39 </div>
40{% endblock %}
41
42{% block js %}
43 <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
44 <script type="text/javascript" src="js/poche.js"></script>
45 <script type="text/javascript" src="js/jquery.masonry.min.js"></script>
46 <script type="text/javascript">
47 $( window ).load( function()
48 {
49 var columns = 3,
50 setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; };
51
52 setColumns();
53 $( window ).resize( setColumns );
54
55 $( '#content' ).masonry(
56 {
57 itemSelector: '.entrie',
58 columnWidth: function( containerWidth ) { return containerWidth / columns; }
59 });
60 });
61 </script>
41{% endblock %} \ No newline at end of file 62{% endblock %} \ No newline at end of file
diff --git a/tpl/install.twig b/tpl/install.twig
index 4342df2e..8bcede0d 100644
--- a/tpl/install.twig
+++ b/tpl/install.twig
@@ -1,5 +1,5 @@
1{% extends "layout.twig" %} 1{% extends "layout.twig" %}
2{% block title %}Installation{% endblock %} 2{% block title %}{% trans "installation" %}{% endblock %}
3{% block content %} 3{% block content %}
4 <form method="post" action="?install" name="loginform"> 4 <form method="post" action="?install" name="loginform">
5 <fieldset class="w500p center"> 5 <fieldset class="w500p center">
diff --git a/tpl/js.html b/tpl/js.html
deleted file mode 100644
index 3a51af6e..00000000
--- a/tpl/js.html
+++ /dev/null
@@ -1,22 +0,0 @@
1 <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
2 <script type="text/javascript" src="js/poche.js"></script>
3
4 {if="$load_all_js == '1'"}
5 <script type="text/javascript" src="js/jquery.masonry.min.js"></script>
6 <script type="text/javascript">
7 $( window ).load( function()
8 {
9 var columns = 3,
10 setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; };
11
12 setColumns();
13 $( window ).resize( setColumns );
14
15 $( '#content' ).masonry(
16 {
17 itemSelector: '.entrie',
18 columnWidth: function( containerWidth ) { return containerWidth / columns; }
19 });
20 });
21 </script>
22 {/if} \ No newline at end of file
diff --git a/tpl/login.twig b/tpl/login.twig
index c95a5f02..d1080530 100644
--- a/tpl/login.twig
+++ b/tpl/login.twig
@@ -1,6 +1,6 @@
1{% extends "layout.twig" %} 1{% extends "layout.twig" %}
2 2
3{% block title %}Login{% endblock %} 3{% block title %}{% trans "login to your poche" %}{% endblock %}
4{% block messages %} 4{% block messages %}
5 <div class="messages"> 5 <div class="messages">
6 <ul> 6 <ul>