diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-02 22:40:51 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-02 22:40:51 +0200 |
commit | a4565e88edbc8e3bd092a475469769c86a4c350c (patch) | |
tree | a6a3c935b03a23ff87575c8c315cf8ba78fe68c2 /tpl | |
parent | f6c9baab3efeec1d0efa151e276fc08d5b58f9e9 (diff) | |
download | wallabag-a4565e88edbc8e3bd092a475469769c86a4c350c.tar.gz wallabag-a4565e88edbc8e3bd092a475469769c86a4c350c.tar.zst wallabag-a4565e88edbc8e3bd092a475469769c86a4c350c.zip |
add Twig & refactor poche
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/home.html | 6 | ||||
-rw-r--r-- | tpl/install.twig | 28 | ||||
-rw-r--r-- | tpl/js.html | 36 | ||||
-rw-r--r-- | tpl/layout.twig | 58 | ||||
-rw-r--r-- | tpl/login.twig | 31 |
5 files changed, 139 insertions, 20 deletions
diff --git a/tpl/home.html b/tpl/home.html index 90e247f7..8b602a25 100644 --- a/tpl/home.html +++ b/tpl/home.html | |||
@@ -3,6 +3,7 @@ | |||
3 | <h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1> | 3 | <h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1> |
4 | </header> | 4 | </header> |
5 | <div id="main"> | 5 | <div id="main"> |
6 | {% block menu %} | ||
6 | <ul id="links"> | 7 | <ul id="links"> |
7 | <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li> | 8 | <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li> |
8 | <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li> | 9 | <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li> |
@@ -10,10 +11,11 @@ | |||
10 | <li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li> | 11 | <li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li> |
11 | <li><a href="?logout" title="Logout">logout</a></li> | 12 | <li><a href="?logout" title="Logout">logout</a></li> |
12 | </ul> | 13 | </ul> |
13 | {if condition="isset($entries)"} | 14 | {% endblock %} |
15 | {% block precontent %} | ||
14 | <ul id="sort"> | 16 | <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> | 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> |
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> | 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> |
17 | </ul> | 19 | </ul> |
18 | {/if} | 20 | {% endblock %} |
19 | {include="messages"} \ No newline at end of file | 21 | {include="messages"} \ No newline at end of file |
diff --git a/tpl/install.twig b/tpl/install.twig new file mode 100644 index 00000000..4342df2e --- /dev/null +++ b/tpl/install.twig | |||
@@ -0,0 +1,28 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %}Installation{% endblock %} | ||
3 | {% block content %} | ||
4 | <form method="post" action="?install" name="loginform"> | ||
5 | <fieldset class="w500p center"> | ||
6 | <h2 class="mbs txtcenter">{% trans "install your poche" %}</h2> | ||
7 | <p> | ||
8 | {% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://inthepoche.com/?pages/Documentation'>read the documentation on poche website</a>." %} | ||
9 | </p> | ||
10 | <div class="row"> | ||
11 | <label class="col w150p" for="login">{% trans "Login" %}</label> | ||
12 | <input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus /> | ||
13 | </div> | ||
14 | <div class="row"> | ||
15 | <label class="col w150p" for="password">{% trans "Password" %}</label> | ||
16 | <input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2"> | ||
17 | </div> | ||
18 | <div class="row"> | ||
19 | <label class="col w150p" for="password_repeat">{% trans "Repeat your password" %}</label> | ||
20 | <input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="Password" tabindex="3"> | ||
21 | </div> | ||
22 | <div class="row mts txtcenter"> | ||
23 | <button class="bouton" type="submit" tabindex="4">{% trans "Install" %}</button> | ||
24 | </div> | ||
25 | </fieldset> | ||
26 | <input type="hidden" name="token" value="{{ token }}"> | ||
27 | </form> | ||
28 | {% endblock %} \ No newline at end of file | ||
diff --git a/tpl/js.html b/tpl/js.html index a02212b0..3a51af6e 100644 --- a/tpl/js.html +++ b/tpl/js.html | |||
@@ -1,22 +1,22 @@ | |||
1 | <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script> | 1 | <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script> |
2 | <script type="text/javascript" src="js/poche.js"></script> | 2 | <script type="text/javascript" src="js/poche.js"></script> |
3 | 3 | ||
4 | {if="$load_all_js == '1'"} | 4 | {if="$load_all_js == '1'"} |
5 | <script type="text/javascript" src="js/jquery.masonry.min.js"></script> | 5 | <script type="text/javascript" src="js/jquery.masonry.min.js"></script> |
6 | <script type="text/javascript"> | 6 | <script type="text/javascript"> |
7 | $( window ).load( function() | 7 | $( window ).load( function() |
8 | { | 8 | { |
9 | var columns = 3, | 9 | var columns = 3, |
10 | setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; }; | 10 | setColumns = function() { columns = $( window ).width() > 640 ? 3 : $( window ).width() > 320 ? 2 : 1; }; |
11 | 11 | ||
12 | setColumns(); | 12 | setColumns(); |
13 | $( window ).resize( setColumns ); | 13 | $( window ).resize( setColumns ); |
14 | 14 | ||
15 | $( '#content' ).masonry( | 15 | $( '#content' ).masonry( |
16 | { | 16 | { |
17 | itemSelector: '.entrie', | 17 | itemSelector: '.entrie', |
18 | columnWidth: function( containerWidth ) { return containerWidth / columns; } | 18 | columnWidth: function( containerWidth ) { return containerWidth / columns; } |
19 | }); | ||
19 | }); | 20 | }); |
20 | }); | 21 | </script> |
21 | </script> | 22 | {/if} \ No newline at end of file |
22 | {/if} \ No newline at end of file | ||
diff --git a/tpl/layout.twig b/tpl/layout.twig new file mode 100644 index 00000000..c5f52bbd --- /dev/null +++ b/tpl/layout.twig | |||
@@ -0,0 +1,58 @@ | |||
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>{% block title %}{% endblock %} - poche</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> | ||
43 | <body class="light-style"> | ||
44 | <header> | ||
45 | <h1><a href="/"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1> | ||
46 | </header> | ||
47 | <div id="main"> | ||
48 | {% block menu %}{% endblock %} | ||
49 | {% block precontent %}{% endblock %} | ||
50 | {% block content %}{% endblock %} | ||
51 | {% block js %}{% endblock %} | ||
52 | </div> | ||
53 | <footer class="mr2 mt3 smaller"> | ||
54 | <p>powered by <a href="http://inthepoche.com">poche</a></p> | ||
55 | </footer> | ||
56 | |||
57 | </body> | ||
58 | </html> \ No newline at end of file | ||
diff --git a/tpl/login.twig b/tpl/login.twig new file mode 100644 index 00000000..390718b6 --- /dev/null +++ b/tpl/login.twig | |||
@@ -0,0 +1,31 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %}Login{% endblock %} | ||
3 | {% block content %} | ||
4 | <form method="post" action="?login" name="loginform"> | ||
5 | <fieldset class="w500p center"> | ||
6 | <h2 class="mbs txtcenter">{% trans "login to your poche" %}</h2> | ||
7 | {% if demo == 1 %}<p>{% trans "you are in demo mode, some features may be disabled." %}</p>{% endif %} | ||
8 | <div class="row"> | ||
9 | <label class="col w150p" for="login">{% trans "Login" %}</label> | ||
10 | <input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus {% if demo == 1 %}value="poche"{% endif %} /> | ||
11 | </div> | ||
12 | |||
13 | <div class="row"> | ||
14 | <label class="col w150p" for="password">{% trans "Password" %}</label> | ||
15 | <input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2" {% if demo == 1 %}value="poche"{% endif %} /> | ||
16 | </div> | ||
17 | <div class="row"> | ||
18 | <label class="col w150p">{% trans "Stay signed in" %}</label> | ||
19 | <div class="col"> | ||
20 | <input type="checkbox" name="longlastingsession" tabindex="3"> | ||
21 | <small class="inbl">(Do not check on public computers)</small> | ||
22 | </div> | ||
23 | </div> | ||
24 | <div class="row mts txtcenter"> | ||
25 | <button class="bouton" type="submit" tabindex="4">{% trans "Sign in" %}</button> | ||
26 | </div> | ||
27 | </fieldset> | ||
28 | <input type="hidden" name="returnurl" value="{{ referer }}"> | ||
29 | <input type="hidden" name="token" value="{{ token }}"> | ||
30 | </form> | ||
31 | {% endblock %} \ No newline at end of file | ||