aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-15 09:38:41 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-15 09:38:41 +0200
commit8046748b424f95a92ab599ecc973f57eb05246ce (patch)
treee3a2a66569337662a58cf8eba71125f7154c799a /tpl
parent3e188a7c8de484a57c05126072f76860c7746b39 (diff)
downloadwallabag-8046748b424f95a92ab599ecc973f57eb05246ce.tar.gz
wallabag-8046748b424f95a92ab599ecc973f57eb05246ce.tar.zst
wallabag-8046748b424f95a92ab599ecc973f57eb05246ce.zip
découpage des vues dans plusieurs fichiers tpl
Diffstat (limited to 'tpl')
-rwxr-xr-xtpl/footer.html4
-rw-r--r--tpl/head.html18
-rw-r--r--tpl/home.html33
-rw-r--r--tpl/js.html22
-rwxr-xr-xtpl/view.html29
5 files changed, 103 insertions, 3 deletions
diff --git a/tpl/footer.html b/tpl/footer.html
index 3328a8a4..d225acbe 100755
--- a/tpl/footer.html
+++ b/tpl/footer.html
@@ -1,5 +1,3 @@
1 <footer class="mr2 mt3 smaller"> 1 <footer class="mr2 mt3 smaller">
2 <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> 2 <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>
3 </footer> 3 </footer> \ No newline at end of file
4 <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
5 <script type="text/javascript" src="js/poche.js"></script> \ No newline at end of file
diff --git a/tpl/head.html b/tpl/head.html
new file mode 100644
index 00000000..66150d8f
--- /dev/null
+++ b/tpl/head.html
@@ -0,0 +1,18 @@
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 </head> \ No newline at end of file
diff --git a/tpl/home.html b/tpl/home.html
new file mode 100644
index 00000000..70a35a7f
--- /dev/null
+++ b/tpl/home.html
@@ -0,0 +1,33 @@
1{include="head"}
2 <body>
3 <header>
4 <h1><img src="./img/logo.png" alt="logo poche" />poche</h1>
5 </header>
6 <div id="main">
7 <ul id="links">
8 <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li>
9 <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li>
10 <li><a href="?view=archive" {if="$view == 'archive'"}class="current"{/if}>archive</a></li>
11 <li><a style="cursor: move" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li>
12 </ul>
13 <div id="content">
14 {loop="entries"}
15 <div id="entry-{$value.id}" class="entrie mb2">
16 <span class="content">
17 <h2 class="h6-like">
18 <a href="view.php?id={$value.id}">{$value.title}</a>
19 </h2>
20 <div class="tools">
21 <a title="toggle mark as read" class="tool archive {if="$value.is_read == '0'"}archive-off{/if}" onclick="toggle_archive(this, {$value.id})"><span></span></a>
22 <a title="toggle favorite" class="tool fav {if="$value.is_fav == '0'"}fav-off{/if}" onclick="toggle_favorite(this, {$value.id})"><span></span></a>
23 <a href="?action=delete&id={$value.id}" title="toggle delete" onclick="return confirm('Are you sure?')" class="tool delete"><span></span></a>
24 </div>
25 </span>
26 </div>
27 {/loop}
28 </div>
29 </div>
30 {include="footer"}
31 {include="js"}
32 </body>
33</html>
diff --git a/tpl/js.html b/tpl/js.html
new file mode 100644
index 00000000..a02212b0
--- /dev/null
+++ b/tpl/js.html
@@ -0,0 +1,22 @@
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/view.html b/tpl/view.html
new file mode 100755
index 00000000..1e057889
--- /dev/null
+++ b/tpl/view.html
@@ -0,0 +1,29 @@
1{include="head"}
2 <body class="article">
3 <div id="article" class="w600p">
4 <div class="backhome">
5 <a href="index.php" title="back to home">&larr;</a>
6 </div>
7 <div class="tools">
8 <a title="toggle mark as read" class="tool archive {if="$is_read == 0"}archive-off{/if}" onclick="toggle_archive(this, {$id}, 1)"><span></span></a>
9 <a title="toggle favorite" class="tool fav {if="$is_fav == 0"}fav-off{/if}" onclick="toggle_favorite(this, {$id})"><span></span></a>
10 <a href="index.php?action=delete&id={$id}" title="toggle delete" onclick="return confirm('Are you sure?')" class="tool delete"><span></span></a>
11 </div>
12 <header class="mbm">
13 <h1><a href="{$url}">{$title}</a></h1>
14 <div class="vieworiginal txtright small"><a href="{$url}" target="_blank" title="original : {$title}">view original</a></div>
15 </header>
16 <article>
17 <div id="readityourselfcontent">
18 {$content}
19 </div>
20 </article>
21 <div class="vieworiginal txtright small"><a href="{$url}" target="_blank" title="original : {$title}">view original</a></div>
22 <div class="backhome">
23 <a href="index.php" title="back to home">&larr;</a>
24 </div>
25 </div>
26 {include="footer"}
27 {include="js"}
28 </body>
29</html>