diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 81a18c860..5b8e235f1 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -337,6 +337,14 @@ class Poche $this->messages->add('s', _('The tag has been successfully deleted')); Tools::redirect(); break; + /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */ + case 'random': + $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); + $id = rand(1,$count); + Tools::logm('get a random article'); + Tools::redirect('?view=view&id=' . $id); + //$this->displayView('view', $id); + break; default: break; } diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 1df829101..9356deda9 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -736,6 +736,9 @@ a.add-to-wallabag-link-after:after { .icon-print:before { content: "\e80d"; } +.icon-random:before { + content: "\e915"; +} /* .icon-image class, for image-based icons diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot index 563235166..784ac198a 100644 Binary files a/themes/baggy/fonts/icomoon.eot and b/themes/baggy/fonts/icomoon.eot differ diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg index b45861363..2e2f16f70 100644 --- a/themes/baggy/fonts/icomoon.svg +++ b/themes/baggy/fonts/icomoon.svg @@ -1,41 +1,38 @@ - - -{ - "fontFamily": "icomoon", - "majorVersion": 1, - "minorVersion": 0, - "version": "Version 1.0", - "fontId": "icomoon", - "psName": "icomoon", - "subFamily": "Regular", - "fullName": "icomoon", - "description": "Generated by IcoMoon" -} - - +Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf index bb1f21f88..b4fb95bc2 100644 Binary files a/themes/baggy/fonts/icomoon.ttf and b/themes/baggy/fonts/icomoon.ttf differ diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff index bab137795..158108f13 100644 Binary files a/themes/baggy/fonts/icomoon.woff and b/themes/baggy/fonts/icomoon.woff differ diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index 93515080d..93d2815b3 100755 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -25,7 +25,7 @@ {% block pager %} {% if nb_results > 1 %}
-
{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %}
+
{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %} {% trans "random" %}
{{ page_links | raw }}
{% elseif nb_results == 1 %} diff --git a/themes/default/css/style.css b/themes/default/css/style.css index b25373d6c..a122dc546 100755 --- a/themes/default/css/style.css +++ b/themes/default/css/style.css @@ -151,6 +151,16 @@ a:visited { text-indent: -9999px; } +.random { + display: inline-block; + width: 16px; + height: 16px; + overflow: hidden; + text-align: left; + text-indent: -9999px; + background-image: url('../img/default/dice.png'); +} + /*** ***/ /*** ARTICLE PAGE ***/ diff --git a/themes/default/home.twig b/themes/default/home.twig index b90005598..abc96af84 100755 --- a/themes/default/home.twig +++ b/themes/default/home.twig @@ -31,7 +31,8 @@ {% block pager %} {% if nb_results > 1 %}
-
{{ nb_results }} {% trans "results" %}{% if searchterm is defined %}{% trans " found for « " %} {{ searchterm }} »{% endif %}
+
{{ nb_results }} {% trans "results" %}{% if searchterm is defined %}{% trans " found for « " %} {{ searchterm }} »{% endif %} + {% trans "random" %}
{{ page_links | raw }}
{% elseif nb_results == 1 %} diff --git a/themes/default/img/default/dice.png b/themes/default/img/default/dice.png new file mode 100644 index 000000000..70af6d0bb Binary files /dev/null and b/themes/default/img/default/dice.png differ