diff options
author | nicofrand <nicofrand@gmail.com> | 2013-08-23 22:38:14 +0200 |
---|---|---|
committer | nicofrand <nicofrand@gmail.com> | 2013-08-23 22:38:14 +0200 |
commit | 258d7032bbc0608cffd00a42fff50ea99f59ff23 (patch) | |
tree | 6ac29e5139fb45e3726f6252176776d0eeaaf0a0 | |
parent | b548b2192c333fa3b9304d6a1a0aa8dcf7e8e271 (diff) | |
download | wallabag-258d7032bbc0608cffd00a42fff50ea99f59ff23.tar.gz wallabag-258d7032bbc0608cffd00a42fff50ea99f59ff23.tar.zst wallabag-258d7032bbc0608cffd00a42fff50ea99f59ff23.zip |
Clean up the templates markup
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | tpl/config.twig | 15 | ||||
-rw-r--r-- | tpl/home.twig | 12 | ||||
-rw-r--r-- | tpl/layout.twig | 8 | ||||
-rw-r--r-- | tpl/view.twig | 26 |
5 files changed, 31 insertions, 33 deletions
@@ -5,5 +5,4 @@ composer.phar | |||
5 | db/poche.sqlite | 5 | db/poche.sqlite |
6 | output | 6 | output |
7 | phpdoc* | 7 | phpdoc* |
8 | inc/poche/myconfig.inc.php | 8 | inc/poche/myconfig.inc.php \ No newline at end of file |
9 | install/* \ No newline at end of file | ||
diff --git a/tpl/config.twig b/tpl/config.twig index 5324cda7..9f2fe5a4 100644 --- a/tpl/config.twig +++ b/tpl/config.twig | |||
@@ -14,15 +14,14 @@ | |||
14 | <h2>{% trans "Bookmarklet" %}</h2> | 14 | <h2>{% trans "Bookmarklet" %}</h2> |
15 | <p>{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a>.</p> | 15 | <p>{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a>.</p> |
16 | <p>{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}</p> | 16 | <p>{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}</p> |
17 | <p class="txtcenter"><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white; padding: 5px;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></p> | 17 | <p class="txtcenter"><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white; padding: 5px;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></p> |
18 | 18 | ||
19 | <h2>{% trans "Updating poche" %}</h2> | 19 | <h2>{% trans "Updating poche" %}</h2> |
20 | <p><ul> | 20 | <ul> |
21 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> | 21 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> |
22 | <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> | 22 | <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li> |
23 | {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %} | 23 | {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %} |
24 | </ul> | 24 | </ul> |
25 | </p> | ||
26 | 25 | ||
27 | <h2>{% trans "Change your password" %}</h2> | 26 | <h2>{% trans "Change your password" %}</h2> |
28 | <form method="post" action="?config" name="loginform"> | 27 | <form method="post" action="?config" name="loginform"> |
@@ -46,11 +45,11 @@ | |||
46 | <h2>{% trans "Import" %}</h2> | 45 | <h2>{% trans "Import" %}</h2> |
47 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> | 46 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> |
48 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> | 47 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> |
49 | <p><ul> | 48 | <ul> |
50 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li> | 49 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li> |
51 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "readability" file on your server)</li> | 50 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "readability" file on your server)</li> |
52 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "instapaper-export.html" file on your server)</li> | 51 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "instapaper-export.html" file on your server)</li> |
53 | </ul></p> | 52 | </ul> |
54 | 53 | ||
55 | <h2>{% trans "Export your poche datas" %}</h2> | 54 | <h2>{% trans "Export your poche datas" %}</h2> |
56 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> | 55 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> |
diff --git a/tpl/home.twig b/tpl/home.twig index 21910ae8..a2fa9a93 100644 --- a/tpl/home.twig +++ b/tpl/home.twig | |||
@@ -5,19 +5,19 @@ | |||
5 | {% endblock %} | 5 | {% endblock %} |
6 | {% block precontent %} | 6 | {% block precontent %} |
7 | <ul id="sort"> | 7 | <ul id="sort"> |
8 | <li><a href="./?sort=ia&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li> | 8 | <li><a href="./?sort=ia&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li> |
9 | <li><a href="./?sort=ta&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li> | 9 | <li><a href="./?sort=ta&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li> |
10 | </ul> | 10 | </ul> |
11 | {% endblock %} | 11 | {% endblock %} |
12 | {% block content %} | 12 | {% block content %} |
13 | {{ page_links | raw }} | 13 | {{ page_links | raw }} |
14 | {% for entry in entries %} | 14 | {% for entry in entries %} |
15 | <div id="entry-{{ entry.id|e }}" class="entrie"> | 15 | <div id="entry-{{ entry.id|e }}" class="entrie"> |
16 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> | 16 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> |
17 | <ul class="tools"> | 17 | <ul class="tools"> |
18 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | 18 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> |
19 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | 19 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> |
20 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | 20 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> |
21 | <li class="reading-time">{{ entry.content| getReadingTime }} min</li> | 21 | <li class="reading-time">{{ entry.content| getReadingTime }} min</li> |
22 | </ul> | 22 | </ul> |
23 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | 23 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> |
diff --git a/tpl/layout.twig b/tpl/layout.twig index b86983da..7084a215 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig | |||
@@ -1,8 +1,8 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]--> | 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]--> | 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]--> | 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]--> | 5 | <!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> |
6 | <html> | 6 | <html> |
7 | <head> | 7 | <head> |
8 | <meta name="viewport" content="initial-scale=1.0"> | 8 | <meta name="viewport" content="initial-scale=1.0"> |
diff --git a/tpl/view.twig b/tpl/view.twig index 82d1fd2a..4dee38c8 100644 --- a/tpl/view.twig +++ b/tpl/view.twig | |||
@@ -5,32 +5,32 @@ | |||
5 | <div class="tools"> | 5 | <div class="tools"> |
6 | <ul class="tools"> | 6 | <ul class="tools"> |
7 | <li><a href="./" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> | 7 | <li><a href="./" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> |
8 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | 8 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> |
9 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | 9 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> |
10 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | 10 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> |
11 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%20{{ entry.url|e }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} | 11 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} |
12 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|e }} via @getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} | 12 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} |
13 | </ul> | 13 | </ul> |
14 | </div> | 14 | </div> |
15 | <header class="mbm"> | 15 | <header class="mbm"> |
16 | <h1>{{ entry.title|raw }}</h1> | 16 | <h1>{{ entry.title|raw }}</h1> |
17 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 17 | <div class="vieworiginal txtright small"><a href="{{ entry.url|url_encode }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> |
18 | </header> | 18 | </header> |
19 | <article> | 19 | <article> |
20 | {{ content | raw }} | 20 | {{ content | raw }} |
21 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 21 | <div class="vieworiginal txtright small"><a href="{{ entry.url|url_encode }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> |
22 | </article> | 22 | </article> |
23 | <div class="tools"> | 23 | <div class="tools"> |
24 | <ul class="tools"> | 24 | <ul class="tools"> |
25 | <li><a href="./?" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> | 25 | <li><a href="./?" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> |
26 | <li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li> | 26 | <li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li> |
27 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | 27 | <li><a title="{% trans "toggle mark as read" %}" class="tool archive {% if entry.is_read == 0 %}archive-off{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> |
28 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | 28 | <li><a title="{% trans "toggle favorite" %}" class="tool fav {% if entry.is_fav == 0 %}fav-off{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> |
29 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | 29 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> |
30 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%20{{ entry.url|e }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} | 30 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} |
31 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|e }} via @getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} | 31 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} |
32 | </ul> | 32 | </ul> |
33 | <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong display in poche&body={{ entry.url|e }}">{% trans "contact us by mail" %}</a></p> | 33 | <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p> |
34 | </div> | 34 | </div> |
35 | </div> | 35 | </div> |
36 | {% endblock %} \ No newline at end of file | 36 | {% endblock %} \ No newline at end of file |