diff --git a/app/layout/nav_entries.phtml b/app/layout/nav_entries.phtml
new file mode 100644
index 000000000..101e7443e
--- /dev/null
+++ b/app/layout/nav_entries.phtml
@@ -0,0 +1,5 @@
+
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index e290e02d3..e51cf978e 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -105,6 +105,32 @@ function mark_favorite (active) {
});
}
+function prev_entry() {
+ old_active = $(".flux.active");
+ last_active = $(".flux:last");
+ new_active = old_active.prevAll (".flux:first");
+
+ if (new_active.hasClass("flux")) {
+ toggleContent (new_active, old_active);
+ } else if (old_active[0] === undefined &&
+ new_active[0] === undefined) {
+ toggleContent (last_active, old_active);
+ }
+}
+
+function next_entry() {
+ old_active = $(".flux.active");
+ first_active = $(".flux:first");
+ new_active = old_active.nextAll (".flux:first");
+
+ if (new_active.hasClass("flux")) {
+ toggleContent (new_active, old_active);
+ } else if (old_active[0] === undefined &&
+ new_active[0] === undefined) {
+ toggleContent (first_active, old_active);
+ }
+}
+
function init_img () {
$(".flux_content .content img").each (function () {
if ($(this).width () > ($(".flux_content .content").width()) / 2) {
@@ -206,18 +232,7 @@ function init_shortcuts () {
});
// Touches de navigation
- shortcut.add("", function () {
- old_active = $(".flux.active");
- last_active = $(".flux:last");
- new_active = old_active.prevAll (".flux:first");
-
- if (new_active.hasClass("flux")) {
- toggleContent (new_active, old_active);
- } else if (old_active[0] === undefined &&
- new_active[0] === undefined) {
- toggleContent (last_active, old_active);
- }
- }, {
+ shortcut.add("", prev_entry, {
'disable_in_input':true
});
shortcut.add("shift+", function () {
@@ -230,18 +245,7 @@ function init_shortcuts () {
}, {
'disable_in_input':true
});
- shortcut.add("", function () {
- old_active = $(".flux.active");
- first_active = $(".flux:first");
- new_active = old_active.nextAll (".flux:first");
-
- if (new_active.hasClass("flux")) {
- toggleContent (new_active, old_active);
- } else if (old_active[0] === undefined &&
- new_active[0] === undefined) {
- toggleContent (first_active, old_active);
- }
- }, {
+ shortcut.add("", next_entry, {
'disable_in_input':true
});
shortcut.add("shift+", function () {
@@ -281,6 +285,17 @@ function init_shortcuts () {
});
}
+function init_nav_entries() {
+ $('.nav_entries a.previous_entry').click(function() {
+ prev_entry();
+ return false;
+ });
+ $('.nav_entries a.next_entry').click(function() {
+ next_entry();
+ return false;
+ });
+}
+
$(document).ready (function () {
if(is_reader_mode()) {
hide_posts = false;
@@ -288,4 +303,5 @@ $(document).ready (function () {
init_posts ();
init_column_categories ();
init_shortcuts ();
+ init_nav_entries();
});
diff --git a/public/theme/freshrss.css b/public/theme/freshrss.css
index 613a6f037..178472ac9 100644
--- a/public/theme/freshrss.css
+++ b/public/theme/freshrss.css
@@ -426,6 +426,11 @@
.pagination:last-child .item {
border-top: 1px solid #aaa;
}
+
+.nav_entries {
+ display: none;
+}
+
.loading {
background: url("loader.gif") center center no-repeat;
font-size: 0;
@@ -538,6 +543,9 @@
font-size: 120%;
}
+ .pagination {
+ margin: 0 0 40px;
+ }
.pagination .pager-previous, .pagination .pager-next {
width: 100px;
}
@@ -574,4 +582,29 @@
.aside .categories {
margin: 30px 0;
}
+
+ .nav_entries {
+ display: table;
+ width: 100%;
+ height: 40px;
+ position: fixed;
+ bottom: 0;
+ margin: 0;
+ background: #fff;
+ border-top: 1px solid #ddd;
+ text-align: center;
+ line-height: 40px;
+ table-layout: fixed;
+ }
+ .nav_entries .item {
+ display: table-cell;
+ width: 30%;
+ }
+ .nav_entries .item a {
+ display: block;
+ }
+ .nav_entries .item .icon.i_up {
+ margin: 5px 0 0;
+ vertical-align: top;
+ }
}
diff --git a/public/theme/global.css b/public/theme/global.css
index 4c504db63..b1fd01436 100644
--- a/public/theme/global.css
+++ b/public/theme/global.css
@@ -517,6 +517,14 @@ input, select, textarea {
background-image: url("icons/up.png");
background-image: url("icons/up.svg");
}
+ .icon.i_next {
+ background-image: url("icons/next.png");
+ background-image: url("icons/next.svg");
+ }
+ .icon.i_prev {
+ background-image: url("icons/previous.png");
+ background-image: url("icons/previous.svg");
+ }
.icon.i_help {
background-image: url("icons/help.png");
background-image: url("icons/help.svg");
diff --git a/public/theme/icons/next.png b/public/theme/icons/next.png
new file mode 100644
index 000000000..ab3490c3b
Binary files /dev/null and b/public/theme/icons/next.png differ
diff --git a/public/theme/icons/next.svg b/public/theme/icons/next.svg
new file mode 100644
index 000000000..72637b4e6
--- /dev/null
+++ b/public/theme/icons/next.svg
@@ -0,0 +1,31 @@
+
+
+
+
diff --git a/public/theme/icons/previous.png b/public/theme/icons/previous.png
new file mode 100644
index 000000000..10e40669e
Binary files /dev/null and b/public/theme/icons/previous.png differ
diff --git a/public/theme/icons/previous.svg b/public/theme/icons/previous.svg
new file mode 100644
index 000000000..67685c50c
--- /dev/null
+++ b/public/theme/icons/previous.svg
@@ -0,0 +1,31 @@
+
+
+
+