aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-18 20:01:56 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-18 20:01:56 +0200
commit143f550ba6bee8c13ce80a753fe6f15a20a551f1 (patch)
tree26ff1bb46df5ad5c1dbf711fb323a7659a715345
parent5d49f06220d3a8f1c731a6cea7f39fd71e8c774d (diff)
parent729c89aec41c7f53411deb43389e2b775a29d073 (diff)
downloadwallabag-143f550ba6bee8c13ce80a753fe6f15a20a551f1.tar.gz
wallabag-143f550ba6bee8c13ce80a753fe6f15a20a551f1.tar.zst
wallabag-143f550ba6bee8c13ce80a753fe6f15a20a551f1.zip
Merge pull request #1814 from wallabag/dev
Wallabag 1.9.2
-rw-r--r--inc/3rdparty/libraries/PHPePub/Zip.php2
-rw-r--r--inc/3rdparty/site_config/standard/aclu.org.txt5
-rw-r--r--inc/3rdparty/site_config/standard/bez.es.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/blog.cloudflare.com.txt7
-rw-r--r--inc/3rdparty/site_config/standard/caffereggio.net.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/chronicle.com.txt15
-rw-r--r--inc/3rdparty/site_config/standard/deia.com.txt4
-rw-r--r--inc/3rdparty/site_config/standard/diagonalperiodico.net.txt4
-rw-r--r--inc/3rdparty/site_config/standard/esglobal.org.txt3
-rw-r--r--inc/3rdparty/site_config/standard/lawfareblog.com.txt4
-rw-r--r--inc/3rdparty/site_config/standard/letraslibres.com.txt3
-rw-r--r--inc/3rdparty/site_config/standard/naiz.eus.txt4
-rw-r--r--inc/3rdparty/site_config/standard/pieria.co.uk.txt3
-rw-r--r--inc/3rdparty/site_config/standard/popehat.com.txt6
-rw-r--r--inc/3rdparty/site_config/standard/rasgolatente.es.txt6
-rw-r--r--inc/3rdparty/site_config/standard/thenews.coop.txt3
-rw-r--r--inc/3rdparty/site_config/standard/timeshighereducation.com.txt3
-rw-r--r--inc/3rdparty/site_config/standard/wired.de.txt8
-rwxr-xr-xinc/poche/Poche.class.php4
-rwxr-xr-xinc/poche/Tools.class.php23
-rwxr-xr-xinstall/index.php2
-rwxr-xr-xthemes/baggy/_head.twig1
-rwxr-xr-xthemes/baggy/css/messages.css23
-rwxr-xr-xthemes/baggy/home.twig2
-rwxr-xr-xthemes/baggy/view.twig9
-rwxr-xr-xthemes/default/_head.twig1
-rw-r--r--themes/default/_messages.twig7
-rwxr-xr-xthemes/default/home.twig2
-rwxr-xr-xthemes/default/view.twig8
29 files changed, 129 insertions, 41 deletions
diff --git a/inc/3rdparty/libraries/PHPePub/Zip.php b/inc/3rdparty/libraries/PHPePub/Zip.php
index 01e03566..92e78e70 100644
--- a/inc/3rdparty/libraries/PHPePub/Zip.php
+++ b/inc/3rdparty/libraries/PHPePub/Zip.php
@@ -569,7 +569,7 @@ class Zip {
569 if ($inline) { 569 if ($inline) {
570 $cd .= "inline"; 570 $cd .= "inline";
571 } else{ 571 } else{
572 $cd .= "attached"; 572 $cd .= "attachment";
573 } 573 }
574 if ($fileName) { 574 if ($fileName) {
575 $cd .= '; filename="' . $fileName . '"'; 575 $cd .= '; filename="' . $fileName . '"';
diff --git a/inc/3rdparty/site_config/standard/aclu.org.txt b/inc/3rdparty/site_config/standard/aclu.org.txt
new file mode 100644
index 00000000..74236e2d
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/aclu.org.txt
@@ -0,0 +1,5 @@
1body: //div[@class='panel-panel panel-main-3 content-column']
2title: //div[@class='panel-pane pane-node-title']
3date: //div[@class='updated-date']
4
5test_url: https://www.aclu.org/blog/free-future/chinas-nightmarish-citizen-scores-are-warning-americans
diff --git a/inc/3rdparty/site_config/standard/bez.es.txt b/inc/3rdparty/site_config/standard/bez.es.txt
new file mode 100644
index 00000000..cab7c6f7
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/bez.es.txt
@@ -0,0 +1,5 @@
1body: //div[@class='text_art']
2strip: //div[@class='cab_datos_opinion']
3strip: //div[@class='sumario2_left']
4
5test_url: http://www.bez.es/382758623/otros-fracasos-empresas.html
diff --git a/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt b/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt
index db80a35f..2f9a5a2f 100755
--- a/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt
+++ b/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt
@@ -1,9 +1,10 @@
1# Instapaper gets this back to front and only gets the blog title instead of the article title. 1# Instapaper gets this back to front and only gets the blog title instead of the article title.
2title: substring-before(//title, '-') 2title: //div[@class='title']
3 3
4author: //a[ contains(@href, '/people') ] 4author: //a[ contains(@href, '/people') ]
5 5
6body: //div[ @class='post' ] 6body: //div[ @class='post-content' ]
7 7
8# Date is impossible to retrieve since they use those stupid "fuzzy" dates, inserted through javascript, at posterous. 8# Date is impossible to retrieve since they use those stupid "fuzzy" dates, inserted through javascript, at posterous.
9test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n \ No newline at end of file 9test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n
10test_url: https://blog.cloudflare.com/sha-1-deprecation-no-browser-left-behind
diff --git a/inc/3rdparty/site_config/standard/caffereggio.net.txt b/inc/3rdparty/site_config/standard/caffereggio.net.txt
new file mode 100644
index 00000000..08e1f05a
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/caffereggio.net.txt
@@ -0,0 +1,3 @@
1body: //div[@class="pf-content"]
2
3test_url: http://www.caffereggio.net/2016/01/16/115327/
diff --git a/inc/3rdparty/site_config/standard/chronicle.com.txt b/inc/3rdparty/site_config/standard/chronicle.com.txt
index e86d3eca..227a03c7 100755
--- a/inc/3rdparty/site_config/standard/chronicle.com.txt
+++ b/inc/3rdparty/site_config/standard/chronicle.com.txt
@@ -1,17 +1,10 @@
1title: //h1[contains(@class, "entry-title")] 1title: //h1[contains(@class, "entry-title")]
2author: //p[contains(@class, "byline")] 2author: //p[contains(@class, "byline")]
3 3
4# blog articles (chronicle.com/blogs/*)
5body: //div[contains(@class, "abstract")]
6date: //p[contains(@class, "time")]
7
8# all (?) other articles 4# all (?) other articles
9body: //div[@id="article-body"] 5body: //div[@class="content-item__story"]
10date: //p[contains(@class, "dateline")] 6date: //p[contains(@class, "dateline")]
11 7
12# remove sidebars containing images (I assume this is desired for Instapaper) 8# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper $
13strip: //div[@id="related"] 9test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/
14strip: //div[contains(@class, "image")] 10test_url: http://chronicle.com/blogs/wiredcampus/university-run-boot-camps-offer-students-marketable-skills-but-not-course-credit/57494
15
16# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper will display that with some crap above and below. thank goodness for that bookmarklet
17test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/deia.com.txt b/inc/3rdparty/site_config/standard/deia.com.txt
new file mode 100644
index 00000000..d2f78239
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/deia.com.txt
@@ -0,0 +1,4 @@
1body: //div[@class='widget full_article']
2strip: //div[@class='Herramientas']
3
4test_url: http://www.deia.com/2015/10/03/politica/euskadi/el-envilecimiento-de-la-politica-y-de-los-medios-de-comunicacion
diff --git a/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt b/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt
new file mode 100644
index 00000000..f0681bac
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt
@@ -0,0 +1,4 @@
1body: //div[@class='field__items']
2title: //div[@class='art_titulo']
3
4test_url: https://www.diagonalperiodico.net/global/27947-cuanto-mas-tiempo-nos-aferremos-este-sistema-peor-y-menores-seran-nuestras-opciones
diff --git a/inc/3rdparty/site_config/standard/esglobal.org.txt b/inc/3rdparty/site_config/standard/esglobal.org.txt
new file mode 100644
index 00000000..6408f441
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/esglobal.org.txt
@@ -0,0 +1,3 @@
1body: //div[@class='blog-content']
2
3test_url: http://www.esglobal.org/el-caos-en-el-este-los-socios-de-la-ue-necesitan-que-se-les-preste-atencion/
diff --git a/inc/3rdparty/site_config/standard/lawfareblog.com.txt b/inc/3rdparty/site_config/standard/lawfareblog.com.txt
new file mode 100644
index 00000000..49d858a7
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/lawfareblog.com.txt
@@ -0,0 +1,4 @@
1body: //div[@class='field-items']
2title: //div[@class='title']
3
4test_url: https://lawfareblog.com/limits-panopticon
diff --git a/inc/3rdparty/site_config/standard/letraslibres.com.txt b/inc/3rdparty/site_config/standard/letraslibres.com.txt
new file mode 100644
index 00000000..cf271bca
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/letraslibres.com.txt
@@ -0,0 +1,3 @@
1single_page_link: concat(link[@rel="canonical"], "?page=full")
2
3test_url: http://www.letraslibres.com/revista/dossier/quien-manda-en-europa
diff --git a/inc/3rdparty/site_config/standard/naiz.eus.txt b/inc/3rdparty/site_config/standard/naiz.eus.txt
new file mode 100644
index 00000000..9e48333a
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/naiz.eus.txt
@@ -0,0 +1,4 @@
1body: //div[contains(@class,'widget full_article')]
2
3test_url: http://www.naiz.eus/eu/actualidad/noticia/20151002/adegi-afirma-que-los-jovenes-viven-una-vida-muy-comoda-y-no-tienen-hambre-para-emprender#
4test_url: http://www.naiz.eus/eu/actualidad/noticia/20151012/podemos-euskadi-critica-que-otegi-y-sus-companeros-quieran-pasar-por-grandes-pacifistas
diff --git a/inc/3rdparty/site_config/standard/pieria.co.uk.txt b/inc/3rdparty/site_config/standard/pieria.co.uk.txt
new file mode 100644
index 00000000..31f2c84a
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/pieria.co.uk.txt
@@ -0,0 +1,3 @@
1body: //div[@id='article']
2
3test_url: http://www.pieria.co.uk/articles/need_a_fiscal_rule_george__try_get_the_economy_growing
diff --git a/inc/3rdparty/site_config/standard/popehat.com.txt b/inc/3rdparty/site_config/standard/popehat.com.txt
new file mode 100644
index 00000000..45b76ae1
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/popehat.com.txt
@@ -0,0 +1,6 @@
1title: //div[@class='entry-title']
2author: //div[@class='entry-author']
3date: //div[@class='entry-time']
4body: //div[@class='entry-content']
5
6test_url: https://popehat.com/2015/12/16/eric-posner-the-first-amendments-nemesis/
diff --git a/inc/3rdparty/site_config/standard/rasgolatente.es.txt b/inc/3rdparty/site_config/standard/rasgolatente.es.txt
new file mode 100644
index 00000000..fcdbbd97
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/rasgolatente.es.txt
@@ -0,0 +1,6 @@
1title: //div[@class='entry-title']
2author: //div[@class='entry-author']
3date: //div[@class='entry-time']
4body: //div[@class='entry-content']
5
6test_url: http://rasgolatente.es/estupidez-psicologia-estupidos/
diff --git a/inc/3rdparty/site_config/standard/thenews.coop.txt b/inc/3rdparty/site_config/standard/thenews.coop.txt
new file mode 100644
index 00000000..7d593805
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/thenews.coop.txt
@@ -0,0 +1,3 @@
1body: //div[@class='entry-content']
2
3test_url: http://www.thenews.coop/98221/news/co-operatives/jeremy-corbyn-needs-co-op-movement/
diff --git a/inc/3rdparty/site_config/standard/timeshighereducation.com.txt b/inc/3rdparty/site_config/standard/timeshighereducation.com.txt
new file mode 100644
index 00000000..ba52788d
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/timeshighereducation.com.txt
@@ -0,0 +1,3 @@
1body: //div[@class="col-md-12 radix-layouts-contentheader panel-panel"]
2strip: //div[@class="htmlContent subscribe_box"]
3test_url: https://www.timeshighereducation.com/blog/jeremy-corbyn-serious-about-free-higher-education
diff --git a/inc/3rdparty/site_config/standard/wired.de.txt b/inc/3rdparty/site_config/standard/wired.de.txt
new file mode 100644
index 00000000..da88362f
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/wired.de.txt
@@ -0,0 +1,8 @@
1title: //meta[@name='Title']/@content
2author: //meta[@name='Author']/@content
3date: //meta[@name='DisplayDate']/@content
4body: //div[@class='article-content']
5strip: //div[@class='article-sidebar']
6
7test_url: https://www.wired.de/collection/latest/der-vw-skandal-zeigt-ohne-vertrauen-ist-software-nicht-mehr-als-bose-magie
8
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 9014f455..1476d158 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -190,7 +190,7 @@ class Poche
190 { 190 {
191 case 'add': 191 case 'add':
192 $content = Tools::getPageContent($url); 192 $content = Tools::getPageContent($url);
193 $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled'); 193 $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : parse_url($url, PHP_URL_HOST);
194 $body = $content['rss']['channel']['item']['description']; 194 $body = $content['rss']['channel']['item']['description'];
195 195
196 // clean content from prevent xss attack 196 // clean content from prevent xss attack
@@ -908,7 +908,7 @@ class Poche
908 $entries = $this->store->retrieveAllWithTags($this->user->getId()); 908 $entries = $this->store->retrieveAllWithTags($this->user->getId());
909 if ($entries) { 909 if ($entries) {
910 echo $this->tpl->render('export.twig', array( 910 echo $this->tpl->render('export.twig', array(
911 'export' => Tools::renderJson($entries), 911 'export' => Tools::renderJson(Tools::utf8ize($entries)),
912 )); 912 ));
913 Tools::logm('export view'); 913 Tools::logm('export view');
914 } else { 914 } else {
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 9c748391..263034f0 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -141,7 +141,7 @@ final class Tools
141 public static function getFile($url) 141 public static function getFile($url)
142 { 142 {
143 $timeout = 15; 143 $timeout = 15;
144 $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"; 144 $useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0";
145 145
146 if (in_array ('curl', get_loaded_extensions())) { 146 if (in_array ('curl', get_loaded_extensions())) {
147 # Fetch feed from URL 147 # Fetch feed from URL
@@ -233,6 +233,27 @@ final class Tools
233 } 233 }
234 234
235 /** 235 /**
236 * UTF-8 encode array of string
237 *
238 * @param $data
239 */
240 public static function utf8ize($data)
241 {
242 if (is_array($data))
243 {
244 foreach ($data as $k => $v)
245 {
246 $data[$k] = self::utf8ize($v);
247 }
248 }
249 else if (is_string ($data) && '' == mb_detect_encoding($data))
250 {
251 return utf8_encode($data);
252 }
253 return $data;
254 }
255
256 /**
236 * Create new line in log file 257 * Create new line in log file
237 * 258 *
238 * @param $message 259 * @param $message
diff --git a/install/index.php b/install/index.php
index f5bce50d..014fd3b4 100755
--- a/install/index.php
+++ b/install/index.php
@@ -704,7 +704,7 @@ php composer.phar install</code></pre>
704 <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li> 704 <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li>
705 <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4"> 705 <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4">
706 <div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3. 706 <div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3.
707 Install will failed if you check this while using an older MySQL server.</div></li> 707 Install will fail if you check this while using an older MySQL server.</div></li>
708 </ul> 708 </ul>
709 <?php } else { ?> 709 <?php } else { ?>
710 <div class="messages notice"> 710 <div class="messages notice">
diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig
index 9ca51cd2..e959ec3e 100755
--- a/themes/baggy/_head.twig
+++ b/themes/baggy/_head.twig
@@ -45,7 +45,6 @@
45 45
46 <script> 46 <script>
47 var baseurl = "{{ poche_url }}"; 47 var baseurl = "{{ poche_url }}";
48 console.log(baseurl);
49 var data = { 48 var data = {
50 49
51 "name": "wallabag", 50 "name": "wallabag",
diff --git a/themes/baggy/css/messages.css b/themes/baggy/css/messages.css
index 42da70b3..5854e731 100755
--- a/themes/baggy/css/messages.css
+++ b/themes/baggy/css/messages.css
@@ -1,3 +1,20 @@
1.messages {
2 display: block;
3 clear: both;
4 width: 400px;
5 margin: 10px auto 10px;
6 padding: 10px 0;
7 -moz-border-radius: 4px;
8 border-radius: 4px;
9}
10
11.messages p {
12 margin: 3px 0 3px 10px !important;
13 padding: 0 10px 0 23px !important;
14 font-size: 14px;
15 line-height: 16px;
16}
17
1.messages.error.install { 18.messages.error.install {
2 border: 1px solid #c42608; 19 border: 1px solid #c42608;
3 color: #c00 !important; 20 color: #c00 !important;
@@ -16,4 +33,10 @@
16 border: 1px solid #6dc70c; 33 border: 1px solid #6dc70c;
17 background: #e0fbcc !important; 34 background: #e0fbcc !important;
18 text-align: left; 35 text-align: left;
36}
37
38.messages.information,
39.messages.info {
40 border: 1px solid #82aee7;
41 background: #dfebfb;
19} \ No newline at end of file 42} \ No newline at end of file
diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig
index e1b78a26..9518332f 100755
--- a/themes/baggy/home.twig
+++ b/themes/baggy/home.twig
@@ -47,7 +47,7 @@
47 {{ nb_results }} {% trans "articles" %} 47 {{ nb_results }} {% trans "articles" %}
48 {% endif %} 48 {% endif %}
49 {% if view == 'home' or view == 'fav' or view == 'archive' %} 49 {% if view == 'home' or view == 'fav' or view == 'archive' %}
50 <a href="?action=random&amp;view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %} 50 <a href="?action=random&amp;view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
51 </div> 51 </div>
52 {{ page_links | raw }} 52 {{ page_links | raw }}
53 </div> 53 </div>
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index 9ee64fc0..1381519c 100755
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -113,14 +113,5 @@
113 113
114 // use keyboard to do actions 114 // use keyboard to do actions
115 actionArticle('{{ entry.id|e }}'); 115 actionArticle('{{ entry.id|e }}');
116
117 // swipe to right or left on mobile to navigate
118 $('article').on("swiperight", function(){
119 goLeft('?view=view&id={{ navigate.nextid|e }}');
120 });
121 $('article').on("swipeleft", function(){
122 goRight('?view=view&id={{ navigate.previousid|e }}');
123 });
124
125 </script> 116 </script>
126{% endblock %} 117{% endblock %}
diff --git a/themes/default/_head.twig b/themes/default/_head.twig
index e3841c77..2785fd23 100755
--- a/themes/default/_head.twig
+++ b/themes/default/_head.twig
@@ -42,7 +42,6 @@
42 42
43 <script> 43 <script>
44 var baseurl = "{{ poche_url }}"; 44 var baseurl = "{{ poche_url }}";
45 console.log(baseurl);
46 var data = { 45 var data = {
47 46
48 "name": "wallabag", 47 "name": "wallabag",
diff --git a/themes/default/_messages.twig b/themes/default/_messages.twig
index 679aa098..80ae456d 100644
--- a/themes/default/_messages.twig
+++ b/themes/default/_messages.twig
@@ -1 +1,6 @@
1 {{ messages | raw }} \ No newline at end of file 1 {{ messages | raw }}
2 {% if view == 'home' %}
3 <div class="messages information">
4 <p><a href="http://doc.wallabag.org">wallabag v2 is out, please read the documentation to upgrade.</a></p>
5 </div>
6 {% endif %} \ No newline at end of file
diff --git a/themes/default/home.twig b/themes/default/home.twig
index a320cc7f..08e33fad 100755
--- a/themes/default/home.twig
+++ b/themes/default/home.twig
@@ -52,7 +52,7 @@
52 {{ nb_results }} {% trans "articles" %} 52 {{ nb_results }} {% trans "articles" %}
53 {% endif %} 53 {% endif %}
54 {% if view == 'home' or view == 'fav' or view == 'archive' %} 54 {% if view == 'home' or view == 'fav' or view == 'archive' %}
55 <a href="?action=random&amp;view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %} 55 <a href="?action=random&amp;view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
56 </div> 56 </div>
57 {{ page_links | raw }} 57 {{ page_links | raw }}
58 </div> 58 </div>
diff --git a/themes/default/view.twig b/themes/default/view.twig
index 0010d18f..d1b6496e 100755
--- a/themes/default/view.twig
+++ b/themes/default/view.twig
@@ -129,13 +129,5 @@
129 // Use left and right arrow to navigate on with keyboard 129 // Use left and right arrow to navigate on with keyboard
130 navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); 130 navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
131 131
132 // swipe to right or left on mobile to navigate
133 $('article').on("swiperight", function(){
134 goLeft('?view=view&id={{ navigate.nextid|e }}');
135 });
136 $('article').on("swipeleft", function(){
137 goRight('?view=view&id={{ navigate.previousid|e }}');
138 });
139
140 </script> 132 </script>
141{% endblock %} 133{% endblock %}