From f8be8eb41b50d0bea6f6c362abc33fb4ac546f3d Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 1 Feb 2014 16:23:43 -0500 Subject: Modification de l'affichage des modes de partage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout de la numérotation des modes de partage pour rendre l'utilisation des raccourcis plus aisée. --- p/themes/Dark/global.css | 5 +++++ p/themes/Flat/global.css | 5 +++++ p/themes/Origine/global.css | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'p/themes') diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css index f96f83fc8..a6acd740a 100644 --- a/p/themes/Dark/global.css +++ b/p/themes/Dark/global.css @@ -407,6 +407,11 @@ input, select, textarea { padding: 0 25px; line-height: 30px; } + .dropdown-menu > .item.share > a { + display: list-item; + list-style-position:inside; + list-style-type:decimal; + } .dropdown-menu > .item:hover { background: #26303F; color: #888; diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css index e3baa26ab..75c328fcb 100644 --- a/p/themes/Flat/global.css +++ b/p/themes/Flat/global.css @@ -403,6 +403,11 @@ input, select, textarea { padding: 0 25px; line-height: 30px; } + .dropdown-menu > .item.share > a { + display: list-item; + list-style-position:inside; + list-style-type:decimal; + } .dropdown-menu > .item:hover > a { background: #2980b9; color: #fff; diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css index 58a3a52b1..c1892d042 100644 --- a/p/themes/Origine/global.css +++ b/p/themes/Origine/global.css @@ -419,6 +419,11 @@ input, select, textarea { padding: 0 25px; line-height: 30px; } + .dropdown-menu > .item.share > a { + display: list-item; + list-style-position:inside; + list-style-type:decimal; + } .dropdown-menu > .item:hover { background: #0062BE; color: #fff; -- cgit v1.2.3 From 178af19fb0e7c13015e991593feea6a5f4aafcc0 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 13 Feb 2014 21:01:12 +0100 Subject: Add possibility to open notification in JavaScript + new message Notifications can be opened directly in JavaScript Class .notification is now id #notification New message when there is no feed to refresh See 06abbd02c2d10934155b2464f73d8ecdb2a68de1 (comments) --- app/Controllers/feedController.php | 4 ++-- app/i18n/en.php | 1 + app/i18n/fr.php | 1 + app/layout/layout.phtml | 11 ++++++--- app/views/javascript/actualize.phtml | 1 + p/scripts/main.js | 46 +++++++++++++++++++++++++++++------- p/themes/Dark/freshrss.css | 15 +++++++----- p/themes/Flat/freshrss.css | 15 +++++++----- p/themes/Origine/freshrss.css | 11 +++++---- 9 files changed, 75 insertions(+), 30 deletions(-) (limited to 'p/themes') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index d98c77558..264607216 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -283,8 +283,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } else { // aucun flux n'a été mis à jour, oups $notif = array ( - 'type' => 'bad', - 'content' => Minz_Translate::t ('no_feed_actualized') + 'type' => 'good', + 'content' => Minz_Translate::t ('no_feed_to_refresh') ); } diff --git a/app/i18n/en.php b/app/i18n/en.php index af051673d..369853610 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -248,6 +248,7 @@ return array ( 'rss_feeds_of' => 'RSS feed of %s', 'refresh' => 'Refresh', + 'no_feed_to_refresh' => 'There is no feed to refresh…', 'today' => 'Today', 'yesterday' => 'Yesterday', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 5dc184aa3..275c3b1d8 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -248,6 +248,7 @@ return array ( 'rss_feeds_of' => 'Flux RSS de %s', 'refresh' => 'Actualisation', + 'no_feed_to_refresh' => 'Il n’y a aucun flux à actualiser…', 'today' => 'Aujourd’hui', 'yesterday' => 'Hier', diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index d6a1737ee..1501df3c3 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -36,13 +36,18 @@ notification)) { + $msg = $this->notification['content']; + $status = $this->notification['type']; + invalidateHttpCache(); + } ?> -
- notification['content']; ?> +
+
- diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml index 58c3b7c8f..a2b076ea8 100644 --- a/app/views/javascript/actualize.phtml +++ b/app/views/javascript/actualize.phtml @@ -24,6 +24,7 @@ function updateProgressBar(i) { function updateFeeds() { if (feed_count === 0) { + openNotification("", "good"); return; } initProgressBar(true); diff --git a/p/scripts/main.js b/p/scripts/main.js index e94df2a39..88ef670cd 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -665,23 +665,51 @@ function init_actualize() { } } + +// +var notification = null, + notification_interval = null, + notification_working = false; + +function openNotification(msg, status) { + if (notification_working === true) { + return false; + } + + notification_working = true; + + notification.removeClass(); + notification.addClass(status); + notification.find(".msg").html(msg); + notification.fadeIn(300); + + notification_interval = window.setInterval(closeNotification, 4000); +} + function closeNotification() { - $(".notification").fadeOut(600, function () { - $(".notification").remove(); + notification.fadeOut(600, function() { + notification.removeClass(); + notification.addClass('closed'); + + window.clearInterval(notification_interval); + notification_working = false; }); } function init_notifications() { - var notif = $(".notification"); - if (notif.length > 0) { - window.setInterval(closeNotification, 4000); + notification = $("#notification"); - notif.find("a.close").click(function () { - closeNotification(); - return false; - }); + notification.find("a.close").click(function () { + closeNotification(); + return false; + }); + + if (notification.find(".msg").html().length > 0) { + notification_working = true; + notification_interval = window.setInterval(closeNotification, 4000); } } +// function refreshUnreads() { $.getJSON('./?c=javascript&a=nbUnreadsPerFeed').done(function (data) { diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index e54a0eadd..380dee877 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -558,7 +558,7 @@ } /*** NOTIFICATION ***/ -.notification { +#notification { position: absolute; top: 10px; left: 25%; right: 25%; @@ -573,13 +573,16 @@ font-weight: bold; z-index: 10; } - .notification.good { + #notification.closed { + display: none; + } + #notification.good { border:1px solid #f4f899; } - .notification.bad { + #notification.bad { border:1px solid #f4a899; } - .notification a.close { + #notification a.close { display: inline-block; width: 16px; height: 16px; @@ -590,10 +593,10 @@ border-radius: 50px; line-height: 16px; } - .notification.good a.close{ + #notification.good a.close{ border:1px solid #f4f899; } - .notification.bad a.close{ + #notification.bad a.close{ border:1px solid #f4a899; } diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index 19f5967ea..edd67e17c 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -561,7 +561,7 @@ body { } /*** NOTIFICATION ***/ -.notification { +#notification { position: absolute; top: 10px; left: 25%; right: 25%; @@ -575,15 +575,18 @@ body { font-weight: bold; z-index: 10; } - .notification.good { + #notification.closed { + display: none; + } + #notification.good { background: #1abc9c; color: #fff; } - .notification.bad { + #notification.bad { background: #e74c3c; color: #fff; } - .notification a.close { + #notification a.close { display: inline-block; width: 16px; height: 16px; @@ -593,10 +596,10 @@ body { border-radius: 3px; line-height: 16px; } - .notification.good a.close { + #notification.good a.close { background: #1abc9c; } - .notification.bad a.close { + #notification.bad a.close { background: #e74c3c; } diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index 85a23140c..80fac05cd 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -569,7 +569,7 @@ } /*** NOTIFICATION ***/ -.notification { +#notification { position: absolute; top: 10px; left: 25%; right: 25%; @@ -584,13 +584,16 @@ font-weight: bold; z-index: 10; } - .notification.good { + #notification.closed { + display: none; + } + #notification.good { background: #f4f899; } - .notification.bad { + #notification.bad { background: #f4a899; } - .notification a.close { + #notification a.close { display: inline-block; width: 16px; height: 16px; -- cgit v1.2.3 From cddec2d76f2c5d25d3008d5e2a60fddad6028a5d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 15 Feb 2014 12:25:06 +0100 Subject: Improve login page - if user cannot log in, a 403 error is showed (and it is done in controller) - 403 error message has been changed to match with the error - add blank spaces on persona login page --- app/Controllers/indexController.php | 5 ++++ app/i18n/en.php | 3 +- app/i18n/fr.php | 3 +- app/views/error/index.phtml | 10 ++++++- app/views/index/formLogin.phtml | 56 ++++++++++++++++++------------------- p/themes/Dark/global.css | 30 ++++++++++---------- p/themes/Flat/global.css | 30 ++++++++++---------- p/themes/Origine/global.css | 30 ++++++++++---------- 8 files changed, 93 insertions(+), 74 deletions(-) (limited to 'p/themes') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index a680c914a..38f4c0e7c 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -351,6 +351,11 @@ class FreshRSS_index_Controller extends Minz_ActionController { } $this->view->_useLayout(false); Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); + } elseif (!Minz_Configuration::canLogIn()) { + Minz_Error::error ( + 403, + array ('error' => array (Minz_Translate::t ('access_denied'))) + ); } invalidateHttpCache(); } diff --git a/app/i18n/en.php b/app/i18n/en.php index fd51eb1ca..790e853f5 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -3,6 +3,7 @@ return array ( // LAYOUT 'login' => 'Login', + 'login_with_persona' => 'Login with Persona', 'logout' => 'Logout', 'search' => 'Search words or #tags', 'search_short' => 'Search', @@ -276,7 +277,7 @@ return array ( 'logs_empty' => 'Log file is empty', 'clear_logs' => 'Clear the logs', - 'forbidden_access' => 'Access forbidden! (%s)', + 'forbidden_access' => 'Access is forbidden!', 'login_required' => 'Login required:', 'confirm_action' => 'Are you sure you want to perform this action? It cannot be cancelled!', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 17e26f493..572bc1628 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -3,6 +3,7 @@ return array ( // LAYOUT 'login' => 'Connexion', + 'login_with_persona' => 'Connexion avec Persona', 'logout' => 'Déconnexion', 'search' => 'Rechercher des mots ou des #tags', 'search_short' => 'Rechercher', @@ -276,7 +277,7 @@ return array ( 'logs_empty' => 'Les logs sont vides', 'clear_logs' => 'Effacer les logs', - 'forbidden_access' => 'Accès interdit ! (%s)', + 'forbidden_access' => 'L’accès vous est interdit !', 'login_required' => 'Accès protégé par mot de passe :', 'confirm_action' => 'Êtes-vous sûr(e) de vouloir continuer ? Cette action ne peut être annulée !', diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml index 36fcb56f9..6a09c3aa2 100644 --- a/app/views/error/index.phtml +++ b/app/views/error/index.phtml @@ -3,7 +3,15 @@

code; ?>

-
+

diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml index e4560c1a0..cc925ea59 100644 --- a/app/views/index/formLogin.phtml +++ b/app/views/index/formLogin.phtml @@ -1,34 +1,32 @@
-

-

- - -

- - -
- -

- -

-
+
+ + +
+
+ + +
+ +
+
+ +
+

FreshRSS

-

+ case 'persona': + ?>

+ + +

-

+

diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css index a6acd740a..e296f2188 100644 --- a/p/themes/Dark/global.css +++ b/p/themes/Dark/global.css @@ -512,18 +512,20 @@ input, select, textarea { } /* Prompt (centré) */ -.prompt > h1, .prompt > p { - text-align:center; -} -.prompt > form { - margin:1em auto 2.5em auto; - width:10em; -} -.prompt .btn { - display:block; - margin:.5em auto; -} -.prompt input { - margin:.4em auto 1.1em auto; - width:99%; +.prompt { + text-align: center; } + .prompt label { + text-align: left; + } + .prompt form { + margin: 1em auto 2.5em auto; + width: 10em; + } + .prompt input { + margin: .4em auto 1.1em auto; + width: 100%; + } + .prompt p { + margin: 20px 0; + } diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css index 75c328fcb..4044dd781 100644 --- a/p/themes/Flat/global.css +++ b/p/themes/Flat/global.css @@ -515,18 +515,20 @@ input, select, textarea { } /* Prompt (centré) */ -.prompt > h1, .prompt > p { - text-align:center; -} -.prompt > form { - margin:1em auto 2.5em auto; - width:10em; -} -.prompt .btn { - display:block; - margin:.5em auto; -} -.prompt input { - margin:.4em auto 1.1em auto; - width:99%; +.prompt { + text-align: center; } + .prompt label { + text-align: left; + } + .prompt form { + margin: 1em auto 2.5em auto; + width: 10em; + } + .prompt input { + margin: .4em auto 1.1em auto; + width: 100%; + } + .prompt p { + margin: 20px 0; + } diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css index c1892d042..5792c9e4d 100644 --- a/p/themes/Origine/global.css +++ b/p/themes/Origine/global.css @@ -528,18 +528,20 @@ input, select, textarea { } /* Prompt (centré) */ -.prompt > h1, .prompt > p { - text-align:center; -} -.prompt > form { - margin:1em auto 2.5em auto; - width:10em; -} -.prompt .btn { - display:block; - margin:.5em auto; -} -.prompt input { - margin:.4em auto 1.1em auto; - width:99%; +.prompt { + text-align: center; } + .prompt label { + text-align: left; + } + .prompt form { + margin: 1em auto 2.5em auto; + width: 10em; + } + .prompt input { + margin: .4em auto 1.1em auto; + width: 100%; + } + .prompt p { + margin: 20px 0; + } -- cgit v1.2.3 From 1ab5fa83c3b25d773b203a54e319eb71bd3a69da Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 15 Feb 2014 19:15:07 +0100 Subject: Update themes: global view and not read categories Category header is better when some articles are not read --- p/themes/Dark/freshrss.css | 6 ++++-- p/themes/Flat/freshrss.css | 6 ++++-- p/themes/Origine/freshrss.css | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'p/themes') diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index 380dee877..e448f081f 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -354,13 +354,15 @@ font-size: 120%; } #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; + background: #34495e; + color: #fff; + font-weight: bold; } #stream.global .btn:first-child:not([data-unread="0"]):after { top: 0; right: 5px; border: 0; background: none; - color: #666; + color: #fff; font-weight: bold; box-shadow: none; } diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index edd67e17c..c23743843 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -350,13 +350,15 @@ body { font-size: 120%; } #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; + background: #3498db; + color: #fff; + font-weight: bold; } #stream.global .btn:first-child:not([data-unread="0"]):after { top: 0; right: 5px; border: 0; background: none; - color: #333; + color: #fff; font-weight: bold; box-shadow: none; } diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index 80fac05cd..e605465dc 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -364,15 +364,19 @@ font-size: 120%; } #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; + background: #0084CC; + color: #fff; + font-weight: bold; + text-shadow: none; } #stream.global .btn:first-child:not([data-unread="0"]):after { top: 0; right: 5px; border: 0; background: none; - color: #666; + color: #fff; font-weight: bold; box-shadow: none; + text-shadow: none; } #stream.global .box-category .feeds { display: block; -- cgit v1.2.3 From e50fb4179f91ec3711b0fd602a749c447d0e141d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 18 Feb 2014 19:56:26 +0100 Subject: Improve notification design on mobile Impact all themes: - Notification is extended from left to right and top (0px) - Close button is hidden: by clicking (or touching) notification it will close the notification See #427 --- p/themes/Dark/freshrss.css | 37 +++++++++++++++++++++---------------- p/themes/Flat/freshrss.css | 25 ++++++++++++++++++++----- p/themes/Origine/freshrss.css | 23 ++++++++++++++++++----- 3 files changed, 59 insertions(+), 26 deletions(-) (limited to 'p/themes') diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index e448f081f..f6577c645 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -572,35 +572,25 @@ box-shadow: 0 0 5px #666; background: #1a1a1a; color: #888; + border: 1px solid #f4f899; font-weight: bold; z-index: 10; } #notification.closed { display: none; } - #notification.good { - border:1px solid #f4f899; - } - #notification.bad { - border:1px solid #f4a899; - } #notification a.close { + position: absolute; + top: -10px; right: -10px; display: inline-block; width: 16px; height: 16px; - float: right; - margin: -20px -20px 0 0; padding: 5px; background: #1a1a1a; border-radius: 50px; line-height: 16px; - } - #notification.good a.close{ border:1px solid #f4f899; } - #notification.bad a.close{ - border:1px solid #f4a899; - } .toggle_aside, .btn.toggle_aside { display: none; @@ -782,10 +772,25 @@ select.number option { text-shadow: none; } - .notification, + #notification, .actualizeProgress { - left: 10px; - right: 10px; + top: 0; + left: 0; + right: 0; + border-radius: 0; + border: none; + border-bottom: 1px solid #f4f899; + } + #notification a.close { + left: 0; right: 0; + top: 0; bottom: 0; + width: auto; + height: auto; + background: transparent; + border: none; + } + #notification a.close .icon { + display: none; } } diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index c23743843..1d551d8fb 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -589,11 +589,11 @@ body { color: #fff; } #notification a.close { + position: absolute; + top: -6px; right: -6px; display: inline-block; width: 16px; height: 16px; - float: right; - margin: -16px -16px 0 0; padding: 5px; border-radius: 3px; line-height: 16px; @@ -790,10 +790,25 @@ select.number option { text-shadow: none; } - .notification, + #notification, .actualizeProgress { - left: 10px; - right: 10px; + top: 0; + left: 0; + right: 0; + border-radius: 0; + } + #notification a.close, + #notification.good a.close, + #notification.bad a.close { + left: 0; right: 0; + top: 0; bottom: 0; + width: auto; + height: auto; + background: transparent; + border: none; + } + #notification a.close .icon { + display: none; } } diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index e605465dc..86bd508df 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -598,11 +598,11 @@ background: #f4a899; } #notification a.close { + position: absolute; + top: -10px; right: -10px; display: inline-block; width: 16px; height: 16px; - float: right; - margin: -20px -20px 0 0; padding: 5px; background: #fff; border-radius: 50px; @@ -790,10 +790,23 @@ select.number option { text-shadow: none; } - .notification, + #notification, .actualizeProgress { - left: 10px; - right: 10px; + top: 0; + left: 0; + right: 0; + border-radius: 0; + } + #notification a.close { + left: 0; right: 0; + top: 0; bottom: 0; + width: auto; + height: auto; + background: transparent; + border: none; + } + #notification a.close .icon { + display: none; } } -- cgit v1.2.3