diff options
-rw-r--r-- | .travis.yml | 15 | ||||
-rw-r--r-- | COPYING.md (renamed from COPYING) | 0 | ||||
-rw-r--r-- | CREDITS.md (renamed from CREDITS) | 0 | ||||
-rw-r--r-- | TODO.md | 16 | ||||
-rw-r--r-- | inc/poche/Poche.class.php | 43 | ||||
-rw-r--r-- | inc/poche/Url.class.php | 6 | ||||
-rw-r--r-- | inc/poche/define.inc.php | 6 | ||||
-rw-r--r-- | phpunit.xml.dist | 0 | ||||
-rw-r--r-- | tpl/config.twig | 29 | ||||
-rw-r--r-- | tpl/home.twig | 12 | ||||
-rw-r--r-- | tpl/layout.twig | 10 | ||||
-rw-r--r-- | tpl/view.twig | 30 |
12 files changed, 85 insertions, 82 deletions
diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9d6ba132..00000000 --- a/.travis.yml +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | language: php | ||
2 | |||
3 | php: | ||
4 | - 5.4 | ||
5 | |||
6 | branches: | ||
7 | only: | ||
8 | - dev | ||
9 | |||
10 | before_script: | ||
11 | - composer install | ||
12 | |||
13 | notifications: | ||
14 | email: | ||
15 | - nicolas.loeuillet@gmail.com \ No newline at end of file | ||
@@ -1,11 +1,9 @@ | |||
1 | # TODO | 1 | # TODO |
2 | 2 | ||
3 | pouvoir annuler la suppression | 3 | * pouvoir annuler la suppression |
4 | conventions codage ? phing ? vérifier error_log qui trainent | 4 | * conventions codage ? phing ? vérifier error_log qui trainent |
5 | phpDocumentor | 5 | * phpDocumentor |
6 | minifier css | 6 | * minifier css |
7 | revoir tous les css | 7 | * barre fixe d'admin sur la page d'un billet ? |
8 | barre fixe d'admin sur la page d'un billet ? | 8 | * revoir export (export vers pocket &cie ? ) |
9 | revoir export (export vers pocket &cie ? ) | 9 | * raccourcis clavier \ No newline at end of file |
10 | raccourcis clavier | ||
11 | date d'ajout d'un lien \ No newline at end of file | ||
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 4832f816..cb338766 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -364,13 +364,14 @@ class Poche | |||
364 | /** | 364 | /** |
365 | * import from Instapaper. poche needs a ./instapaper-export.html file | 365 | * import from Instapaper. poche needs a ./instapaper-export.html file |
366 | * @todo add the return value | 366 | * @todo add the return value |
367 | * @param string $targetFile the file used for importing | ||
367 | * @return boolean | 368 | * @return boolean |
368 | */ | 369 | */ |
369 | private function importFromInstapaper() | 370 | private function importFromInstapaper($targetFile) |
370 | { | 371 | { |
371 | # TODO gestion des articles favs | 372 | # TODO gestion des articles favs |
372 | $html = new simple_html_dom(); | 373 | $html = new simple_html_dom(); |
373 | $html->load_file('./instapaper-export.html'); | 374 | $html->load_file($targetFile); |
374 | Tools::logm('starting import from instapaper'); | 375 | Tools::logm('starting import from instapaper'); |
375 | 376 | ||
376 | $read = 0; | 377 | $read = 0; |
@@ -403,13 +404,14 @@ class Poche | |||
403 | /** | 404 | /** |
404 | * import from Pocket. poche needs a ./ril_export.html file | 405 | * import from Pocket. poche needs a ./ril_export.html file |
405 | * @todo add the return value | 406 | * @todo add the return value |
407 | * @param string $targetFile the file used for importing | ||
406 | * @return boolean | 408 | * @return boolean |
407 | */ | 409 | */ |
408 | private function importFromPocket() | 410 | private function importFromPocket($targetFile) |
409 | { | 411 | { |
410 | # TODO gestion des articles favs | 412 | # TODO gestion des articles favs |
411 | $html = new simple_html_dom(); | 413 | $html = new simple_html_dom(); |
412 | $html->load_file('./ril_export.html'); | 414 | $html->load_file($targetFile); |
413 | Tools::logm('starting import from pocket'); | 415 | Tools::logm('starting import from pocket'); |
414 | 416 | ||
415 | $read = 0; | 417 | $read = 0; |
@@ -442,12 +444,13 @@ class Poche | |||
442 | /** | 444 | /** |
443 | * import from Readability. poche needs a ./readability file | 445 | * import from Readability. poche needs a ./readability file |
444 | * @todo add the return value | 446 | * @todo add the return value |
447 | * @param string $targetFile the file used for importing | ||
445 | * @return boolean | 448 | * @return boolean |
446 | */ | 449 | */ |
447 | private function importFromReadability() | 450 | private function importFromReadability($targetFile) |
448 | { | 451 | { |
449 | # TODO gestion des articles lus / favs | 452 | # TODO gestion des articles lus / favs |
450 | $str_data = file_get_contents("./readability"); | 453 | $str_data = file_get_contents($targetFile); |
451 | $data = json_decode($str_data,true); | 454 | $data = json_decode($str_data,true); |
452 | Tools::logm('starting import from Readability'); | 455 | Tools::logm('starting import from Readability'); |
453 | $count = 0; | 456 | $count = 0; |
@@ -499,15 +502,31 @@ class Poche | |||
499 | */ | 502 | */ |
500 | public function import($from) | 503 | public function import($from) |
501 | { | 504 | { |
502 | if ($from == 'pocket') { | 505 | $providers = array( |
503 | return $this->importFromPocket(); | 506 | 'pocket' => 'importFromPocket', |
507 | 'readability' => 'importFromReadability', | ||
508 | 'instapaper' => 'importFromInstapaper' | ||
509 | ); | ||
510 | |||
511 | if (! isset($providers[$from])) { | ||
512 | $this->messages->add('e', _('Unknown import provider.')); | ||
513 | Tools::redirect(); | ||
504 | } | 514 | } |
505 | else if ($from == 'readability') { | 515 | |
506 | return $this->importFromReadability(); | 516 | $targetDefinition = 'IMPORT_' . strtoupper($from) . '_FILE'; |
517 | $targetFile = constant($targetDefinition); | ||
518 | |||
519 | if (! defined($targetDefinition)) { | ||
520 | $this->messages->add('e', _('Incomplete inc/poche/define.inc.php file, please define "' . $targetDefinition . '".')); | ||
521 | Tools::redirect(); | ||
507 | } | 522 | } |
508 | else if ($from == 'instapaper') { | 523 | |
509 | return $this->importFromInstapaper(); | 524 | if (! file_exists($targetFile)) { |
525 | $this->messages->add('e', _('Could not find required "' . $targetFile . '" import file.')); | ||
526 | Tools::redirect(); | ||
510 | } | 527 | } |
528 | |||
529 | $this->$providers[$from]($targetFile); | ||
511 | } | 530 | } |
512 | 531 | ||
513 | /** | 532 | /** |
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php index 3c74fb43..d7ee911f 100644 --- a/inc/poche/Url.class.php +++ b/inc/poche/Url.class.php | |||
@@ -27,9 +27,7 @@ class Url | |||
27 | 27 | ||
28 | public function isCorrect() | 28 | public function isCorrect() |
29 | { | 29 | { |
30 | $pattern = '|^(.*:)//([a-z\-.]+)(:[0-9]+)?(.*)$|i'; | 30 | return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE; |
31 | |||
32 | return preg_match($pattern, $this->url); | ||
33 | } | 31 | } |
34 | 32 | ||
35 | public function clean() | 33 | public function clean() |
@@ -73,7 +71,7 @@ class Url | |||
73 | if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") { | 71 | if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") { |
74 | $html = $tidy->value; | 72 | $html = $tidy->value; |
75 | } | 73 | } |
76 | } | 74 | } |
77 | 75 | ||
78 | $parameters = array(); | 76 | $parameters = array(); |
79 | if (isset($html) and strlen($html) > 0) | 77 | if (isset($html) and strlen($html) > 0) |
diff --git a/inc/poche/define.inc.php b/inc/poche/define.inc.php index 2154ce88..2d0a39ec 100644 --- a/inc/poche/define.inc.php +++ b/inc/poche/define.inc.php | |||
@@ -29,4 +29,8 @@ define ('TPL', __DIR__ . '/../../tpl'); | |||
29 | define ('LOCALE', __DIR__ . '/../../locale'); | 29 | define ('LOCALE', __DIR__ . '/../../locale'); |
30 | define ('CACHE', __DIR__ . '/../../cache'); | 30 | define ('CACHE', __DIR__ . '/../../cache'); |
31 | define ('PAGINATION', '10'); | 31 | define ('PAGINATION', '10'); |
32 | define ('THEME', 'light'); \ No newline at end of file | 32 | define ('THEME', 'light'); |
33 | |||
34 | define ('IMPORT_POCKET_FILE', './ril_export.html'); | ||
35 | define ('IMPORT_READABILITY_FILE', './readability'); | ||
36 | define ('IMPORT_INSTAPAPER_FILE', './instapaper-export.html'); \ No newline at end of file | ||
diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index e69de29b..00000000 --- a/phpunit.xml.dist +++ /dev/null | |||
diff --git a/tpl/config.twig b/tpl/config.twig index 8851c3dc..89d5bf84 100644 --- a/tpl/config.twig +++ b/tpl/config.twig | |||
@@ -11,24 +11,21 @@ | |||
11 | </ul> | 11 | </ul> |
12 | {% endblock %} | 12 | {% endblock %} |
13 | {% block content %} | 13 | {% block content %} |
14 | |||
15 | <h2>{% trans "Poching a link" %}</h2> | 14 | <h2>{% trans "Poching a link" %}</h2> |
16 | <p>You can poche a link by several methods: (<a href="http://www.inthepoche.com/?pages/Documentation" title="{% trans "read the documentation" %}">?</a>)</p> | 15 | <p>You can poche a link by several methods: (<a href="http://www.inthepoche.com/?pages/Documentation" title="{% trans "read the documentation" %}">?</a>)</p> |
17 | <p> | 16 | <ul> |
18 | <ul> | 17 | <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">download the extension</a></li> |
19 | <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">download the extension</a></li> | 18 | <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">download the extension</a></li> |
20 | <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">download the extension</a></li> | 19 | <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">download the application</a></li> |
21 | <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">download the application</a></li> | 20 | <li>bookmarklet: drag & drop this link to your bookmarks bar <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></li> |
22 | <li>bookmarklet: drag & drop this link to your bookmarks bar <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></li> | 21 | </ul> |
23 | </ul> | 22 | |
24 | </p> | ||
25 | <h2>{% trans "Updating poche" %}</h2> | 23 | <h2>{% trans "Updating poche" %}</h2> |
26 | <p><ul> | 24 | <ul> |
27 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> | 25 | <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li> |
28 | <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> | 26 | <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> |
29 | {% 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 %} | 27 | {% 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 %} |
30 | </ul> | 28 | </ul> |
31 | </p> | ||
32 | 29 | ||
33 | <h2>{% trans "Change your password" %}</h2> | 30 | <h2>{% trans "Change your password" %}</h2> |
34 | <form method="post" action="?config" name="loginform"> | 31 | <form method="post" action="?config" name="loginform"> |
@@ -52,11 +49,11 @@ | |||
52 | <h2>{% trans "Import" %}</h2> | 49 | <h2>{% trans "Import" %}</h2> |
53 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> | 50 | <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p> |
54 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> | 51 | <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p> |
55 | <p><ul> | 52 | <ul> |
56 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "ril_export.html" file on your server)</li> | 53 | <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "{{ defined('IMPORT_POCKET_FILE') ? constant('IMPORT_POCKET_FILE') ? 'INCORRECT CONFIGURATION' }}" file on your server)</li> |
57 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "readability" file on your server)</li> | 54 | <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "{{ defined('IMPORT_READABILITY_FILE') ? constant('IMPORT_READABILITY_FILE') ? 'INCORRECT CONFIGURATION' }}" file on your server)</li> |
58 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "instapaper-export.html" file on your server)</li> | 55 | <li><a href="./?import&from=instapaper">{% trans "import from Instapaper" %}</a> (you must have a "{{ defined('IMPORT_INSTAPAPER_FILE') ? constant('IMPORT_INSTAPAPER_FILE') ? 'INCORRECT CONFIGURATION' }}" file on your server)</li> |
59 | </ul></p> | 56 | </ul> |
60 | 57 | ||
61 | <h2>{% trans "Export your poche datas" %}</h2> | 58 | <h2>{% trans "Export your poche datas" %}</h2> |
62 | <p><a href="./?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your poche datas." %}</p> | 59 | <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..07ca231c 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig | |||
@@ -1,13 +1,15 @@ | |||
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"> |
9 | <meta charset="utf-8"> | 9 | <meta charset="utf-8"> |
10 | <!--[if IE]> | ||
10 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | 11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> |
12 | <![endif]--> | ||
11 | <title>{% block title %}{% endblock %} - poche</title> | 13 | <title>{% block title %}{% endblock %} - poche</title> |
12 | {% include '_head.twig' %} | 14 | {% include '_head.twig' %} |
13 | {% include '_bookmarklet.twig' %} | 15 | {% include '_bookmarklet.twig' %} |
diff --git a/tpl/view.twig b/tpl/view.twig index 99a98217..f78ac62e 100644 --- a/tpl/view.twig +++ b/tpl/view.twig | |||
@@ -5,34 +5,34 @@ | |||
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|url_encode}}%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|url_encode }}&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 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|e }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 13 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} |
14 | </ul> | 14 | </ul> |
15 | </div> | 15 | </div> |
16 | <header class="mbm"> | 16 | <header class="mbm"> |
17 | <h1>{{ entry.title|raw }}</h1> | 17 | <h1>{{ entry.title|raw }}</h1> |
18 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 18 | <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> |
19 | </header> | 19 | </header> |
20 | <article> | 20 | <article> |
21 | {{ content | raw }} | 21 | {{ content | raw }} |
22 | <div class="vieworiginal txtright small"><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}">{{ entry.url | e | getDomain }}</a></div> | 22 | <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> |
23 | </article> | 23 | </article> |
24 | <div class="tools"> | 24 | <div class="tools"> |
25 | <ul class="tools"> | 25 | <ul class="tools"> |
26 | <li><a href="./?" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> | 26 | <li><a href="./?" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> |
27 | <li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li> | 27 | <li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li> |
28 | <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 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> |
29 | <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 "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> |
30 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | 30 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> |
31 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title}}%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_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 %} |
32 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|e }}&body={{ entry.url|url_encode }} via @getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} | 32 | {% 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 %} |
33 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|e }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 33 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} |
34 | </ul> | 34 | </ul> |
35 | <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> | 35 | <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> |
36 | </div> | 36 | </div> |
37 | </div> | 37 | </div> |
38 | {% endblock %} \ No newline at end of file | 38 | {% endblock %} \ No newline at end of file |