From 1fb25addd09660c08ff74b960b1c226acc319978 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 5 Jan 2014 17:35:38 +0100 Subject: Debug Persona temporaire https://github.com/marienfressinaud/FreshRSS/issues/347 --- app/Controllers/indexController.php | 5 +++++ app/FreshRSS.php | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'app') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 690ca57be..9817b7a81 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -237,6 +237,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { $assert = Minz_Request::param ('assertion'); $params = 'assertion=' . $assert . '&audience=' . urlencode (Minz_Url::display (null, 'php', true)); + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' login params=' . print_r($params, true) . "\n", FILE_APPEND); //DEBUG $ch = curl_init (); $options = array ( CURLOPT_URL => $url, @@ -252,8 +253,10 @@ class FreshRSS_index_Controller extends Minz_ActionController { $loginOk = false; $reason = ''; + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' login response=' . print_r($res, true) . "\n", FILE_APPEND); //DEBUG if ($res['status'] === 'okay') { $email = filter_var($res['email'], FILTER_VALIDATE_EMAIL); + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' filtered_email=' . $email . "\n", FILE_APPEND); //DEBUG if ($email != '') { $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; if (($currentUser = @file_get_contents($personaFile)) !== false) { @@ -277,12 +280,14 @@ class FreshRSS_index_Controller extends Minz_ActionController { Minz_Session::_param('currentUser', $currentUser); Minz_Session::_param ('mail', $email); $this->view->loginOk = true; + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Login OK email=' . $email . ', currentUser=' . $currentUser . "\n", FILE_APPEND); //DEBUG invalidateHttpCache(); } else { $res = array (); $res['status'] = 'failure'; $res['reason'] = $reason == '' ? Minz_Translate::t ('invalid_login') : $reason; Minz_Log::record ('Persona: ' . $res['reason'], Minz_Log::WARNING); + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Failure=' . print_r($res, true) . "\n", FILE_APPEND); //DEBUG } header('Content-Type: application/json; charset=UTF-8'); diff --git a/app/FreshRSS.php b/app/FreshRSS.php index f9857a4cb..86d35a6e7 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -11,6 +11,7 @@ class FreshRSS extends Minz_FrontController { } private function accessControl($currentUser) { + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' authType=' . Minz_Configuration::authType() . "\n", FILE_APPEND); //DEBUG if ($currentUser == '') { switch (Minz_Configuration::authType()) { case 'http_auth': @@ -18,12 +19,15 @@ class FreshRSS extends Minz_FrontController { $loginOk = $currentUser != ''; break; case 'persona': + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona access control' . "\n", FILE_APPEND); //DEBUG $loginOk = false; $email = filter_var(Minz_Session::param('mail'), FILTER_VALIDATE_EMAIL); + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona email=' . Minz_Session::param('mail') . ', filtered_email=' . $email . "\n", FILE_APPEND); if ($email != '') { //TODO: Remove redundancy with indexController $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; if (($currentUser = @file_get_contents($personaFile)) !== false) { $currentUser = trim($currentUser); + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona user from file=' . $currentUser . "\n", FILE_APPEND); //DEBUG $loginOk = true; } } @@ -77,6 +81,7 @@ class FreshRSS extends Minz_FrontController { $loginOk = strcasecmp($currentUser, httpAuthUser()) === 0; break; case 'persona': + file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona compare session_email=' . Minz_Session::param('mail') . ' with config_email=' . $this->conf->mail_login . "\n", FILE_APPEND); //DEBUG $loginOk = strcasecmp(Minz_Session::param('mail'), $this->conf->mail_login) === 0; break; case 'none': -- cgit v1.2.3 From 6eea96656a933b29b699999eec97299c4e363c79 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 5 Jan 2014 18:06:06 +0100 Subject: Utilise QUERY_STRING plutôt que PATH_INFO pour favicons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/348 Revenir dessus en cas de problème de cache HTTP des favicons. --- app/Models/Feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index f38828a42..df762c8fa 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -116,7 +116,7 @@ class FreshRSS_Feed extends Minz_Model { @unlink($path . '.txt'); } public function favicon () { - return Minz_Url::display ('/f.php/' . $this->hash()); + return Minz_Url::display ('/f.php?' . $this->hash()); } public function _id ($value) { -- cgit v1.2.3 From 70c6ba903d9c69adda173917b07e503df07ae591 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 5 Jan 2014 21:55:15 +0100 Subject: Meilleure mise-à-jour avec Persona depuis v0.6 vers v0.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/marienfressinaud/FreshRSS/issues/347 * Conserve l'information sur l'utilisation de Persona lors d'une mise à jour depuis v0.6 vers v0.7. * Idem pour la lecture anonyme * Les droits sur le répertoire persona sont testés * Les tokens ne sont pas migrés ni testés pour l'instant https://github.com/marienfressinaud/FreshRSS/issues/327 --- app/i18n/install.en.php | 1 + app/i18n/install.fr.php | 1 + p/i/install.php | 20 ++++++++++++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php index 4d8006977..8145abffa 100644 --- a/app/i18n/install.en.php +++ b/app/i18n/install.en.php @@ -40,6 +40,7 @@ return array ( 'log_is_ok' => 'Permissions on logs directory are good', 'favicons_is_ok' => 'Permissions on favicons directory are good', 'data_is_ok' => 'Permissions on data directory are good', + 'persona_is_ok' => 'Permissions on Mozilla Persona directory are good', 'file_is_nok' => 'Check permissions on %s directory. HTTP server must have rights to write into', 'fix_errors_before' => 'Fix errors before skip to the next step.', diff --git a/app/i18n/install.fr.php b/app/i18n/install.fr.php index e9dba7c23..3211ddf19 100644 --- a/app/i18n/install.fr.php +++ b/app/i18n/install.fr.php @@ -40,6 +40,7 @@ return array ( 'log_is_ok' => 'Les droits sur le répertoire des logs sont bons', 'favicons_is_ok' => 'Les droits sur le répertoire des favicons sont bons', 'data_is_ok' => 'Les droits sur le répertoire de data sont bons', + 'persona_is_ok' => 'Les droits sur le répertoire de Mozilla Persona sont bons', 'file_is_nok' => 'Veuillez vérifier les droits sur le répertoire %s. Le serveur HTTP doit être capable d’écrire dedans', 'fix_errors_before' => 'Veuillez corriger les erreurs avant de passer à l’étape suivante.', diff --git a/p/i/install.php b/p/i/install.php index 4f2d00848..cd15c35f4 100644 --- a/p/i/install.php +++ b/p/i/install.php @@ -213,6 +213,8 @@ function saveStep3 () { 'base_url' => '', 'title' => $_SESSION['title'], 'default_user' => $_SESSION['default_user'], + 'auth_type' => $_SESSION['auth_type'], + 'allow_anonymous' => $_SESSION['allow_anonymous'], ), 'db' => array( 'type' => $_SESSION['bd_type'], @@ -433,7 +435,7 @@ function checkStep0 () { if ($ini_array) { $ini_general = isset($ini_array['general']) ? $ini_array['general'] : null; if ($ini_general) { - $keys = array('environment', 'salt', 'title', 'default_user'); + $keys = array('environment', 'salt', 'title', 'default_user', 'allow_anonymous', 'auth_type'); foreach ($keys as $key) { if ((empty($_SESSION[$key])) && isset($ini_general[$key])) { $_SESSION[$key] = $ini_general[$key]; @@ -455,6 +457,12 @@ function checkStep0 () { $userConfig = include(DATA_PATH . '/' . $_SESSION['default_user'] . '_user.php'); } elseif (file_exists(DATA_PATH . '/Configuration.array.php')) { $userConfig = include(DATA_PATH . '/Configuration.array.php'); //v0.6 + if (empty($_SESSION['auth_type'])) { + $_SESSION['auth_type'] = empty($userConfig['mail_login']) ? 'none' : 'persona'; + } + if (!isset($_SESSION['allow_anonymous'])) { + $_SESSION['allow_anonymous'] = empty($userConfig['anon_access']) ? false : ($userConfig['anon_access'] === 'yes'); + } } else { $userConfig = array(); } @@ -487,6 +495,7 @@ function checkStep1 () { $cache = CACHE_PATH && is_writable (CACHE_PATH); $log = LOG_PATH && is_writable (LOG_PATH); $favicons = is_writable (DATA_PATH . '/favicons'); + $persona = is_writable (DATA_PATH . '/persona'); return array ( 'php' => $php ? 'ok' : 'ko', @@ -500,7 +509,8 @@ function checkStep1 () { 'cache' => $cache ? 'ok' : 'ko', 'log' => $log ? 'ok' : 'ko', 'favicons' => $favicons ? 'ok' : 'ko', - 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $data && $cache && $log && $favicons ? 'ok' : 'ko' + 'persona' => $persona ? 'ok' : 'ko', + 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $data && $cache && $log && $favicons && $persona ? 'ok' : 'ko' ); } @@ -710,6 +720,12 @@ function printStep1 () {

+ +

+ +

+ + -- cgit v1.2.3 From ae386823abf8ec095f7828e29f5b2a8981353fba Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 7 Jan 2014 18:00:03 +0100 Subject: Revert "Debug Persona temporaire" This reverts commit 1fb25addd09660c08ff74b960b1c226acc319978. --- app/Controllers/indexController.php | 5 ----- app/FreshRSS.php | 5 ----- 2 files changed, 10 deletions(-) (limited to 'app') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 9817b7a81..690ca57be 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -237,7 +237,6 @@ class FreshRSS_index_Controller extends Minz_ActionController { $assert = Minz_Request::param ('assertion'); $params = 'assertion=' . $assert . '&audience=' . urlencode (Minz_Url::display (null, 'php', true)); - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' login params=' . print_r($params, true) . "\n", FILE_APPEND); //DEBUG $ch = curl_init (); $options = array ( CURLOPT_URL => $url, @@ -253,10 +252,8 @@ class FreshRSS_index_Controller extends Minz_ActionController { $loginOk = false; $reason = ''; - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' login response=' . print_r($res, true) . "\n", FILE_APPEND); //DEBUG if ($res['status'] === 'okay') { $email = filter_var($res['email'], FILTER_VALIDATE_EMAIL); - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' filtered_email=' . $email . "\n", FILE_APPEND); //DEBUG if ($email != '') { $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; if (($currentUser = @file_get_contents($personaFile)) !== false) { @@ -280,14 +277,12 @@ class FreshRSS_index_Controller extends Minz_ActionController { Minz_Session::_param('currentUser', $currentUser); Minz_Session::_param ('mail', $email); $this->view->loginOk = true; - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Login OK email=' . $email . ', currentUser=' . $currentUser . "\n", FILE_APPEND); //DEBUG invalidateHttpCache(); } else { $res = array (); $res['status'] = 'failure'; $res['reason'] = $reason == '' ? Minz_Translate::t ('invalid_login') : $reason; Minz_Log::record ('Persona: ' . $res['reason'], Minz_Log::WARNING); - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Failure=' . print_r($res, true) . "\n", FILE_APPEND); //DEBUG } header('Content-Type: application/json; charset=UTF-8'); diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 86d35a6e7..f9857a4cb 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -11,7 +11,6 @@ class FreshRSS extends Minz_FrontController { } private function accessControl($currentUser) { - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' authType=' . Minz_Configuration::authType() . "\n", FILE_APPEND); //DEBUG if ($currentUser == '') { switch (Minz_Configuration::authType()) { case 'http_auth': @@ -19,15 +18,12 @@ class FreshRSS extends Minz_FrontController { $loginOk = $currentUser != ''; break; case 'persona': - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona access control' . "\n", FILE_APPEND); //DEBUG $loginOk = false; $email = filter_var(Minz_Session::param('mail'), FILTER_VALIDATE_EMAIL); - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona email=' . Minz_Session::param('mail') . ', filtered_email=' . $email . "\n", FILE_APPEND); if ($email != '') { //TODO: Remove redundancy with indexController $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; if (($currentUser = @file_get_contents($personaFile)) !== false) { $currentUser = trim($currentUser); - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona user from file=' . $currentUser . "\n", FILE_APPEND); //DEBUG $loginOk = true; } } @@ -81,7 +77,6 @@ class FreshRSS extends Minz_FrontController { $loginOk = strcasecmp($currentUser, httpAuthUser()) === 0; break; case 'persona': - file_put_contents(DATA_PATH . '/log/persona.log', date('c') . ' Persona compare session_email=' . Minz_Session::param('mail') . ' with config_email=' . $this->conf->mail_login . "\n", FILE_APPEND); //DEBUG $loginOk = strcasecmp(Minz_Session::param('mail'), $this->conf->mail_login) === 0; break; case 'none': -- cgit v1.2.3 From b381d2a592ebe4e3446e342fdcf961d76f33e89a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 7 Jan 2014 20:38:45 +0100 Subject: Un peu de typographie MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remplace les tirets de soustraction par points médians ou des tirets cadratins (si c'est trop long, nous pourrions mettre des demi-cadratins). * Met les abréviations des jours anglais en exposant, comme `3rd` --- app/Controllers/configureController.php | 18 +++++++++--------- app/Controllers/errorController.php | 2 +- app/Controllers/indexController.php | 6 +++--- app/i18n/en.php | 4 ++-- app/i18n/fr.php | 4 ++-- app/i18n/install.en.php | 4 ++-- app/i18n/install.fr.php | 4 ++-- app/views/configure/display.phtml | 8 ++++---- app/views/helpers/view/normal_view.phtml | 6 +++--- app/views/helpers/view/reader_view.phtml | 2 +- app/views/index/about.phtml | 2 +- p/scripts/main.js | 2 +- 12 files changed, 31 insertions(+), 31 deletions(-) (limited to 'app') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 0a403fc2d..5b5770cbe 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -66,7 +66,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $this->view->feeds = $feedDAO->listFeeds (); $this->view->flux = false; - Minz_View::prependTitle (Minz_Translate::t ('categories_management') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('categories_management') . ' · '); } public function feedAction () { @@ -133,10 +133,10 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Request::forward (array ('c' => 'configure', 'a' => 'feed', 'params' => array ('id' => $id)), true); } - Minz_View::prependTitle (Minz_Translate::t ('rss_feed_management') . ' - ' . $this->view->flux->name () . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('rss_feed_management') . ' — ' . $this->view->flux->name () . ' · '); } } else { - Minz_View::prependTitle (Minz_Translate::t ('rss_feed_management') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('rss_feed_management') . ' · '); } } @@ -185,7 +185,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $this->view->themes = FreshRSS_Themes::get(); - Minz_View::prependTitle (Minz_Translate::t ('reading_configuration') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('reading_configuration') . ' · '); } public function sharingAction () { @@ -212,7 +212,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Request::forward (array ('c' => 'configure', 'a' => 'sharing'), true); } - Minz_View::prependTitle (Minz_Translate::t ('sharing_management') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('sharing') . ' · '); } public function importExportAction () { @@ -277,7 +277,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { // au niveau de la vue, permet de ne pas voir un flux sélectionné dans la liste $this->view->flux = false; - Minz_View::prependTitle (Minz_Translate::t ('import_export_opml') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('import_export_opml') . ' · '); } public function shortcutAction () { @@ -313,11 +313,11 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Request::forward (array ('c' => 'configure', 'a' => 'shortcut'), true); } - Minz_View::prependTitle (Minz_Translate::t ('shortcuts_management') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('shortcuts') . ' · '); } public function usersAction() { - Minz_View::prependTitle(Minz_Translate::t ('users') . ' - '); + Minz_View::prependTitle(Minz_Translate::t ('users') . ' · '); } public function archivingAction () { @@ -339,7 +339,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Request::forward(array('c' => 'configure', 'a' => 'archiving'), true); } - Minz_View::prependTitle(Minz_Translate::t('archiving_configuration') . ' - '); + Minz_View::prependTitle(Minz_Translate::t('archiving_configuration') . ' · '); $entryDAO = new FreshRSS_EntryDAO(); $this->view->nb_total = $entryDAO->count(); diff --git a/app/Controllers/errorController.php b/app/Controllers/errorController.php index d1c2f8fec..dc9a2ee25 100644 --- a/app/Controllers/errorController.php +++ b/app/Controllers/errorController.php @@ -21,6 +21,6 @@ class FreshRSS_error_Controller extends Minz_ActionController { $this->view->logs = Minz_Request::param ('logs'); - Minz_View::prependTitle ($this->view->code . ' - '); + Minz_View::prependTitle ($this->view->code . ' · '); } } diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 690ca57be..81dfefabb 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -83,7 +83,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { Minz_View::prependTitle ( $this->view->currentName . ($this->nb_not_read_cat > 0 ? ' (' . $this->nb_not_read_cat . ')' : '') . - ' - ' + ' · ' ); // On récupère les différents éléments de filtrage @@ -204,7 +204,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { } public function aboutAction () { - Minz_View::prependTitle (Minz_Translate::t ('about') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('about') . ' · '); } public function logsAction () { @@ -215,7 +215,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { ); } - Minz_View::prependTitle (Minz_Translate::t ('logs') . ' - '); + Minz_View::prependTitle (Minz_Translate::t ('logs') . ' · '); if (Minz_Request::isPost ()) { FreshRSS_LogDAO::truncate(); diff --git a/app/i18n/en.php b/app/i18n/en.php index 06bbf48e6..4588a054a 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -287,6 +287,6 @@ return array ( 'Nov' => '\N\o\v\e\m\b\e\r', 'Dec' => '\D\e\c\e\m\b\e\r', // format for date() function, %s allows to indicate month in letter - 'format_date' => '%s dS Y', - 'format_date_hour' => '%s dS Y \a\t H\.i', + 'format_date' => '%s j\<\s\u\p\>S\<\/\s\u\p\> Y', + 'format_date_hour' => '%s j\<\s\u\p\>S\<\/\s\u\p\> Y \a\t H\.i', ); diff --git a/app/i18n/fr.php b/app/i18n/fr.php index cb689610b..20085e6b4 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -287,6 +287,6 @@ return array ( 'Nov' => '\n\o\v\e\m\b\r\e', 'Dec' => '\d\é\c\e\m\b\r\e', // format pour la fonction date(), %s permet d'indiquer le mois en toutes lettres - 'format_date' => 'd %s Y', - 'format_date_hour' => '\l\e d %s Y \à H\:i', + 'format_date' => 'j %s Y', + 'format_date_hour' => '\l\e j %s Y \à H\:i', ); diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php index 8145abffa..24335c6c9 100644 --- a/app/i18n/install.en.php +++ b/app/i18n/install.en.php @@ -1,8 +1,8 @@ 'Installation - FreshRSS', + 'freshrss_installation' => 'Installation · FreshRSS', 'freshrss' => 'FreshRSS', - 'installation_step' => 'Installation - step %d', + 'installation_step' => 'Installation — step %d · FreshRSS', 'steps' => 'Steps', 'checks' => 'Checks', 'general_configuration' => 'General configuration', diff --git a/app/i18n/install.fr.php b/app/i18n/install.fr.php index 3211ddf19..554d17587 100644 --- a/app/i18n/install.fr.php +++ b/app/i18n/install.fr.php @@ -1,8 +1,8 @@ 'Installation - FreshRSS', + 'freshrss_installation' => 'Installation · FreshRSS', 'freshrss' => 'FreshRSS', - 'installation_step' => 'Installation - étape %d', + 'installation_step' => 'Installation — étape %d · FreshRSS', 'steps' => 'Étapes', 'checks' => 'Vérifications', 'general_configuration' => 'Configuration générale', diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 11a987610..3cc5442fb 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -24,7 +24,7 @@ @@ -81,7 +81,7 @@ @@ -91,7 +91,7 @@ @@ -101,7 +101,7 @@ diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 5e46f3c8e..7e4457ecc 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -43,14 +43,14 @@ if (!empty($this->entries)) { isDay (FreshRSS_Days::TODAY, $this->today)) { ?>
- - + currentName; ?>
isDay (FreshRSS_Days::YESTERDAY, $this->today)) { ?>
- - + currentName; ?>
@@ -118,7 +118,7 @@ if (!empty($this->entries)) { link ()); - $title = urlencode ($item->title () . ' - ' . $feed->name ()); + $title = urlencode ($item->title () . ' · ' . $feed->name ()); ?> ✇ - name(); ?> + name(); ?> -- cgit v1.2.3 From eb50ab3b61ee2280dac2696598a58803e246fe22 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 11 Jan 2014 16:48:10 +0100 Subject: Mot de passe + nonce serveur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Début de https://github.com/marienfressinaud/FreshRSS/issues/104 --- README.md | 7 ++----- app/Controllers/javascriptController.php | 27 +++++++++++++++++++++++++++ app/Models/Configuration.php | 4 ++++ app/views/javascript/nonce.phtml | 2 ++ 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 app/views/javascript/nonce.phtml (limited to 'app') diff --git a/README.md b/README.md index 96e25f4df..4100a8638 100644 --- a/README.md +++ b/README.md @@ -74,17 +74,14 @@ mysqldump -u utilisateur -p --databases freshrss > freshrss.sql ``` - ---- - # Bibliothèques incluses -* [SimplePie](https://github.com/simplepie/simplepie) +* [SimplePie](http://simplepie.org/) * [MINZ](https://github.com/marienfressinaud/MINZ) * [php-http-304](http://alexandre.alapetite.fr/doc-alex/php-http-304/) * [jQuery](http://jquery.com/) * [keyboard_shortcuts](http://www.openjs.com/scripts/events/keyboard_shortcuts/) -## Uniquement dans certaines configurations +## Uniquement pour certaines options * [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) * [phpQuery](http://code.google.com/p/phpquery/) * [Lazy Load](http://www.appelsiini.net/projects/lazyload) diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php index 2d0ff4984..e29f439d8 100755 --- a/app/Controllers/javascriptController.php +++ b/app/Controllers/javascriptController.php @@ -16,4 +16,31 @@ class FreshRSS_javascript_Controller extends Minz_ActionController { $catDAO = new FreshRSS_CategoryDAO(); $this->view->categories = $catDAO->listCategories(true, false); } + + // For Web-form login + public function nonceAction() { + header('Content-Type: application/json; charset=UTF-8'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s \G\M\T')); + header('Expires: 0'); + header('Cache-Control: private, no-cache, no-store, must-revalidate'); + header('Pragma: no-cache'); + + $user = isset($_GET['user']) ? $_GET['user'] : ''; + if (ctype_alnum($user)) { + try { + $conf = new FreshRSS_Configuration($user); + $hash = $conf->passwordHash; //CRYPT_BLOWFISH - Blowfish hashing with a salt as follows: "$2a$", "$2x$" or "$2y$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z". + if (strlen($hash) >= 60) { + $this->view->salt1 = substr($hash, 0, 29); + $this->view->nonce = sha1(Minz_Configuration::salt() . uniqid(mt_rand(), true)); + Minz_Session::_param ('nonce', $this->view->nonce); + return; //Success + } + } catch (Minz_Exception $me) { + Minz_Log::record ('Login failure: ' . $me->getMessage(), Minz_Log::WARNING); + } + } + $this->view->nonce = ''; //Failure + $this->view->salt1 = ''; + } } diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index c29e74603..8f394737a 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -9,6 +9,7 @@ class FreshRSS_Configuration { 'keep_history_default' => 0, 'mail_login' => '', 'token' => '', + 'passwordHash' => '', //CRYPT_BLOWFISH 'posts_per_page' => 20, 'view_mode' => 'normal', 'default_view' => 'not_read', @@ -162,6 +163,9 @@ class FreshRSS_Configuration { } } } + public function _passwordHash ($value) { + $this->data['passwordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : ''; + } public function _mail_login ($value) { $value = filter_var($value, FILTER_VALIDATE_EMAIL); if ($value) { diff --git a/app/views/javascript/nonce.phtml b/app/views/javascript/nonce.phtml new file mode 100644 index 000000000..4ac46c8fc --- /dev/null +++ b/app/views/javascript/nonce.phtml @@ -0,0 +1,2 @@ + $this->salt1, 'nonce' => $this->nonce)); -- cgit v1.2.3 From 43f1b227b459f8edade9d551164c18f56cfa1925 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 11 Jan 2014 17:13:22 +0100 Subject: Configuration du mot de passe https://github.com/marienfressinaud/FreshRSS/issues/104 --- app/Controllers/usersController.php | 13 +++++++++++++ app/i18n/en.php | 3 ++- app/i18n/fr.php | 3 ++- app/views/configure/users.phtml | 8 ++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index 482e35c3e..8954c845d 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -14,8 +14,21 @@ class FreshRSS_users_Controller extends Minz_ActionController { if (Minz_Request::isPost()) { $ok = true; + $passwordPlain = Minz_Request::param('passwordPlain', false); + if ($passwordPlain != '') { + Minz_Request::_param('passwordPlain'); //Discard plain-text password ASAP + $_POST['passwordPlain'] = ''; + if (!function_exists('password_hash')) { + include_once(LIB_PATH . '/password_compat.php'); + } + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT); //A bit expensive, on purpose + $passwordPlain = ''; + $this->view->conf->_passwordHash($passwordHash); + } + $mail = Minz_Request::param('mail_login', false); $this->view->conf->_mail_login($mail); + $ok &= $this->view->conf->save(); $email = $this->view->conf->mail_login; diff --git a/app/i18n/en.php b/app/i18n/en.php index 89af15b17..3b9936e8e 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -161,7 +161,8 @@ return array ( 'current_user' => 'Current user', 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', - 'persona_connection_email' => 'Login mail address (for Mozilla Persona)', + 'password' =>'Password
(for the Web-form login method)', + 'persona_connection_email' => 'Login mail address
(for Mozilla Persona)', 'allow_anonymous' => 'Allow anonymous reading for the default user (%s)', 'auth_token' => 'Authentication token', 'explain_token' => 'Allows to access RSS output of the default user without authentication.
%s?token=%s', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index d4c96c1db..7e71cbb6d 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -160,8 +160,9 @@ return array ( 'think_to_add' => 'Pensez à en ajouter !', 'current_user' => 'Utilisateur actuel', + 'password' =>'Mot de passe
(pour connexion par formulaire)', 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', - 'persona_connection_email' => 'Adresse courriel de connexion (pour Mozilla Persona)', + 'persona_connection_email' => 'Adresse courriel de connexion
(pour Mozilla Persona)', 'allow_anonymous' => 'Autoriser la lecture anonyme pour l’utilisateur par défaut (%s)', 'auth_token' => 'Jeton d’identification', 'explain_token' => 'Permet d’accéder à la sortie RSS de l’utilisateur par défaut sans besoin de s’authentifier.
%s?output=rss&token=%s', diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index d40a3ad5b..68111bdbe 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -17,6 +17,14 @@ +
+ +
+ + +
+
+
conf->mail_login; ?> -- cgit v1.2.3 From d58886a937cbe425163526fc2ba3d2a118602035 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jan 2014 03:10:31 +0100 Subject: Implémentation de l'indentification par mot de passe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémentation de https://github.com/marienfressinaud/FreshRSS/issues/104 --- CHANGELOG | 3 ++ app/Controllers/indexController.php | 52 +++++++++++++++++++++++++++-- app/Controllers/javascriptController.php | 12 +++---- app/Controllers/usersController.php | 26 ++++++++++++--- app/FreshRSS.php | 27 ++++++++++++--- app/i18n/en.php | 7 ++-- app/i18n/fr.php | 7 ++-- app/layout/header.phtml | 51 +++++++++++++++++++--------- app/views/configure/users.phtml | 16 ++++++--- app/views/helpers/javascript_vars.phtml | 4 +-- app/views/helpers/view/login.phtml | 43 ++++++++++++++++++++++++ app/views/index/index.phtml | 14 ++------ lib/Minz/Configuration.php | 3 +- lib/Minz/FrontController.php | 2 +- p/scripts/main.js | 57 ++++++++++++++++++++++++++++++-- 15 files changed, 265 insertions(+), 59 deletions(-) create mode 100644 app/views/helpers/view/login.phtml (limited to 'app') diff --git a/CHANGELOG b/CHANGELOG index fe856fe4a..5c9b56465 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ * Nouveau mode multi-utilisateur * L’utilisateur par défaut (administrateur) peut créer et supprimer d’autres utilisateurs * Nécessite un contrôle d’accès, soit : + * par le nouveau mode de connexion par formulaire (nom d’utilisateur + mot de passe) + * relativement sûr même sans HTTPS (le mot de passe n’est pas transmis en clair) * par HTTP (par exemple sous Apache en créant un fichier ./p/i/.htaccess et .htpasswd) * le nom d’utilisateur HTTP doit correspondre au nom d’utilisateur FreshRSS * par Mozilla Persona, en renseignant l’adresse courriel des utilisateurs @@ -68,6 +70,7 @@ * Réorganisation des fichiers et répertoires, en particulier : * Tous les fichiers utilisateur sont dans “./data/” (y compris “cache”, “favicons”, et “log”) * Déplacement de “./app/configuration/application.ini” vers “./data/config.php” + * Meilleure sécurité et compatibilité * Déplacement de “./public/data/Configuration.array.php” vers “./data/*_user.php” * Déplacement de “./public/” vers “./p/” * Déplacement de “./public/index.php” vers “./p/i/index.php” (voir cookie ci-dessous) diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 81dfefabb..772a08f30 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -47,8 +47,6 @@ class FreshRSS_index_Controller extends Minz_ActionController { $this->view->_useLayout (false); header('Content-Type: application/rss+xml; charset=utf-8'); } else { - Minz_View::appendScript (Minz_Url::display ('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); - if ($output === 'global') { Minz_View::appendScript (Minz_Url::display ('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js'))); } @@ -290,8 +288,56 @@ class FreshRSS_index_Controller extends Minz_ActionController { } public function logoutAction () { + $this->view->_useLayout(false); + invalidateHttpCache(); + Minz_Session::_param('currentUser'); + Minz_Session::_param('mail'); + Minz_Session::_param('passwordHash'); + } + + public function formLoginAction () { $this->view->_useLayout (false); - Minz_Session::_param ('mail'); + if (Minz_Request::isPost()) { + $ok = false; + $nonce = Minz_Session::param('nonce'); + $username = Minz_Request::param('username', ''); + $c = Minz_Request::param('challenge', ''); + if (ctype_alnum($username) && ctype_graph($c) && ctype_alnum($nonce)) { + if (!function_exists('password_verify')) { + include_once(LIB_PATH . '/password_compat.php'); + } + try { + $conf = new FreshRSS_Configuration($username); + $s = $conf->passwordHash; + $ok = password_verify($nonce . $s, $c); + if ($ok) { + Minz_Session::_param('currentUser', $username); + Minz_Session::_param('passwordHash', $s); + } else { + Minz_Log::record('Password mismatch for user ' . $username . ', nonce=' . $nonce . ', c=' . $c, Minz_Log::WARNING); + } + } catch (Minz_Exception $me) { + Minz_Log::record('Login failure: ' . $me->getMessage(), Minz_Log::WARNING); + } + } + if (!$ok) { + $notif = array( + 'type' => 'bad', + 'content' => Minz_Translate::t('invalid_login') + ); + Minz_Session::_param('notification', $notif); + } + } + invalidateHttpCache(); + Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); + } + + public function formLogoutAction () { + $this->view->_useLayout(false); invalidateHttpCache(); + Minz_Session::_param('currentUser'); + Minz_Session::_param('mail'); + Minz_Session::_param('passwordHash'); + Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); } } diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php index e29f439d8..02e424437 100755 --- a/app/Controllers/javascriptController.php +++ b/app/Controllers/javascriptController.php @@ -17,7 +17,7 @@ class FreshRSS_javascript_Controller extends Minz_ActionController { $this->view->categories = $catDAO->listCategories(true, false); } - // For Web-form login + //For Web-form login public function nonceAction() { header('Content-Type: application/json; charset=UTF-8'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s \G\M\T')); @@ -29,15 +29,15 @@ class FreshRSS_javascript_Controller extends Minz_ActionController { if (ctype_alnum($user)) { try { $conf = new FreshRSS_Configuration($user); - $hash = $conf->passwordHash; //CRYPT_BLOWFISH - Blowfish hashing with a salt as follows: "$2a$", "$2x$" or "$2y$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z". - if (strlen($hash) >= 60) { - $this->view->salt1 = substr($hash, 0, 29); + $s = $conf->passwordHash; + if (strlen($s) >= 60) { + $this->view->salt1 = substr($s, 0, 29); //CRYPT_BLOWFISH Salt: "$2a$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z". $this->view->nonce = sha1(Minz_Configuration::salt() . uniqid(mt_rand(), true)); - Minz_Session::_param ('nonce', $this->view->nonce); + Minz_Session::_param('nonce', $this->view->nonce); return; //Success } } catch (Minz_Exception $me) { - Minz_Log::record ('Login failure: ' . $me->getMessage(), Minz_Log::WARNING); + Minz_Log::record('Login failure: ' . $me->getMessage(), Minz_Log::WARNING); } } $this->view->nonce = ''; //Failure diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index 8954c845d..cb5ebd209 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -21,18 +21,20 @@ class FreshRSS_users_Controller extends Minz_ActionController { if (!function_exists('password_hash')) { include_once(LIB_PATH . '/password_compat.php'); } - $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT); //A bit expensive, on purpose + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => 8)); //This will also have to be computed client side on mobile devices, so do not use a too high cost $passwordPlain = ''; + $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js $this->view->conf->_passwordHash($passwordHash); } - $mail = Minz_Request::param('mail_login', false); - $this->view->conf->_mail_login($mail); + $email = Minz_Request::param('mail_login', false); + $this->view->conf->_mail_login($email); $ok &= $this->view->conf->save(); $email = $this->view->conf->mail_login; Minz_Session::_param('mail', $email); + Minz_Session::_param('passwordHash', $this->view->conf->passwordHash); if ($email != '') { $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; @@ -89,10 +91,25 @@ class FreshRSS_users_Controller extends Minz_ActionController { $ok &= !file_exists($configPath); } if ($ok) { + + $passwordPlain = Minz_Request::param('new_user_passwordPlain', false); + $passwordHash = ''; + if ($passwordPlain != '') { + Minz_Request::_param('new_user_passwordPlain'); //Discard plain-text password ASAP + $_POST['new_user_passwordPlain'] = ''; + if (!function_exists('password_hash')) { + include_once(LIB_PATH . '/password_compat.php'); + } + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => 8)); + $passwordPlain = ''; + } + if (empty($passwordHash)) { + $passwordHash = ''; + } + $new_user_email = filter_var($_POST['new_user_email'], FILTER_VALIDATE_EMAIL); if (empty($new_user_email)) { $new_user_email = ''; - $ok &= Minz_Configuration::authType() !== 'persona'; } else { $personaFile = DATA_PATH . '/persona/' . $new_user_email . '.txt'; @unlink($personaFile); @@ -102,6 +119,7 @@ class FreshRSS_users_Controller extends Minz_ActionController { if ($ok) { $config_array = array( 'language' => $new_user_language, + 'passwordHash' => $passwordHash, 'mail_login' => $new_user_email, ); $ok &= (file_put_contents($configPath, "accessControl(Minz_Session::param('currentUser', '')); + $loginOk = $this->accessControl(Minz_Session::param('currentUser', '')); $this->loadParamsView(); - $this->loadStylesAndScripts(); //TODO: Do not load that when not needed, e.g. some Ajax requests + $this->loadStylesAndScripts($loginOk); //TODO: Do not load that when not needed, e.g. some Ajax requests $this->loadNotifications(); } private function accessControl($currentUser) { if ($currentUser == '') { switch (Minz_Configuration::authType()) { + case 'form': + $currentUser = Minz_Configuration::defaultUser(); + Minz_Session::_param('passwordHash'); + $loginOk = false; + break; case 'http_auth': $currentUser = httpAuthUser(); $loginOk = $currentUser != ''; @@ -73,6 +78,9 @@ class FreshRSS extends Minz_FrontController { if ($loginOk) { switch (Minz_Configuration::authType()) { + case 'form': + $loginOk = Minz_Session::param('passwordHash') === $this->conf->passwordHash; + break; case 'http_auth': $loginOk = strcasecmp($currentUser, httpAuthUser()) === 0; break; @@ -92,6 +100,7 @@ class FreshRSS extends Minz_FrontController { } } Minz_View::_param ('loginOk', $loginOk); + return $loginOk; } private function loadParamsView () { @@ -104,7 +113,7 @@ class FreshRSS extends Minz_FrontController { } } - private function loadStylesAndScripts () { + private function loadStylesAndScripts ($loginOk) { $theme = FreshRSS_Themes::get_infos($this->conf->theme); if ($theme) { foreach($theme['files'] as $file) { @@ -112,14 +121,22 @@ class FreshRSS extends Minz_FrontController { } } - if (Minz_Configuration::authType() === 'persona') { - Minz_View::appendScript ('https://login.persona.org/include.js'); + switch (Minz_Configuration::authType()) { + case 'form': + if (!$loginOk) { + Minz_View::appendScript(Minz_Url::display ('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js'))); + } + break; + case 'persona': + Minz_View::appendScript('https://login.persona.org/include.js'); + break; } $includeLazyLoad = $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param ('output') === 'reader'); Minz_View::appendScript (Minz_Url::display ('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')), false, !$includeLazyLoad, !$includeLazyLoad); if ($includeLazyLoad) { Minz_View::appendScript (Minz_Url::display ('/scripts/jquery.lazyload.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.lazyload.min.js'))); } + Minz_View::appendScript (Minz_Url::display ('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); Minz_View::appendScript (Minz_Url::display ('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js'))); } diff --git a/app/i18n/en.php b/app/i18n/en.php index 3b9936e8e..71ca9538f 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -170,6 +170,9 @@ return array ( 'is_admin' => 'is administrator', 'auth_type' => 'Authentication method', 'auth_none' => 'None (dangerous)', + 'auth_form' => 'Web form (traditional, requires JavaScript)', + 'http_auth' => 'HTTP (for advanced users with HTTPS)', + 'auth_persona' => 'Mozilla Persona (modern, requires JavaScript)', 'users_list' => 'List of users', 'create_user' => 'Create new user', 'username' => 'Username', @@ -258,8 +261,8 @@ return array ( 'logs_empty' => 'Log file is empty', 'clear_logs' => 'Clear the logs', - 'forbidden_access' => 'Forbidden access', - 'forbidden_access_description' => 'Access is password protected, please to read your feeds.', + 'forbidden_access' => 'Access forbidden! (%s)', + '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 7e71cbb6d..8ffc5ec88 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -170,6 +170,9 @@ return array ( 'is_admin' => 'est administrateur', 'auth_type' => 'Méthode d’authentification', 'auth_none' => 'Aucune (dangereux)', + 'auth_form' => 'Formulaire (traditionnel, requiert JavaScript)', + 'http_auth' => 'HTTP (pour utilisateurs avancés avec HTTPS)', + 'auth_persona' => 'Mozilla Persona (moderne, requiert JavaScript)', 'users_list' => 'Liste des utilisateurs', 'create_user' => 'Créer un nouvel utilisateur', 'username' => 'Nom d’utilisateur', @@ -258,8 +261,8 @@ return array ( 'logs_empty' => 'Les logs sont vides', 'clear_logs' => 'Effacer les logs', - 'forbidden_access' => 'Accès interdit', - 'forbidden_access_description' => 'L’accès est protégé par un mot de passe, veuillez pour accéder aux flux.', + 'forbidden_access' => 'Accès interdit ! (%s)', + '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/layout/header.phtml b/app/layout/header.phtml index 0f2c524c4..e90da6196 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,12 +1,25 @@ - - - +
@@ -62,16 +75,24 @@
  • - -
  • -
  • - +
  • - +
    - +
    diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 68111bdbe..1597004e1 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -20,7 +20,7 @@
    - +
    @@ -52,11 +52,11 @@
    - $_SERVER['REMOTE_USER'] = ``
    @@ -141,6 +141,14 @@ +
    + +
    + + +
    +
    +
    conf->mail_login; ?> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 92c068f7e..935294e60 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -30,8 +30,8 @@ if ($mail != 'null') { $mail = '"' . $mail . '"'; } - echo 'use_persona=', Minz_Configuration::authType() === 'persona' ? 'true' : 'false', - ',url_freshrss="', _url ('index', 'index'), '",', + echo 'authType="', Minz_Configuration::authType(), '",', + 'url_freshrss="', _url ('index', 'index'), '",', 'url_login="', _url ('index', 'login'), '",', 'url_logout="', _url ('index', 'logout'), '",', 'current_user_mail=', $mail, ",\n"; diff --git a/app/views/helpers/view/login.phtml b/app/views/helpers/view/login.phtml new file mode 100644 index 000000000..e4a24f9ed --- /dev/null +++ b/app/views/helpers/view/login.phtml @@ -0,0 +1,43 @@ +
    + +

    +
    + +
    + +
    +
    +
    + +
    + + + +
    +
    +
    +
    + +
    +
    +

    FreshRSS

    +

    + +

    +
    diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 549d0b61e..9b69233e9 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -1,15 +1,5 @@
    -

    -

    -

    -
    loginOk || Minz_Configuration::allowAnonymous()) { @@ -31,8 +21,8 @@ if ($this->loginOk || Minz_Configuration::allowAnonymous()) { if ($token_is_ok) { $this->renderHelper ('view/rss_view'); } else { - showForbidden(); + $this->renderHelper ('view/login'); } } else { - showForbidden(); + $this->renderHelper ('view/login'); } diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 2c30661ed..433992e0d 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -109,7 +109,7 @@ class Minz_Configuration { return self::$auth_type !== 'none'; } public static function canLogIn() { - return self::$auth_type === 'persona'; + return self::$auth_type === 'form' || self::$auth_type === 'persona'; } public static function _allowAnonymous($allow = false) { @@ -118,6 +118,7 @@ class Minz_Configuration { public static function _authType($value) { $value = strtolower($value); switch ($value) { + case 'form': case 'http_auth': case 'persona': case 'none': diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php index 7b8526bc8..80eda8877 100644 --- a/lib/Minz/FrontController.php +++ b/lib/Minz/FrontController.php @@ -34,7 +34,7 @@ class Minz_FrontController { */ public function __construct () { if (LOG_PATH === false) { - $this->killApp ('Path doesn’t exist : LOG_PATH'); + $this->killApp ('Path not found: LOG_PATH'); } try { diff --git a/p/scripts/main.js b/p/scripts/main.js index 24af1b210..0c4c3f1b2 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -587,6 +587,54 @@ function init_load_more(box) { } // +// +function poormanSalt() { //If crypto.getRandomValues is not available + var text = '$2a$04$', + base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789/abcdefghijklmnopqrstuvwxyz'; + for (var i = 22; i > 0; i--) { + text += base.charAt(Math.floor(Math.random() * 64)); + } + return text; +} + +function init_loginForm() { + var $loginForm = $('#loginForm'); + if ($loginForm.length === 0) { + return; + } + if (!(window.dcodeIO)) { + if (window.console) { + console.log('FreshRSS waiting for bcrypt.js…'); + } + window.setTimeout(init_loginForm, 100); + return; + } + $loginForm.on('submit', function() { + $('#loginButton').attr('disabled', ''); + var success = false; + $.ajax({ + url: './?c=javascript&a=nonce&user=' + $('#username').val(), + dataType: 'json', + async: false + }).done(function (data) { + if (data.salt1 == '' || data.nonce == '') { + alert('Invalid user!'); + } else { + var strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function'), + s = dcodeIO.bcrypt.hashSync($('#passwordPlain').val(), data.salt1), + c = dcodeIO.bcrypt.hashSync(data.nonce + s, strong ? 4 : poormanSalt()); + $('#challenge').val(c); + success = true; + } + }).fail(function() { + alert('Communication error!'); + }); + $('#loginButton').removeAttr('disabled'); + return success; + }); +} +// + // function init_persona() { if (!(navigator.id)) { @@ -696,8 +744,13 @@ function init_all() { init_notifications(); init_actualize(); init_load_more($stream); - if (use_persona) { - init_persona(); + switch (authType) { + case 'form': + init_loginForm(); + break; + case 'persona': + init_persona(); + break; } init_confirm_action(); init_print_action(); -- cgit v1.2.3 From 0f481f7f24dfad3bf9775213f487dd6802b6cb6a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jan 2014 14:00:02 +0100 Subject: Permet aux utilisations non-administrateurs de changer leur mot de passe https://github.com/marienfressinaud/FreshRSS/issues/104 --- app/Controllers/usersController.php | 21 +++++++++++++-------- app/views/configure/users.phtml | 2 -- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'app') diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index cb5ebd209..7e44b3d35 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -1,6 +1,9 @@ view->loginOk) { Minz_Error::error( @@ -21,20 +24,21 @@ class FreshRSS_users_Controller extends Minz_ActionController { if (!function_exists('password_hash')) { include_once(LIB_PATH . '/password_compat.php'); } - $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => 8)); //This will also have to be computed client side on mobile devices, so do not use a too high cost + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST)); $passwordPlain = ''; $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js + $ok &= ($passwordHash != ''); $this->view->conf->_passwordHash($passwordHash); } + Minz_Session::_param('passwordHash', $this->view->conf->passwordHash); - $email = Minz_Request::param('mail_login', false); - $this->view->conf->_mail_login($email); - - $ok &= $this->view->conf->save(); - + if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { + $this->view->conf->_mail_login(Minz_Request::param('mail_login', false)); + } $email = $this->view->conf->mail_login; Minz_Session::_param('mail', $email); - Minz_Session::_param('passwordHash', $this->view->conf->passwordHash); + + $ok &= $this->view->conf->save(); if ($email != '') { $personaFile = DATA_PATH . '/persona/' . $email . '.txt'; @@ -100,8 +104,9 @@ class FreshRSS_users_Controller extends Minz_ActionController { if (!function_exists('password_hash')) { include_once(LIB_PATH . '/password_compat.php'); } - $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => 8)); + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST)); $passwordPlain = ''; + $ok &= ($passwordHash != ''); } if (empty($passwordHash)) { $passwordHash = ''; diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 1597004e1..0419df747 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -34,14 +34,12 @@
    -
    - -- cgit v1.2.3 From 4de5e6c2756f2a300014b80108cf2bf5e91f69a3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jan 2014 20:26:26 +0100 Subject: Corrige problème CSS partage/tags + problème raffraîchissement automatique des articles non-lus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + Léger nettoyage JavaScript --- app/views/helpers/javascript_vars.phtml | 2 -- p/scripts/main.js | 53 +++++++++++++++++---------------- p/themes/default/freshrss.css | 4 ++- p/themes/default_dark/freshrss.css | 4 ++- p/themes/flat-design/freshrss.css | 4 ++- 5 files changed, 36 insertions(+), 31 deletions(-) (limited to 'app') diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 935294e60..f4f36b4f3 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -36,8 +36,6 @@ 'url_logout="', _url ('index', 'logout'), '",', 'current_user_mail=', $mail, ",\n"; - echo 'load_shortcuts=', Minz_Request::controllerName () === 'index' && Minz_Request::actionName () === 'index' ? 'true' : 'false', ",\n"; - echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n"; $autoActualise = Minz_Session::param('actualize_feeds', false); diff --git a/p/scripts/main.js b/p/scripts/main.js index 0c4c3f1b2..7415d0c24 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -61,7 +61,11 @@ function incUnreadsFeed(article, feed_id, nb) { //Update unread: title document.title = document.title.replace(/((?: \(\d+\))?)( · .*?)((?: \(\d+\))?)$/, function (m, p1, p2, p3) { - return incLabel(p1, nb) + p2 + incLabel(p3, feed_priority > 0 ? nb : 0); + if (article || ($('#' + feed_id).closest('.active').length > 0)) { + return incLabel(p1, nb) + p2 + incLabel(p3, feed_priority > 0 ? nb : 0); + } else { + return p1 + p2 + incLabel(p3, feed_priority > 0 ? nb : 0); + } }); } @@ -312,6 +316,14 @@ function init_column_categories() { $(this).parent().next(".feeds").slideToggle(); return false; }); + $('#aside_flux').on('click', '.feeds .dropdown-toggle', function () { + if ($(this).nextAll('.dropdown-menu').length === 0) { + var feed_id = $(this).closest('li').attr('id').substr(2), + feed_web = $(this).data('fweb'), + template = $('#feed_config_template').html().replace(/!!!!!!/g, feed_id).replace('http://example.net/', feed_web); + $(this).attr('href', '#dropdown-' + feed_id).prev('.dropdown-target').attr('id', 'dropdown-' + feed_id).parent().append(template); + } + }); } function init_shortcuts() { @@ -403,7 +415,7 @@ function init_shortcuts() { }); } -function init_stream_delegates(divStream) { +function init_stream(divStream) { divStream.on('click', '.flux_header', function (e) { //flux_header_toggle if ($(e.target).closest('.item.website > a').length > 0) { return; @@ -475,17 +487,6 @@ function init_nav_entries() { }); } -function init_templates() { - $('#aside_flux').on('click', '.feeds .dropdown-toggle', function () { - if ($(this).nextAll('.dropdown-menu').length === 0) { - var feed_id = $(this).closest('li').attr('id').substr(2), - feed_web = $(this).data('fweb'), - template = $('#feed_config_template').html().replace(/!!!!!!/g, feed_id).replace('http://example.net/', feed_web); - $(this).attr('href', '#dropdown-' + feed_id).prev('.dropdown-target').attr('id', 'dropdown-' + feed_id).parent().append(template); - } - }); -} - function init_actualize() { $("#actualize").click(function () { $.getScript('./?c=javascript&a=actualize').done(function () { @@ -732,18 +733,7 @@ function init_all() { window.setTimeout(init_all, 50); return; } - $stream = $('#stream'); - init_posts(); - init_column_categories(); - if (load_shortcuts) { - init_shortcuts(); - } - init_stream_delegates($stream); - init_nav_entries(); - init_templates(); init_notifications(); - init_actualize(); - init_load_more($stream); switch (authType) { case 'form': init_loginForm(); @@ -753,8 +743,19 @@ function init_all() { break; } init_confirm_action(); - init_print_action(); - window.setInterval(refreshUnreads, 120000); + $stream = $('#stream'); + if ($stream.length > 0) { + init_actualize(); + init_column_categories(); + init_load_more($stream); + init_posts(); + init_stream($stream); + init_nav_entries(); + init_shortcuts(); + init_print_action(); + window.setInterval(refreshUnreads, 120000); + } + if (window.console) { console.log('FreshRSS init done.'); } diff --git a/p/themes/default/freshrss.css b/p/themes/default/freshrss.css index 733807938..593f21d30 100644 --- a/p/themes/default/freshrss.css +++ b/p/themes/default/freshrss.css @@ -259,9 +259,11 @@ } .flux .item { line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; } .flux .item.manage { width: 40px; diff --git a/p/themes/default_dark/freshrss.css b/p/themes/default_dark/freshrss.css index 884e2884d..e9eb2c705 100644 --- a/p/themes/default_dark/freshrss.css +++ b/p/themes/default_dark/freshrss.css @@ -250,9 +250,11 @@ } .flux .item { line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; } .flux .item.manage { width: 40px; diff --git a/p/themes/flat-design/freshrss.css b/p/themes/flat-design/freshrss.css index df1dfdde3..dca1b3f28 100644 --- a/p/themes/flat-design/freshrss.css +++ b/p/themes/flat-design/freshrss.css @@ -245,9 +245,11 @@ body { } .flux .item { line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; } .flux .item.manage { width: 40px; -- cgit v1.2.3 From 015ff4caf6911439232f46d5190c5771dde8bb89 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jan 2014 23:32:15 +0100 Subject: Corrige chargement des icônes spéciales aux thèmes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/327#issuecomment-32135077 --- app/FreshRSS.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 4c462c835..e64a1986b 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -116,6 +116,7 @@ class FreshRSS extends Minz_FrontController { private function loadStylesAndScripts ($loginOk) { $theme = FreshRSS_Themes::get_infos($this->conf->theme); if ($theme) { + FreshRSS_Themes::setThemeId($this->conf->theme); foreach($theme['files'] as $file) { Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['path'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file))); } -- cgit v1.2.3 From f720d41cbfb18edc1b0a694a7213682b96befa1f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 13 Jan 2014 22:27:22 +0100 Subject: Mise à jour nom thèmes + chargement robuste des thèmes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renomme : default -> Origine En cas de thème introuvable, charge le thème par défaut, sinon le premier disponible. https://github.com/marienfressinaud/FreshRSS/issues/120 --- app/Controllers/configureController.php | 6 +- app/FreshRSS.php | 5 +- app/Models/Configuration.php | 2 +- app/Models/Themes.php | 28 +- app/views/configure/display.phtml | 5 +- p/themes/Dark/freshrss.css | 862 ++++++++++++++++++++++++++++++ p/themes/Dark/global.css | 487 +++++++++++++++++ p/themes/Dark/loader.gif | Bin 0 -> 404 bytes p/themes/Dark/metadata.json | 7 + p/themes/Flat/freshrss.css | 817 ++++++++++++++++++++++++++++ p/themes/Flat/global.css | 495 +++++++++++++++++ p/themes/Flat/icons/add.svg | 30 ++ p/themes/Flat/icons/all.svg | 32 ++ p/themes/Flat/icons/close.svg | 28 + p/themes/Flat/icons/configure.svg | 31 ++ p/themes/Flat/icons/down.svg | 31 ++ p/themes/Flat/icons/next.svg | 31 ++ p/themes/Flat/icons/prev.svg | 31 ++ p/themes/Flat/icons/refresh.svg | 31 ++ p/themes/Flat/icons/search.svg | 32 ++ p/themes/Flat/icons/up.svg | 31 ++ p/themes/Flat/loader.gif | Bin 0 -> 4251 bytes p/themes/Flat/metadata.json | 7 + p/themes/Origine/freshrss.css | 880 +++++++++++++++++++++++++++++++ p/themes/Origine/global.css | 503 ++++++++++++++++++ p/themes/Origine/loader.gif | Bin 0 -> 4167 bytes p/themes/Origine/metadata.json | 7 + p/themes/default/freshrss.css | 880 ------------------------------- p/themes/default/global.css | 503 ------------------ p/themes/default/loader.gif | Bin 4167 -> 0 bytes p/themes/default/metadata.json | 7 - p/themes/default_dark/freshrss.css | 862 ------------------------------ p/themes/default_dark/global.css | 487 ----------------- p/themes/default_dark/loader.gif | Bin 404 -> 0 bytes p/themes/default_dark/metadata.json | 7 - p/themes/flat-design/freshrss.css | 817 ---------------------------- p/themes/flat-design/global.css | 495 ----------------- p/themes/flat-design/icons/add.svg | 30 -- p/themes/flat-design/icons/all.svg | 32 -- p/themes/flat-design/icons/close.svg | 28 - p/themes/flat-design/icons/configure.svg | 31 -- p/themes/flat-design/icons/down.svg | 31 -- p/themes/flat-design/icons/next.svg | 31 -- p/themes/flat-design/icons/prev.svg | 31 -- p/themes/flat-design/icons/refresh.svg | 31 -- p/themes/flat-design/icons/search.svg | 32 -- p/themes/flat-design/icons/up.svg | 31 -- p/themes/flat-design/loader.gif | Bin 4251 -> 0 bytes p/themes/flat-design/metadata.json | 7 - 49 files changed, 4407 insertions(+), 4385 deletions(-) create mode 100644 p/themes/Dark/freshrss.css create mode 100644 p/themes/Dark/global.css create mode 100644 p/themes/Dark/loader.gif create mode 100644 p/themes/Dark/metadata.json create mode 100644 p/themes/Flat/freshrss.css create mode 100644 p/themes/Flat/global.css create mode 100644 p/themes/Flat/icons/add.svg create mode 100644 p/themes/Flat/icons/all.svg create mode 100644 p/themes/Flat/icons/close.svg create mode 100644 p/themes/Flat/icons/configure.svg create mode 100644 p/themes/Flat/icons/down.svg create mode 100644 p/themes/Flat/icons/next.svg create mode 100644 p/themes/Flat/icons/prev.svg create mode 100644 p/themes/Flat/icons/refresh.svg create mode 100644 p/themes/Flat/icons/search.svg create mode 100644 p/themes/Flat/icons/up.svg create mode 100644 p/themes/Flat/loader.gif create mode 100644 p/themes/Flat/metadata.json create mode 100644 p/themes/Origine/freshrss.css create mode 100644 p/themes/Origine/global.css create mode 100644 p/themes/Origine/loader.gif create mode 100644 p/themes/Origine/metadata.json delete mode 100644 p/themes/default/freshrss.css delete mode 100644 p/themes/default/global.css delete mode 100644 p/themes/default/loader.gif delete mode 100644 p/themes/default/metadata.json delete mode 100644 p/themes/default_dark/freshrss.css delete mode 100644 p/themes/default_dark/global.css delete mode 100644 p/themes/default_dark/loader.gif delete mode 100644 p/themes/default_dark/metadata.json delete mode 100644 p/themes/flat-design/freshrss.css delete mode 100644 p/themes/flat-design/global.css delete mode 100644 p/themes/flat-design/icons/add.svg delete mode 100644 p/themes/flat-design/icons/all.svg delete mode 100644 p/themes/flat-design/icons/close.svg delete mode 100644 p/themes/flat-design/icons/configure.svg delete mode 100644 p/themes/flat-design/icons/down.svg delete mode 100644 p/themes/flat-design/icons/next.svg delete mode 100644 p/themes/flat-design/icons/prev.svg delete mode 100644 p/themes/flat-design/icons/refresh.svg delete mode 100644 p/themes/flat-design/icons/search.svg delete mode 100644 p/themes/flat-design/icons/up.svg delete mode 100644 p/themes/flat-design/loader.gif delete mode 100644 p/themes/flat-design/metadata.json (limited to 'app') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 5b5770cbe..70144a8db 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -157,7 +157,11 @@ class FreshRSS_configure_Controller extends Minz_ActionController { 'scroll' => Minz_Request::param('mark_scroll', false), 'reception' => Minz_Request::param('mark_upon_reception', false), )); - $this->view->conf->_theme(Minz_Request::param('theme', 'default')); + $themeId = Minz_Request::param('theme', ''); + if ($themeId == '') { + $themeId = FreshRSS_Themes::defaultTheme; + } + $this->view->conf->_theme($themeId); $this->view->conf->_topline_read(Minz_Request::param('topline_read', false)); $this->view->conf->_topline_favorite(Minz_Request::param('topline_favorite', false)); $this->view->conf->_topline_date(Minz_Request::param('topline_date', false)); diff --git a/app/FreshRSS.php b/app/FreshRSS.php index e64a1986b..52f34c6e2 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -114,11 +114,10 @@ class FreshRSS extends Minz_FrontController { } private function loadStylesAndScripts ($loginOk) { - $theme = FreshRSS_Themes::get_infos($this->conf->theme); + $theme = FreshRSS_Themes::load($this->conf->theme); if ($theme) { - FreshRSS_Themes::setThemeId($this->conf->theme); foreach($theme['files'] as $file) { - Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['path'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file))); + Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['id'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file))); } } diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 8f394737a..f3fb76e72 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -25,7 +25,7 @@ class FreshRSS_Configuration { 'scroll' => false, 'reception' => false, ), - 'theme' => 'default', + 'theme' => 'Origine', 'shortcuts' => array( 'mark_read' => 'r', 'mark_favorite' => 'f', diff --git a/app/Models/Themes.php b/app/Models/Themes.php index a52812339..c7099a1df 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -3,13 +3,17 @@ class FreshRSS_Themes extends Minz_Model { private static $themesUrl = '/themes/'; private static $defaultIconsUrl = '/themes/icons/'; + public static $defaultTheme = 'Origine'; - public static function get() { - $themes_list = array_diff( + public static function getList() { + return array_values(array_diff( scandir(PUBLIC_PATH . self::$themesUrl), array('..', '.') - ); + )); + } + public static function get() { + $themes_list = self::getList(); $list = array(); foreach ($themes_list as $theme_dir) { $theme = self::get_infos($theme_dir); @@ -28,7 +32,7 @@ class FreshRSS_Themes extends Minz_Model { $content = file_get_contents($json_filename); $res = json_decode($content, true); if ($res && isset($res['files']) && is_array($res['files'])) { - $res['path'] = $theme_id; + $res['id'] = $theme_id; return $res; } } @@ -39,12 +43,26 @@ class FreshRSS_Themes extends Minz_Model { private static $themeIconsUrl; private static $themeIcons; - public static function setThemeId($theme_id) { + public static function load($theme_id) { + $infos = self::get_infos($theme_id); + if (!$infos) { + if ($theme_id !== self::$defaultTheme) { //Fall-back to default theme + return self::load(self::$defaultTheme); + } + $themes_list = self::getList(); + if (!empty($themes_list)) { + if ($theme_id !== $themes_list[0]) { //Fall-back to first theme + return self::load($themes_list[0]); + } + } + return false; + } self::$themeIconsUrl = self::$themesUrl . $theme_id . '/icons/'; self::$themeIcons = is_dir(PUBLIC_PATH . self::$themeIconsUrl) ? array_fill_keys(array_diff( scandir(PUBLIC_PATH . self::$themeIconsUrl), array('..', '.') ), 1) : array(); + return $infos; } public static function icon($name, $urlOnly = false) { diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 3cc5442fb..725356c8d 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -21,9 +21,10 @@
    - + themes as $theme) { ?> - diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css new file mode 100644 index 000000000..e9eb2c705 --- /dev/null +++ b/p/themes/Dark/freshrss.css @@ -0,0 +1,862 @@ +@charset "UTF-8"; + +/* STRUCTURE */ +.header { + display: table; + width: 100%; + background: #1c1c1c; + table-layout: fixed; +} + .header > .item { + display: table-cell; + padding: 10px 0; + border-bottom: 1px solid #2f2f2f; + vertical-align: middle; + text-align: center; + } + .header > .item.title { + width: 250px; + white-space: nowrap; + } + .logo { + display: inline-block; + font-size: 48px; + height: 32px; + width: 32px; + padding: 10px; + } + .header > .item.title h1 { + display: inline-block; + margin: 0; + } + .header > .item.search input { + width: 230px; + transition: width 200ms linear; + } + .header .item.search input:focus { + width: 330px; + } + .header > .item.configure { + width: 100px; + } + +.item a:hover { + text-decoration: none; +} + +#global { + display: table; + width: 100%; + height: 100%; + background: #1c1c1c; + table-layout: fixed; +} + .aside { + display: table-cell; + height: 100%; + width: 250px; + vertical-align: top; + border-right: 1px solid #2f2f2f; + background: #1c1c1c; + } + .aside .nav-form input { + width: 180px; + } + .aside.aside_flux { + padding: 10px 0 40px; + } + .aside.aside_feed .nav-form input { + width: 140px; + } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { + right: -20px; + } + .aside.aside_feed .nav-form .dropdown .dropdown-menu:after { + right: 33px; + } + + .nav-login { + display: none; + } + + .nav_menu { + width: 100%; + background: #1c1c1c; + border-bottom: 1px solid #2f2f2f; + text-align: center; + padding: 5px 0; + } + .nav_menu .search { + display:none; + } + +.favicon { + height: 16px; + width: 16px; +} + +.categories { + margin: 0; + padding: 0; + text-align: center; + list-style: none; +} + .category { + display: block; + width: 220px; + margin: 10px auto; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .category .btn:first-child { + width: 195px; + position: relative; + } + .category.stick .btn:first-child { + width:160px; + } + .category .btn:first-child:not([data-unread="0"]):after { + content: attr(data-unread); + position: absolute; + top: 3px; right: 3px; + padding: 1px 5px; + background: #1a1a1a; + color: #888; + font-size: 90%; + border: 1px solid #000; + border-radius: 5px; + } + .category + .feeds:not(.active) { + display:none; + } + .categories .feeds { + width: 100%; + margin: 0; + list-style: none; + } + .categories .feeds .item.active { + background: #26303F; + } + .categories .feeds .item.active .feed { + color: #888; + } + .categories .feeds .item.empty .feed { + color: #e67e22; + } + .categories .feeds .item.empty.active { + background: #e67e22; + } + .categories .feeds .item.empty.active .feed { + color: #fff; + } + .categories .feeds .item.error .feed { + color: #BD362F; + } + .categories .feeds .item .feed { + display: inline-block; + margin: 0; + width: 165px; + line-height: 35px; + font-size: 90%; + vertical-align: middle; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .feed:not([data-unread="0"]):before { + content: "(" attr(data-unread) ") "; + } + .categories .feeds .dropdown-menu { + left: 0; + } + .categories .feeds .dropdown-menu:after { + left: 2px; + } + .categories .feeds .item .dropdown-toggle > .icon { + visibility: hidden; + cursor: pointer; + } + .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, + .categories .feeds .item:hover .dropdown-toggle > .icon, + .categories .feeds .item.active .dropdown-toggle > .icon { + background-color: #1c1c1c; + border-radius: 3px; + visibility: visible; + } + +.post { + padding: 10px 50px; +} + .post form { + margin: 10px 0; + } + +.day { + min-height: 50px; + padding: 0 10px; + font-size: 130%; + font-weight: bold; + line-height: 50px; + background: #1c1c1c; + border-top: 1px solid #888; + border-bottom: 1px solid #888; +} + .day:first-child { + border-top: none; + } + .day .name { + position: absolute; + right: 0; + width: 50%; + height: 1.5em; + padding: 0 10px 0 0; + overflow: hidden; + color: #aab; + font-size: 1.8em; + opacity: .3; + text-shadow: 0px -1px 0px #333; + font-style: italic; + white-space: nowrap; + text-overflow: ellipsis; + text-align: right; + } + +.flux { + border-left: 3px solid #aaa; + background: #1c1c1c; +} + .flux.not_read { + border-left: 3px solid #FF5300; + background: #1c1c1c; + } + .flux.favorite { + border-left: 3px solid #FFC300; + background: #1c1c1c; + } + .flux.current { + border-left: 3px solid #0062BE; + background: #1a1a1a; + } + + .flux_header { + background: inherit; + height: 25px; + font-size: 12px; + border-top: 1px solid #2f2f2f; + cursor: pointer; + } + .flux .item { + line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { + overflow: hidden; + text-overflow: ellipsis; + } + .flux .item.manage { + width: 40px; + text-align: center; + } + .flux .item.website { + width: 200px; + } + .website .favicon { + padding: 5px; + } + .flux .item.title { + background: inherit; + } + .flux:hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } + .flux .item.title a { + color: #888; + outline: none; + } + .flux.not_read .item.title, + .flux.current .item.title { + font-weight: bold; + } + .flux .item.date { + width: 200px; + padding:0 5px 0 0; + text-align: right; + font-size: 10px; + color: #666; + } + .link { + width: 40px; + text-align: center; + } + +#stream.reader .flux { + padding: 0 0 30px; + border: none; + background: #1c1c1c; + color: #888; +} + #stream.reader .flux .author { + margin: 0 0 10px; + font-size: 90%; + color: #666; + } + +#stream.global { + text-align: center; +} + #stream.global .box-category { + display: inline-block; + width: 280px; + margin: 20px 10px; + vertical-align: top; + background: #1a1a1a; + border: 1px solid #000; + border-radius: 5px; + text-align: left; + box-shadow: 0 0 5px #2f2f2f; + } + #stream.global .category { + width: 100%; + margin: 0; + } + #stream.global .btn { + display: block; + width: auto; + height: 35px; + margin: 0; + padding: 0 10px; + background: #26303F; + border: none; + border-bottom: 1px solid #2f2f2f; + border-radius: 5px 5px 0 0; + line-height: 35px; + font-size: 120%; + } + #stream.global .btn:not([data-unread="0"]) { + font-weight:bold; + } + #stream.global .btn:first-child:not([data-unread="0"]):after { + top: 0; right: 5px; + border: 0; + background: none; + color: #666; + font-weight: bold; + box-shadow: none; + } + #stream.global .box-category .feeds { + display: block; + max-height: 250px; + margin: 0; + list-style: none; + overflow: auto; + } + #stream.global .box-category .feeds .item { + padding: 2px 10px; + font-size: 90%; + } + #stream.global .box-category .feed { + width: 220px; + } + +.content { + min-height: 150px; + max-width: 550px; + margin: 0 auto; + padding: 20px 10px; + line-height: 170%; + word-wrap: break-word; +} + .content h1, .content h2, .content h3 { + margin: 20px 0 5px; + } + .content > .title { + font-size: x-large; + margin: 0; + } + + .content p { + margin: 0 0 20px; + } + img.big { + display: block; + margin: 10px auto; + } + figure img.big { + margin: 0; + } + .content hr { + margin: 30px 0; + height: 1px; + background: #ddd; + border: 0; + } + .content pre { + margin: 10px auto; + padding: 10px; + overflow: auto; + background: #000; + color: #fff; + font-size: 110%; + } + .content q, .content blockquote { + display: block; + margin: 5px 0; + padding: 5px 20px; + font-style: italic; + border-left: 4px solid #ccc; + color: #666; + } + .content blockquote p { + margin: 0; + } + +#panel { + display: none; + position: fixed; + top: 10px; bottom: 10px; + left: 100px; right: 100px; + overflow: auto; + background: #1c1c1c; + border: 1px solid #95a5a6; + border-radius: 5px; +} + #panel .close { + position: fixed; + top: 10px; right: 0; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border: 1px solid #ccc; + border-radius: 20px; + text-align: center; + line-height: 26px; + background: #fff; + } + +#overlay { + display: none; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + background: rgba(0, 0, 0, 0.9); +} + +.flux_content .bottom { + font-size: 90%; + text-align: center; +} + +.hide_posts > :not(.active) > .flux_content { + display:none; +} + +/*** PAGINATION ***/ +.pagination { + display: table; + width: 100%; + margin: 0; + background: #1a1a1a; + text-align: center; + color: #888; + font-size: 80%; + line-height: 200%; + table-layout: fixed; +} + .pagination .item { + display: table-cell; + line-height: 40px; + } + .pagination .item.pager-current { + font-weight: bold; + font-size: 140%; + } + .pagination .pager-first, + .pagination .pager-previous, + .pagination .pager-next, + .pagination .pager-last { + width: 100px; + } + .pagination .item a { + display: block; + color: #333; + font-style: italic; + } + .pagination:first-child .item { + border-bottom: 1px solid #aaa; + } + .pagination:last-child .item { + border-top: 1px solid #aaa; + } + +#nav_entries { + display: table; + width: 250px; + height: 40px; + position: fixed; + bottom: 0; + left: 0; + margin: 0; + background: #1c1c1c; + border-top: 1px solid #2f2f2f; + text-align: center; + line-height: 40px; + table-layout: fixed; +} + #nav_entries .item { + display: table-cell; + width: 30%; + } + #nav_entries a { + display: block; + } + #nav_entries .i_up { + margin: 5px 0 0; + vertical-align: top; + } + +.loading { + background: url("loader.gif") center center no-repeat; + font-size: 0; +} + +#bigMarkAsRead { + display: block; + font-style: normal; + padding: 32px 0 64px 0; + text-align: center; + text-decoration: none; +} + #bigMarkAsRead:hover { + background: #1c1c1c; + color: #888; + } + .bigTick { + font-size: 72pt; + line-height: 1.6em; + } + +/*** NOTIFICATION ***/ +.notification { + position: absolute; + top: 10px; + left: 25%; right: 25%; + min-height: 30px; + padding: 10px; + line-height: 30px; + text-align: center; + border-radius: 5px; + box-shadow: 0 0 5px #666; + background: #1a1a1a; + color: #888; + font-weight: bold; + z-index: 10; +} + .notification.good { + border:1px solid #f4f899; + } + .notification.bad { + border:1px solid #f4a899; + } + .notification a.close { + 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; +} + +.actualizeProgress { + position: fixed; + top: 10px; + left: 25%; right: 25%; + padding: 5px; + background: #1a1a1a; + text-align: center; + border: 1px solid #2f2f2f; + border-radius: 5px; +} + .actualizeProgress progress { + max-width: 100%; + vertical-align: middle; + } + .actualizeProgress .progress { + color: #888; + font-size: 90%; + vertical-align: middle; + } + +.logs { + border: 1px solid #aaa; +} + .log { + padding: 5px 2%; + overflow: auto; + background: #fafafa; + border-bottom: 1px solid #999; + color: #333; + font-size: 90%; + } + .log .date { + display: block; + } + .log.error { + background: #fdd; + color: #844; + } + .log.warning { + background: #ffe; + color: #c95; + } + .log.notice { + background: #f4f4f4; + color: #aaa; + } + .log.debug { + background: #111; + color: #eee; + } + +.form-group table { + border-collapse:collapse; + margin:10px 0 0 220px; + text-align:center; +} + +.form-group tr, .form-group th, .form-group td { + border:1px solid #2f2f2f; + font-weight:normal; + padding:.5em; +} + +select.number option { + text-align:right; +} + +@media(max-width: 840px) { + .header, + .aside .btn-important, + .aside .feeds .dropdown, + .flux_header .item.website span, + .item.date { + display: none; + } + .flux_header .item.website { + width: 40px; + text-align: center; + } + .flux_header .item.website .favicon { + padding: 12px; + } + + .nav-login { + display: block; + } + + .content { + font-size: 120%; + padding: 0; + } + + .pagination { + margin: 0 0 40px; + } + .pagination .pager-previous, .pagination .pager-next { + width: 100px; + } + + .toggle_aside, .btn.toggle_aside { + display: inline-block; + } + .aside { + position: fixed; + top: 0; left: 0; + width: 0; + overflow: hidden; + border-right: none; + z-index: 10; + transition: width 200ms linear; + } + .aside.aside_flux { + padding: 10px 0 0; + } + .aside:target { + width: 80%; + border-right: 1px solid #aaa; + overflow: auto; + } + .aside .toggle_aside { + position: absolute; + right: 0; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border: 1px solid #ccc; + border-radius: 20px; + text-align: center; + line-height: 26px; + } + .aside .categories { + margin: 30px 0; + } + + #nav_entries { + width: 100%; + } + + .nav_menu .btn { + margin: 5px 10px; + } + .nav_menu .stick { + margin: 0 10px; + } + .nav_menu .stick .btn { + margin: 5px 0; + } + .nav_menu .search { + display: inline-block; + max-width: 97%; + } + .nav_menu .search input { + max-width: 97%; + width: 90px; + } + .nav_menu .search input:focus { + width: 400px; + } + + #panel { + left: 5px; right: 5px; + } + + .day .date { + display: none; + } + .day .name { + height: 2.6em; + font-size: 1em; + text-shadow: none; + } + + .notification, + .actualizeProgress { + left: 10px; + right: 10px; + } +} + +/*** FALLBACK ***/ +.btn { + background: #1c1c1c; +} + .btn:hover { + background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + } + .btn-important { + background: #26303F; + } + .btn-important:hover { + background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + } + .btn-attention { + background: #880011; + } + .btn-attention:hover { + background: -moz-linear-gradient(top, #cc0044 0%, #880011 100%); + background: -webkit-linear-gradient(top, #cc0044 0%, #880011 100%); + background: -o-linear-gradient(top, #cc0044 0%, #880011 100%); + background: -ms-linear-gradient(top, #cc0044 0%, #880011 100%); + } + +.dropdown-menu:after { + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); +} + +.nav-head { + background: #fff; + background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); +} + +.header > .item.search input { + -moz-transition: width 200ms linear; + -webkit-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; +} + +@media(max-width: 840px) { + .aside { + -moz-transition: width 200ms linear; + -webkit-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + } +} + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css new file mode 100644 index 000000000..04eb723f1 --- /dev/null +++ b/p/themes/Dark/global.css @@ -0,0 +1,487 @@ +@charset "UTF-8"; + +/* FONTS */ +@font-face { + font-family: "OpenSans"; + src: url("../fonts/openSans.woff") format("woff"); +} + + +* { + margin: 0; + padding: 0; +} +html, body { + height: 100%; + font-size: 95%; + font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; + color: #888; +} + +/* LIENS */ +a { + color: #6986B2; + text-decoration: none; +} + a:hover { + text-decoration: underline; + } + +/* LISTES */ +ul, ol, dl { + margin: 10px 0 10px 30px; + line-height: 190%; +} + dd { + margin: 0 0 10px 30px; + } + +/* TITRES */ +h1, h2, h3 { + min-height: 40px; + margin: 15px 0 5px; + line-height: 40px; +} + +/* IMG */ +figure { + margin: 5px 0 10px; + text-align: center; +} + figcaption { + display: inline-block; + padding: 3px 20px; + color: #999; + font-style: italic; + border-bottom: 1px solid #ccc; + } +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} + a img { + border: none; + } + +/* VIDEOS */ +iframe, embed, object, video { + max-width: 100%; +} + +/* FORMULAIRES */ +legend { + display: block; + width: 100%; + margin: 20px 0 5px; + padding: 5px 0; + border-bottom: 1px solid #2f2f2f; + font-size: 150%; + clear: both; +} +label { + display: block; + min-height: 25px; + padding: 5px 0; + font-size: 14px; + line-height: 25px; + cursor: pointer; +} +input, select, textarea { + display: inline-block; + max-width: 100%; + min-height: 25px; + padding: 5px; + background: #333; + border: 1px solid #000; + border-radius: 3px; + color: #999; + line-height: 25px; + vertical-align: middle; + box-shadow: 0 2px 2px #1d1d1d inset; +} + option { + padding:0 .5em 0 .5em; + } + input[type="radio"], + input[type="checkbox"] { + width: 15px !important; + min-height: 15px !important; + } + input:focus, select:focus, textarea:focus { + color: #6986b2; + border-color: #2f2f2f; + } + input:invalid, select:invalid { + border-color: red; + box-shadow: 0 0 2px 1px red; + } + +.form-group { + margin: 0; +} + .form-group:after { + content: ""; + display: block; + clear: both; + } + .form-group.form-actions { + min-width: 250px; + padding: 5px 0; + background: #1a1a1a; + border-top: 1px solid #2f2f2f; + } + .form-group.form-actions .btn { + margin: 0 10px; + } + .form-group .group-name { + display: block; + float: left; + width: 200px; + padding: 10px 0; + text-align: right; + } + .form-group .group-controls { + min-width: 250px; + min-height: 25px; + margin: 0 0 0 220px; + padding: 5px 0; + } + .form-group .group-controls .control { + display: block; + min-height: 30px; + padding: 5px 0; + line-height: 25px; + font-size: 14px; + } + +.stick { + display: inline-block; + white-space: nowrap; + font-size: 0px; + vertical-align: middle; +} + .stick input, + .stick .btn { + border-radius: 0; + font-size: 14px; + } + .stick .btn:first-child, + .stick input:first-child { + border-radius: 3px 0 0 3px; + } + .stick .btn-important:first-child { + border-right: 1px solid #000; + } + .stick .btn:last-child, + .stick input:last-child { + border-radius: 0 3px 3px 0; + } + .stick .btn + .btn, + .stick .btn + input, + .stick input + .btn, + .stick input + input { + border-left: none; + } + .stick .btn + .dropdown > .btn { + border-left: none; + border-radius: 0 3px 3px 0; + } + .stick .btn + .dropdown a { + font-size: 12px; + } + +.btn { + display: inline-block; + min-height: 37px; + min-width: 15px; + padding: 5px 10px; + background: linear-gradient(to bottom, #fff 0%, #eee 100%); + border-radius: 3px; + border: 1px solid #000; + color: #888; + line-height: 20px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; +} + a.btn { + min-height: 25px; + line-height: 25px; + } + .btn:hover { + background: linear-gradient(to bottom, #4A5D7A, #26303F); + text-decoration: none; + } + .btn.active, + .btn:active, + .dropdown-target:target ~ .btn.dropdown-toggle { + background: #26303F; + } + + .btn-important { + background: linear-gradient(to bottom, #0084CC, #0045CC); + color: #888888; + border: 1px solid #000000; + } + .btn-important:hover { + background: linear-gradient(to bottom, #0066CC, #0045CC); + } + .btn-important:active { + background: #0044CB; + box-shadow: none; + } + + .btn-attention { + background: linear-gradient(to bottom, #E95B57, #BD362F); + color: #888888; + border: 1px solid #000000; + } + .btn-attention:hover { + background: linear-gradient(to bottom, #D14641, #BD362F); + } + .btn-attention:active { + background: #BD362F; + box-shadow: none; + } + +/* NAVIGATION */ +.nav-list .nav-header, +.nav-list .item { + display: block; + height: 35px; + line-height: 35px; +} + .nav-list .item:hover { + background: #1a1a1a; + } + .nav-list .item:hover a { + color: #26303F; + } + .nav-list .item.active { + background: #26303F; + color: #1a1a1a; + } + .nav-list .item.active a { + color: #888; + } + .nav-list .disable { + color: #aaa; + background: #fafafa; + text-align: center; + } + .nav-list .item > * { + display: block; + padding: 0 10px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .nav-list a:hover { + text-decoration: none; + } + .nav-list .item.error a { + color: #BD362F; + } + .nav-list .item.active.error a { + color: #fff; + background: #BD362F; + } + .nav-list .item.empty a { + color: #f39c12; + } + .nav-list .item.active.empty a { + color: #fff; + background: #f39c12; + } + + .nav-list .nav-header { + padding: 0 10px; + background: #1a1a1a; + border-bottom: 1px solid #2f2f2f; + font-weight: bold; + } + .nav-list .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #ddd; + } + + .nav-list .nav-form { + padding: 3px; + text-align: center; + } + +.nav-head { + display: block; + margin: 0; + background: linear-gradient(to bottom, #fff, #f0f0f0); + border-bottom: 1px solid #ddd; + text-align: right; +} + .nav-head .item { + display: inline-block; + padding: 5px 10px; + } + +/* HORIZONTAL-LIST */ +.horizontal-list { + display: table; + table-layout: fixed; + margin: 0; + padding: 0; + width: 100%; +} + .horizontal-list .item { + display: table-cell; + vertical-align: middle; + } + +/* DROPDOWN */ +.dropdown { + position: relative; + display: inline-block; +} + .dropdown-target { + display: none; + } + + .dropdown-menu { + display: none; + min-width: 200px; + margin: 5px 0 0; + padding: 5px 0; + position: absolute; + right: 0px; + background: #1a1a1a; + border: 1px solid #888; + border-radius: 5px; + text-align: left; + } + .dropdown-menu:after { + content: ""; + position: absolute; + top: -6px; + right: 13px; + width: 10px; + height: 10px; + background: #1a1a1a; + border-top: 1px solid #888; + border-left: 1px solid #888; + z-index: -10; + transform: rotate(45deg); + } + .dropdown-header { + display: block; + padding: 0 5px; + color: #888; + font-weight: bold; + font-size: 14px; + line-height: 30px; + } + .dropdown-menu .item { + display: block; + height: 30px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu > .item > a { + display: block; + padding: 0 25px; + line-height: 30px; + } + .dropdown-menu > .item:hover { + background: #26303F; + color: #888; + } + .dropdown-menu > .item[aria-checked="true"] > a:before { + content: '✓ '; + font-weight: bold; + margin: 0 0 0 -1.2em; + padding: 0 0.2em 0 0; + } + .dropdown-menu > .item:hover > a { + color: #888; + text-decoration: none; + } + .dropdown-menu .input { + display: block; + height: 40px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu .input select, + .dropdown-menu .input input { + display: block; + height: 20px; + width: 95%; + margin: auto; + padding: 2px 5px; + border-radius: 3px; + } + .dropdown-menu .input select { + width: 70%; + height: auto; + } + .dropdown-menu .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #888; + } + .dropdown-target:target ~ .dropdown-menu { + display: block; + z-index: 10; + } + .dropdown-close { + display: inline; + } + .dropdown-close a { + font-size: 0; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; + z-index: -10; + } + +/* ALERTS */ +.alert { + display: block; + width: 90%; + margin: 15px auto; + padding: 10px 15px; + background: #1a1a1a; + border: 1px solid #ccc; + border-right: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-radius: 5px; + color: #aaa; +} + .alert-head { + margin: 0; + font-weight: bold; + font-size: 110%; + } + .alert-warn { + border: 1px solid #c95; + color: #c95; + } + .alert-success { + border: 1px solid #484; + color: #484; + } + .alert-error { + border: 1px solid #844; + color: #844; + } + +/* ICÔNES */ +.icon { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + line-height: 16px; +} diff --git a/p/themes/Dark/loader.gif b/p/themes/Dark/loader.gif new file mode 100644 index 000000000..86022be71 Binary files /dev/null and b/p/themes/Dark/loader.gif differ diff --git a/p/themes/Dark/metadata.json b/p/themes/Dark/metadata.json new file mode 100644 index 000000000..27cae27df --- /dev/null +++ b/p/themes/Dark/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Dark", + "author": "AD", + "description": "Le coté obscur du thème “Origine”", + "version": 0.1, + "files": ["global.css", "freshrss.css"] +} diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css new file mode 100644 index 000000000..dca1b3f28 --- /dev/null +++ b/p/themes/Flat/freshrss.css @@ -0,0 +1,817 @@ +@charset "UTF-8"; + +/* STRUCTURE */ +body { + background: #fafafa; +} + +.header { + display: table; + width: 100%; + table-layout: fixed; + background: #ecf0f1; +} + .header > .item { + display: table-cell; + padding: 10px 0; + vertical-align: middle; + text-align: center; + } + .header > .item.title { + width: 250px; + white-space: nowrap; + } + .logo { + display: inline-block; + font-size: 48px; + height: 32px; + width: 32px; + padding: 10px; + } + .header > .item.title h1 { + display: inline-block; + margin: 0; + } + .header > .item.search input { + width: 230px; + transition: width 200ms linear; + } + .header .item.search input:focus { + width: 330px; + } + .header > .item.configure { + width: 100px; + } + +.item a:hover { + text-decoration: none; +} + +#global { + display: table; + width: 100%; + height: 100%; + table-layout: fixed; +} + .aside { + display: table-cell; + height: 100%; + width: 250px; + vertical-align: top; + background: #ecf0f1; + } + .aside .nav-form input { + width: 180px; + } + .aside.aside_flux { + padding: 10px 0 40px; + } + .aside.aside_feed .nav-form input { + width: 140px; + } + .aside.aside_feed .nav-form .dropdown-menu { + right: -20px; + } + .aside.aside_feed .nav-form .dropdown-menu:after { + right: 33px; + } + + .nav-login { + display: none; + } + + .nav_menu { + width: 100%; + text-align: center; + padding: 5px 0; + } + .nav_menu .search { + display:none; + } + +.favicon { + height: 16px; + width: 16px; +} + +.categories { + margin: 0; + padding: 0; + text-align: center; + list-style: none; +} + .category { + display: block; + width: 220px; + margin: 10px auto; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .category .btn:first-child { + width: 195px; + position: relative; + } + .category.stick .btn:first-child { + width:160px; + } + .category .btn:first-child:not([data-unread="0"]):after { + content: attr(data-unread); + position: absolute; + top: 5px; right: 5px; + padding: 0 5px; + color: #fff; + font-size: 90%; + background: #3498DB; + border-radius: 5px; + } + .category + .feeds:not(.active) { + display:none; + } + .categories .feeds { + width: 100%; + margin: 0 auto; + list-style: none; + } + .categories .feeds .item.active:after { + content: "⇢"; + line-height: 35px; + float: right; + } + .categories .feeds .item.empty .feed { + color: #e67e22; + } + .categories .feeds .item.error .feed { + color: #BD362F; + } + .categories .feeds .item .feed { + display: inline-block; + margin: 0; + width: 165px; + line-height: 35px; + font-size: 90%; + vertical-align: middle; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .feed:not([data-unread="0"]) { + font-weight:bold; + } + .feed:not([data-unread="0"]):before { + content: "(" attr(data-unread) ") "; + } + .categories .feeds .dropdown-menu { + left: 0; + } + .categories .feeds .dropdown-menu:after { + left: 2px; + } + .categories .feeds .item .dropdown-toggle > .icon { + visibility: hidden; + cursor: pointer; + } + .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, + .categories .feeds .item:hover .dropdown-toggle > .icon, + .categories .feeds .item.active .dropdown-toggle > .icon { + background-color: #95a5a6; + border-radius: 3px; + visibility: visible; + } + .categories .btn:hover .notRead, + .categories .btn.active .notRead { + background: #2980B9; + border-left: 3px solid #3498DB; + } + +.post { + padding: 10px 50px; +} + .post form { + margin: 10px 0; + } + +.day { + padding: 5px 15px; + font-size: 130%; + font-weight: bold; + line-height: 50px; + border-left: 3px solid #ecf0f1; +} + .day .name { + position: absolute; + right: 0; + width: 50%; + height: 1.5em; + padding: 0 10px 0 0; + overflow: hidden; + color: #aab; + font-size: 1.8em; + opacity: .3; + font-style: italic; + text-align: right; + white-space: nowrap; + text-overflow: ellipsis; + z-index: -10; + } + +.flux { + border-left: 3px solid #ecf0f1; +} + .flux:hover { + background: #fff; + } + .flux.not_read { + border-left-color: #FF5300; + background: #FFF3ED; + } + .flux.favorite { + border-left-color: #FFC300; + background: #FFF6DA; + } + .flux.current { + border-left-color: #3498db; + background: #fff; + } + + .flux_header { + background: inherit; + height: 25px; + font-size: 12px; + border-top: 1px solid #ecf0f1; + cursor: pointer; + } + .flux .item { + line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { + overflow: hidden; + text-overflow: ellipsis; + } + .flux .item.manage { + width: 40px; + text-align: center; + } + .flux .item.website { + width: 200px; + } + .website .favicon { + padding: 5px; + } + .flux .item.title { + background: inherit; + } + .flux:hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } + .flux .item.title a { + color: #333; + outline: none; + } + .flux.current .item.title, + .flux.not_read .item.title { + font-weight: bold; + } + .flux .item.date { + width: 200px; + padding:0 5px 0 0; + text-align: right; + font-size: 10px; + color: #666; + } + .link { + width: 40px; + text-align: center; + } + +#stream.reader .flux { + position: relative; + padding: 0 0 30px; + border: none; + background: #ecf0f1; + color: #34495e; + font-size: 120%; +} + #stream.reader .flux .author { + margin: 0 0 10px; + font-size: 90%; + color: #aaa; + } + +#stream.global { + text-align: center; +} + #stream.global .box-category { + display: inline-block; + width: 280px; + margin: 20px 10px; + vertical-align: top; + border: 1px solid #ddd; + border-radius: 5px; + text-align: left; + } + #stream.global .category { + width: 100%; + margin: 0; + } + #stream.global .btn { + display: block; + width: auto; + height: 35px; + margin: 0; + padding: 0 10px; + background: #ecf0f1; + color: #333; + border-bottom: 1px solid #ddd; + border-radius: 5px 5px 0 0; + line-height: 35px; + font-size: 120%; + } + #stream.global .btn:not([data-unread="0"]) { + font-weight:bold; + } + #stream.global .btn:first-child:not([data-unread="0"]):after { + top: 0; right: 5px; + border: 0; + background: none; + color: #333; + font-weight: bold; + box-shadow: none; + } + #stream.global .box-category .feeds { + display: block; + max-height: 250px; + margin: 0; + list-style: none; + overflow: auto; + } + #stream.global .box-category .feeds .item { + padding: 2px 10px; + font-size: 90%; + } + #stream.global .box-category .feed { + width: 220px; + } + +.content { + min-height: 150px; + max-width: 550px; + margin: 0 auto; + padding: 20px 10px; + line-height: 170%; + word-wrap: break-word; +} + .content h1, .content h2, .content h3 { + margin: 20px 0 5px; + } + .content > .title { + font-size: x-large; + margin: 0; + } + + .content p { + margin: 0 0 20px; + } + img.big { + display: block; + margin: 10px auto; + } + figure img.big { + margin: 0; + } + .content hr { + margin: 30px 0; + height: 1px; + background: #ddd; + border: 0; + } + .content pre { + margin: 10px auto; + padding: 10px; + overflow: auto; + background: #000; + color: #fff; + font-size: 110%; + } + .content q, .content blockquote { + display: block; + margin: 5px 0; + padding: 5px 20px; + font-style: italic; + border-left: 4px solid #ccc; + color: #666; + } + .content blockquote p { + margin: 0; + } + +#panel { + display: none; + position: fixed; + top: 10px; bottom: 10px; + left: 100px; right: 100px; + overflow: auto; + background: #fff; + border: 1px solid #95a5a6; + border-radius: 5px; +} + #panel .close { + position: fixed; + top: 10px; right: 0px; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border-radius: 3px; + text-align: center; + line-height: 24px; + background: #95a5a6; + } + #panel .close:hover { + background: #7f8c8d; + } + +#overlay { + display: none; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + background: rgba(0, 0, 0, 0.9); +} + +.flux_content .bottom { + font-size: 90%; + text-align: center; +} + +.hide_posts > :not(.active) > .flux_content { + display:none; +} + +/*** PAGINATION ***/ +.pagination { + display: table; + width: 100%; + margin: 0; + background: #ecf0f1; + text-align: center; + color: #000; + font-size: 80%; + line-height: 200%; + table-layout: fixed; + font-weight: bold; +} + .pagination .item { + display: table-cell; + line-height: 40px; + vertical-align: top; + } + .pagination .item.pager-current { + font-weight: bold; + font-size: 140%; + color: #ecf0f1; + background: #34495e; + } + .pagination .item.pager-first, + .pagination .item.pager-previous, + .pagination .item.pager-next, + .pagination .item.pager-last { + width: 100px; + } + .pagination .item a { + display: block; + color: #000; + font-weight: bold; + line-height: 40px; + } + .pagination .item a:hover { + color: #ecf0f1; + background: #34495e; + } + +#nav_entries { + display: table; + width: 250px; + height: 40px; + position: fixed; + bottom: 0; + left: 0; + margin: 0; + background: #34495e; + text-align: center; + line-height: 40px; + table-layout: fixed; +} + #nav_entries .item { + display: table-cell; + width: 30%; + } + #nav_entries a { + display: block; + } + #nav_entries .i_up { + margin: 5px 0 0; + vertical-align: top; + } + +.pagination .loading, +.pagination a:hover.loading { + background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; +} + +#bigMarkAsRead { + background: #ecf0f1; + display: block; + font-style: normal; + padding: 32px 0 64px 0; + text-align: center; + text-decoration: none; + text-shadow: 0 -1px 0 #aaa; +} + #bigMarkAsRead:hover { + background: #34495e; + color: #fff; + } + .bigTick { + font-size: 72pt; + line-height: 1.6em; + } + +/*** NOTIFICATION ***/ +.notification { + position: absolute; + top: 10px; + left: 25%; right: 25%; + min-height: 30px; + padding: 10px; + line-height: 30px; + text-align: center; + border-radius: 3px; + background: #ddd; + color: #666; + font-weight: bold; + z-index: 10; +} + .notification.good { + background: #1abc9c; + color: #fff; + } + .notification.bad { + background: #e74c3c; + color: #fff; + } + .notification a.close { + display: inline-block; + width: 16px; + height: 16px; + float: right; + margin: -16px -16px 0 0; + padding: 5px; + border-radius: 3px; + line-height: 16px; + } + .notification.good a.close { + background: #1abc9c; + } + .notification.bad a.close { + background: #e74c3c; + } + +.toggle_aside, .btn.toggle_aside { + display: none; +} + +.actualizeProgress { + position: fixed; + top: 10px; + left: 25%; right: 25%; + padding: 5px; + background: #3498db; + color: #fff; + text-align: center; + border-radius: 3px; + font-weight: bold; +} + .actualizeProgress progress { + max-width: 100%; + width: 250px; + height: 15px; + vertical-align: middle; + background: #fff; + border: none; + } + .actualizeProgress .progress { + color: #ecf0f1; + } + +.logs { + border: 1px solid #34495e; +} + .log { + margin: 10px 0; + padding: 5px 2%; + overflow: auto; + background: #fafafa; + color: #666; + font-size: 90%; + } + .log>.date { + margin: 0 10px 0 0; + padding: 5px 10px; + border-radius: 20px; + } + .log.error>.date { + background: #e74c3c; + color: #fff; + } + .log.warning>.date { + background: #f39c12; + } + .log.notice>.date { + background: #ecf0f1; + } + .log.debug>.date { + background: #111; + color: #eee; + } + +.form-group table { + border-collapse:collapse; + margin:10px 0 0 220px; + text-align:center; +} + +.form-group tr, .form-group th, .form-group td { + font-weight:normal; + padding:.5em; +} + +select.number option { + text-align:right; +} + +@media(max-width: 840px) { + .header, + .aside .btn-important, + .aside .feeds .dropdown, + .flux_header .item.website span, + .item.date { + display: none; + } + .flux_header .item.website { + width: 40px; + text-align: center; + } + .flux_header .item.website .favicon { + padding: 12px; + } + + .nav-login { + display: block; + } + + .content { + font-size: 120%; + padding: 0; + } + + .pagination { + margin: 0 0 40px; + } + .pagination .pager-previous, .pagination .pager-next { + width: 100px; + } + + .toggle_aside, .btn.toggle_aside { + display: inline-block; + } + .aside { + position: fixed; + top: 0; left: 0; + width: 0; + overflow: hidden; + z-index: 10; + transition: width 200ms linear; + background: #ecf0f1; + } + .aside.aside_flux { + padding: 10px 0 0; + } + .aside:target { + width: 80%; + border-right: 1px solid #aaa; + overflow: auto; + } + .aside .toggle_aside { + position: absolute; + right: 10px; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border-radius: 3px; + text-align: center; + line-height: 24px; + background: #95a5a6; + } + .aside .toggle_aside:hover { + background: #7f8c8d; + } + .aside .categories { + margin: 30px 0; + } + + #nav_entries { + width: 100%; + } + + .nav_menu .btn { + margin: 5px 10px; + } + .nav_menu .stick { + margin: 0 10px; + } + .nav_menu .stick .btn { + margin: 5px 0; + } + .nav_menu .search { + display: inline-block; + max-width: 97%; + } + .nav_menu .search input { + max-width: 97%; + width: 90px; + } + .nav_menu .search input:focus { + width: 400px; + } + + #panel { + left: 5px; right: 5px; + } + + .day .date { + display: none; + } + .day .name { + height: 2.6em; + font-size: 1em; + text-shadow: none; + } + + .notification, + .actualizeProgress { + left: 10px; + right: 10px; + } +} + +/*** FALLBACK ***/ +.dropdown-menu:after { + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); +} + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css new file mode 100644 index 000000000..5fd0a4dcf --- /dev/null +++ b/p/themes/Flat/global.css @@ -0,0 +1,495 @@ +@charset "UTF-8"; + +/* FONTS */ +@font-face { + font-family: "OpenSans"; + src: url("../fonts/openSans.woff") format("woff"); +} + + +* { + margin: 0; + padding: 0; +} +html, body { + height: 100%; + font-size: 95%; + font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; +} + +/* LIENS */ +a { + color: #2980b9; + text-decoration: none; +} + a:hover { + text-decoration: underline; + } + +/* LISTES */ +ul, ol, dl { + margin: 10px 0 10px 30px; + line-height: 190%; +} + dd { + margin: 0 0 10px 30px; + } + +/* TITRES */ +h1, h2, h3 { + min-height: 40px; + margin: 15px 0 5px; + line-height: 40px; +} + +/* IMG */ +figure { + margin: 5px 0 10px; + text-align: center; +} + figcaption { + display: inline-block; + padding: 3px 20px; + color: #999; + font-style: italic; + border-bottom: 1px solid #ccc; + } +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} + a img { + border: none; + } + +/* VIDEOS */ +iframe, embed, object, video { + max-width: 100%; +} + +/* FORMULAIRES */ +legend { + display: inline-block; + margin: 20px 0 5px; + padding: 5px 20px; + font-size: 150%; + clear: both; + background: #ecf0f1; + border-radius: 20px; +} +label { + display: block; + min-height: 25px; + padding: 5px 0; + font-size: 12px; + line-height: 25px; + cursor: pointer; + font-weight: bold; + color: #444; +} +input, select, textarea { + display: inline-block; + max-width: 100%; + min-height: 25px; + padding: 5px; + background: #FFF; + border: none; + border-bottom: 3px solid #ddd; + color: #666; + line-height: 25px; + vertical-align: middle; + border-radius: 5px; +} + option { + padding:0 .5em 0 .5em; + } + input[type="radio"], + input[type="checkbox"] { + width: 15px !important; + min-height: 15px !important; + } + input:focus, select:focus, textarea:focus { + color: #333; + border-color: #2980b9; + } + input:invalid, select:invalid { + border-color: red; + box-shadow: 0 0 2px 1px red; + } + +.form-group { + margin: 5px 0; + border: 1px solid transparent; +} + .form-group:after { + content: ""; + display: block; + clear: both; + } + .form-group:hover { + background: #fff; + border: 1px solid #eee; + border-radius: 3px; + } + .form-group.form-actions { + min-width: 250px; + margin: 20px 0; + padding: 5px 0; + background: #ecf0f1; + border-top: 3px solid #bdc3c7; + border-radius: 5px 5px 0 0; + } + .form-group.form-actions .btn { + margin: 0 10px; + } + .form-group .group-name { + display: block; + float: left; + width: 200px; + padding: 10px 0; + text-align: right; + } + .form-group .group-controls { + min-width: 250px; + min-height: 25px; + margin: 0 0 0 220px; + padding: 5px 0; + } + .form-group .group-controls label { + font-weight: normal; + font-size: 14px; + color: #000; + } + .form-group .group-controls .control { + display: block; + min-height: 30px; + padding: 5px 0; + line-height: 25px; + font-size: 14px; + } + +.stick { + display: inline-block; + white-space: nowrap; + font-size: 0px; + vertical-align: middle; +} + .stick .btn, + .stick input { + font-size: 14px; + border-radius: 0; + } + .stick .btn:first-child, + .stick input:first-child { + border-radius: 5px 0 0 5px; + } + .stick .btn:last-child, + .stick input:last-child, + .stick .btn + .dropdown > .btn { + border-radius: 0 5px 5px 0; + } + .stick .btn + .dropdown a { + font-size: 12px; + } + +.btn { + display: inline-block; + min-height: 38px; + min-width: 18px; + padding: 5px 10px; + background: #3498db; + border-radius: 5px; + border: none; + border-bottom: 3px solid #2980b9; + color: #fff; + line-height: 20px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; +} + a.btn { + min-height: 25px; + line-height: 25px; + } + .btn.active, + .btn:active, + .btn:hover, + .dropdown-target:target ~ .btn.dropdown-toggle { + background: #2980b9; + text-decoration: none; + } + + .btn-important { + background: #e67e22; + color: #fff; + border-bottom: 3px solid #d35400; + } + .btn-important:active, + .btn-important:hover { + background: #d35400; + } + + .btn-attention { + background: #e74c3c; + color: #fff; + border-bottom: 3px solid #c0392b; + } + .btn-attention:hover, + .btn-attention:active { + background: #c0392b; + } + +/* NAVIGATION */ +.nav-list { + border-right: 1px solid #ecf0f1; +} +.nav-list .nav-header, +.nav-list .item { + display: block; + height: 35px; + line-height: 35px; + margin: 5px 0; +} + .nav-list .item:hover, + .nav-list .item.active { + background: #2980b9; + color: #fff; + } + .nav-list .item:hover a, + .nav-list .item.active a { + color: #fff; + } + .nav-list .disable { + color: #aaa; + background: #fafafa; + text-align: center; + } + .nav-list .item > * { + display: block; + padding: 0 10px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .nav-list a:hover { + text-decoration: none; + } + .nav-list .item.error a { + color: #BD362F; + } + .nav-list .item:hover.error a, + .nav-list .item.active.error a { + color: #fff; + background: #BD362F; + } + .nav-list .item.empty a { + color: #f39c12; + } + .nav-list .item:hover.empty a, + .nav-list .item.active.empty a { + color: #fff; + background: #f39c12; + } + + .nav-list .nav-header { + padding: 0 10px; + margin: 0; + color: #fff; + background: #34495e; + font-weight: bold; + } + .nav-list .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #ddd; + } + + .nav-list .nav-form { + padding: 3px; + text-align: center; + } + +.nav-head { + display: block; + margin: 0; + background: #34495e; + color: #fff; + text-align: right; +} + .nav-head a { + color: #fff; + } + .nav-head .item { + display: inline-block; + padding: 5px 10px; + } + +/* HORIZONTAL-LIST */ +.horizontal-list { + display: table; + table-layout: fixed; + margin: 0; + padding: 0; + width: 100%; +} + .horizontal-list .item { + display: table-cell; + vertical-align: middle; + } + +/* DROPDOWN */ +.dropdown { + position: relative; + display: inline-block; +} + .dropdown-target { + display: none; + } + + .dropdown-menu { + display: none; + min-width: 200px; + margin: 5px 0 0; + padding: 5px 0; + position: absolute; + right: 0px; + background: #fff; + border: 1px solid #95a5a6; + border-radius: 3px; + text-align: left; + } + .dropdown-menu:after { + content: ""; + position: absolute; + top: -6px; + right: 13px; + width: 10px; + height: 10px; + background: #fff; + border-top: 1px solid #95a5a6; + border-left: 1px solid #95a5a6; + z-index: -10; + transform: rotate(45deg); + } + .dropdown-header { + display: block; + padding: 0 5px; + color: #34495e; + font-weight: bold; + font-size: 14px; + line-height: 30px; + } + .dropdown-menu > .item { + display: block; + height: 30px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu > .item > a { + display: block; + padding: 0 25px; + line-height: 30px; + } + .dropdown-menu > .item:hover > a { + background: #2980b9; + color: #fff; + } + .dropdown-menu > .item[aria-checked="true"] > a:before { + content: '✓ '; + font-weight: bold; + margin: 0 0 0 -1.2em; + padding: 0 0.2em 0 0; + } + .dropdown-menu > .item:hover > a { + color: #fff; + text-decoration: none; + } + .dropdown-menu .input { + display: block; + height: 40px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu label { + font-weight: normal; + } + .dropdown-menu .input select, + .dropdown-menu .input input { + display: block; + height: 20px; + width: 95%; + margin: auto; + padding: 2px 5px; + border-radius: 3px; + } + .dropdown-menu .input select { + width: 70%; + height: auto; + } + .dropdown-menu .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #95a5a6; + } + .dropdown-target:target ~ .dropdown-menu { + display: block; + z-index: 10; + } + .dropdown-close { + display: inline; + } + .dropdown-close a { + font-size: 0; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; + z-index: -10; + } + +/* ALERTS */ +.alert { + display: block; + width: 90%; + margin: 15px auto; + padding: 10px 15px; + background: #f4f4f4; + border: 1px solid #ccc; + border-right: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-radius: 5px; + color: #aaa; + text-shadow: 0 0 1px #eee; +} + .alert-head { + margin: 0; + font-weight: bold; + font-size: 110%; + } + .alert-warn { + background: #ffe; + border: 1px solid #eeb; + color: #c95; + } + .alert-success { + background: #dfd; + border: 1px solid #cec; + color: #484; + } + .alert-error { + background: #fdd; + border: 1px solid #ecc; + color: #844; + } + +/* ICÔNES */ +.icon { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + line-height: 16px; +} diff --git a/p/themes/Flat/icons/add.svg b/p/themes/Flat/icons/add.svg new file mode 100644 index 000000000..15767a3ad --- /dev/null +++ b/p/themes/Flat/icons/add.svg @@ -0,0 +1,30 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/all.svg b/p/themes/Flat/icons/all.svg new file mode 100644 index 000000000..d20e0f5bf --- /dev/null +++ b/p/themes/Flat/icons/all.svg @@ -0,0 +1,32 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/close.svg b/p/themes/Flat/icons/close.svg new file mode 100644 index 000000000..629fda7ff --- /dev/null +++ b/p/themes/Flat/icons/close.svg @@ -0,0 +1,28 @@ + + + + + Gnome Symbolic Icon Theme + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/configure.svg b/p/themes/Flat/icons/configure.svg new file mode 100644 index 000000000..969c5719f --- /dev/null +++ b/p/themes/Flat/icons/configure.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/down.svg b/p/themes/Flat/icons/down.svg new file mode 100644 index 000000000..31730626f --- /dev/null +++ b/p/themes/Flat/icons/down.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/next.svg b/p/themes/Flat/icons/next.svg new file mode 100644 index 000000000..d75cc40f5 --- /dev/null +++ b/p/themes/Flat/icons/next.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/prev.svg b/p/themes/Flat/icons/prev.svg new file mode 100644 index 000000000..9ba03ceb2 --- /dev/null +++ b/p/themes/Flat/icons/prev.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/refresh.svg b/p/themes/Flat/icons/refresh.svg new file mode 100644 index 000000000..8f95bf443 --- /dev/null +++ b/p/themes/Flat/icons/refresh.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/search.svg b/p/themes/Flat/icons/search.svg new file mode 100644 index 000000000..bca7571b4 --- /dev/null +++ b/p/themes/Flat/icons/search.svg @@ -0,0 +1,32 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + diff --git a/p/themes/Flat/icons/up.svg b/p/themes/Flat/icons/up.svg new file mode 100644 index 000000000..3ab11b168 --- /dev/null +++ b/p/themes/Flat/icons/up.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/p/themes/Flat/loader.gif b/p/themes/Flat/loader.gif new file mode 100644 index 000000000..ce36565b3 Binary files /dev/null and b/p/themes/Flat/loader.gif differ diff --git a/p/themes/Flat/metadata.json b/p/themes/Flat/metadata.json new file mode 100644 index 000000000..6b94d11c2 --- /dev/null +++ b/p/themes/Flat/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Flat design", + "author": "Marien Fressinaud", + "description": "Thème plat pour FreshRSS", + "version": 0.1, + "files": ["global.css", "freshrss.css"] +} \ No newline at end of file diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css new file mode 100644 index 000000000..593f21d30 --- /dev/null +++ b/p/themes/Origine/freshrss.css @@ -0,0 +1,880 @@ +@charset "UTF-8"; + +/* STRUCTURE */ +.header { + display: table; + width: 100%; + background: #f4f4f4; + table-layout: fixed; +} + .header > .item { + display: table-cell; + padding: 10px 0; + border-bottom: 1px solid #aaa; + vertical-align: middle; + text-align: center; + } + .header > .item.title { + width: 250px; + white-space: nowrap; + } + .logo { + display: inline-block; + font-size: 48px; + height: 32px; + width: 32px; + padding: 10px; + } + .header > .item.title h1 { + display: inline-block; + margin: 0; + text-shadow: 1px -1px 0 #ccc; + } + .header > .item.search input { + width: 230px; + transition: width 200ms linear; + } + .header .item.search input:focus { + width: 330px; + } + .header > .item.configure { + width: 100px; + } + +.item a:hover { + text-decoration: none; +} + +#global { + display: table; + width: 100%; + height: 100%; + background: #fafafa; + table-layout: fixed; +} + .aside { + display: table-cell; + height: 100%; + width: 250px; + vertical-align: top; + border-right: 1px solid #aaa; + background: #fff; + } + .aside .nav-form input { + width: 180px; + } + .aside.aside_flux { + padding: 10px 0 40px; + } + .aside.aside_feed .nav-form input { + width: 140px; + } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { + right: -20px; + } + .aside.aside_feed .nav-form .dropdown .dropdown-menu:after { + right: 33px; + } + + .nav-login { + display: none; + } + + .nav_menu { + width: 100%; + background: #fafafa; + border-bottom: 1px solid #aaa; + text-align: center; + padding: 5px 0; + } + .nav_menu .search { + display:none; + } + +.favicon { + height: 16px; + width: 16px; +} + +.categories { + margin: 0; + padding: 0; + text-align: center; + list-style: none; +} + .category { + display: block; + width: 220px; + margin: 10px auto; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .category .btn:first-child { + width: 195px; + position: relative; + } + .category.stick .btn:first-child { + width:160px; + } + .category .btn:first-child:not([data-unread="0"]):after { + content: attr(data-unread); + position: absolute; + top: 3px; right: 3px; + padding: 1px 5px; + background: #ccc; + color: #fff; + font-size: 90%; + border: 1px solid #bbb; + border-radius: 5px; + box-shadow: 1px 3px 3px #aaa inset; + text-shadow: 0 0 1px #aaa; + } + .category + .feeds:not(.active) { + display:none; + } + .categories .feeds { + width: 100%; + margin: 0; + list-style: none; + } + .categories .feeds .item.active { + background: #0062BE; + } + .categories .feeds .item.active .feed { + color: #fff; + } + .categories .feeds .item.empty .feed { + color: #e67e22; + } + .categories .feeds .item.empty.active { + background: #e67e22; + } + .categories .feeds .item.empty.active .feed { + color: #fff; + } + .categories .feeds .item.error .feed { + color: #BD362F; + } + .categories .feeds .item .feed { + display: inline-block; + margin: 0; + width: 165px; + line-height: 35px; + font-size: 90%; + vertical-align: middle; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .feed:not([data-unread="0"]) { + font-weight:bold; + } + .feed:not([data-unread="0"]):before { + content: "(" attr(data-unread) ") "; + } + .categories .feeds .dropdown-menu { + left: 0; + } + .categories .feeds .dropdown-menu:after { + left: 2px; + } + .categories .feeds .item .dropdown-toggle > .icon { + visibility: hidden; + cursor: pointer; + } + .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, + .categories .feeds .item:hover .dropdown-toggle > .icon, + .categories .feeds .item.active .dropdown-toggle > .icon { + background-color: #fff; + border-radius: 3px; + visibility: visible; + } + +.post { + padding: 10px 50px; +} + .post form { + margin: 10px 0; + } + +.day { + min-height: 50px; + padding: 0 10px; + font-size: 130%; + font-weight: bold; + line-height: 50px; + background: #fff; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; +} + .day:first-child { + border-top: none; + } + .day .name { + position: absolute; + right: 0; + width: 50%; + height: 1.5em; + padding: 0 10px 0 0; + overflow: hidden; + color: #aab; + font-size: 1.8em; + opacity: .3; + text-shadow: 0px -1px 0px #333; + font-style: italic; + white-space: nowrap; + text-overflow: ellipsis; + text-align: right; + } + +.flux { + border-left: 3px solid #aaa; + background: #fafafa; +} + .flux:hover { + background: #fff; + } + .flux.not_read { + border-left: 3px solid #FF5300; + background: #FFF3ED; + } + .flux.favorite { + border-left: 3px solid #FFC300; + background: #FFF6DA; + } + .flux.current { + border-left: 3px solid #0062BE; + background: #fff; + } + + .flux_header { + background: inherit; + height: 25px; + font-size: 12px; + border-top: 1px solid #ddd; + cursor: pointer; + } + .flux .item { + line-height: 40px; + white-space: nowrap; + } + .flux_header > .item { + overflow: hidden; + text-overflow: ellipsis; + } + .flux .item.manage { + width: 40px; + text-align: center; + } + .flux .item.website { + width: 200px; + } + .website .favicon { + padding: 5px; + } + .flux .item.title { + background: inherit; + } + .flux:hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } + .flux .item.title a { + color: #000; + outline: none; + } + .flux.not_read .item.title, + .flux.current .item.title { + font-weight: bold; + } + .flux .item.date { + width: 200px; + padding:0 5px 0 0; + text-align: right; + font-size: 10px; + color: #666; + } + .link { + width: 40px; + text-align: center; + } + +#stream.reader .flux { + padding: 0 0 30px; + border: none; + background: #f0f0f0; + color: #333; +} + #stream.reader .flux .author { + margin: 0 0 10px; + font-size: 90%; + color: #666; + } + +#stream.global { + text-align: center; +} + #stream.global .box-category { + display: inline-block; + width: 280px; + margin: 20px 10px; + vertical-align: top; + background: #fff; + border: 1px solid #aaa; + border-radius: 5px; + text-align: left; + box-shadow: 0 0 5px #bbb; + } + #stream.global .category { + width: 100%; + margin: 0; + } + #stream.global .btn { + display: block; + width: auto; + height: 35px; + margin: 0; + padding: 0 10px; + background: #eee; + border: none; + border-bottom: 1px solid #aaa; + border-radius: 5px 5px 0 0; + line-height: 35px; + font-size: 120%; + } + #stream.global .btn:not([data-unread="0"]) { + font-weight:bold; + } + #stream.global .btn:first-child:not([data-unread="0"]):after { + top: 0; right: 5px; + border: 0; + background: none; + color: #666; + font-weight: bold; + box-shadow: none; + } + #stream.global .box-category .feeds { + display: block; + max-height: 250px; + margin: 0; + list-style: none; + overflow: auto; + } + #stream.global .box-category .feeds .item { + padding: 2px 10px; + font-size: 90%; + } + #stream.global .box-category .feed { + width: 220px; + } + +.content { + min-height: 150px; + max-width: 550px; + margin: 0 auto; + padding: 20px 10px; + line-height: 170%; + word-wrap: break-word; +} + .content h1, .content h2, .content h3 { + margin: 20px 0 5px; + } + .content > .title { + font-size: x-large; + margin: 0; + } + + .content p { + margin: 0 0 20px; + } + img.big { + display: block; + margin: 10px auto; + } + figure img.big { + margin: 0; + } + .content hr { + margin: 30px 0; + height: 1px; + background: #ddd; + border: 0; + } + .content pre { + margin: 10px auto; + padding: 10px; + overflow: auto; + background: #000; + color: #fff; + font-size: 110%; + } + .content q, .content blockquote { + display: block; + margin: 5px 0; + padding: 5px 20px; + font-style: italic; + border-left: 4px solid #ccc; + color: #666; + } + .content blockquote p { + margin: 0; + } + +#panel { + display: none; + position: fixed; + top: 10px; bottom: 10px; + left: 100px; right: 100px; + overflow: auto; + background: #fff; + border: 1px solid #95a5a6; + border-radius: 5px; +} + #panel .close { + position: fixed; + top: 10px; right: 0; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border: 1px solid #ccc; + border-radius: 20px; + text-align: center; + line-height: 26px; + background: #fff; + } + +#overlay { + display: none; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + background: rgba(0, 0, 0, 0.9); +} + +.flux_content .bottom { + font-size: 90%; + text-align: center; +} + +.hide_posts > :not(.active) > .flux_content { + display:none; +} + +/*** PAGINATION ***/ +.pagination { + display: table; + width: 100%; + margin: 0; + background: #fafafa; + text-align: center; + color: #333; + font-size: 80%; + line-height: 200%; + table-layout: fixed; +} + .pagination .item { + display: table-cell; + line-height: 40px; + } + .pagination .item.pager-current { + font-weight: bold; + font-size: 140%; + } + .pagination .pager-first, + .pagination .pager-previous, + .pagination .pager-next, + .pagination .pager-last { + width: 100px; + } + .pagination .item a { + display: block; + color: #333; + font-style: italic; + } + .pagination:first-child .item { + border-bottom: 1px solid #aaa; + } + .pagination:last-child .item { + border-top: 1px solid #aaa; + } + +#nav_entries { + display: table; + width: 250px; + height: 40px; + position: fixed; + bottom: 0; + left: 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 a { + display: block; + } + #nav_entries .i_up { + margin: 5px 0 0; + vertical-align: top; + } + +.loading { + background: url("loader.gif") center center no-repeat; + font-size: 0; +} + +#bigMarkAsRead { + display: block; + font-style: normal; + padding: 32px 0 64px 0; + text-align: center; + text-decoration: none; + text-shadow: 0 -1px 0 #aaa; +} + #bigMarkAsRead:hover { + background: #333; + color: #fff; + } + .bigTick { + font-size: 72pt; + line-height: 1.6em; + } + +/*** NOTIFICATION ***/ +.notification { + position: absolute; + top: 10px; + left: 25%; right: 25%; + min-height: 30px; + padding: 10px; + line-height: 30px; + text-align: center; + border-radius: 5px; + box-shadow: 0 0 5px #666; + background: #ddd; + color: #666; + font-weight: bold; + z-index: 10; +} + .notification.good { + background: #f4f899; + } + .notification.bad { + background: #f4a899; + } + .notification a.close { + display: inline-block; + width: 16px; + height: 16px; + float: right; + margin: -20px -20px 0 0; + padding: 5px; + background: #fff; + border-radius: 50px; + border: 1px solid #aaa; + line-height: 16px; + } + +.toggle_aside, .btn.toggle_aside { + display: none; +} + +.actualizeProgress { + position: fixed; + top: 10px; + left: 25%; right: 25%; + padding: 5px; + background: #fff; + text-align: center; + border: 1px solid #ddd; + border-radius: 5px; +} + .actualizeProgress progress { + max-width: 100%; + vertical-align: middle; + } + .actualizeProgress .progress { + color: #999; + font-size: 90%; + vertical-align: middle; + } + +.logs { + border: 1px solid #aaa; +} + .log { + padding: 5px 2%; + overflow: auto; + background: #fafafa; + border-bottom: 1px solid #999; + color: #333; + font-size: 90%; + } + .log .date { + display: block; + } + .log.error { + background: #fdd; + color: #844; + } + .log.warning { + background: #ffe; + color: #c95; + } + .log.notice { + background: #f4f4f4; + color: #aaa; + } + .log.debug { + background: #111; + color: #eee; + } + +.form-group table { + border-collapse:collapse; + margin:10px 0 0 220px; + text-align:center; +} + +.form-group tr, .form-group th, .form-group td { + border:1px solid #DDD; + font-weight:normal; + padding:.5em; +} + +select.number option { + text-align:right; +} + +@media(max-width: 840px) { + .header, + .aside .btn-important, + .aside .feeds .dropdown, + .flux_header .item.website span, + .item.date { + display: none; + } + .flux_header .item.website { + width: 40px; + text-align: center; + } + .flux_header .item.website .favicon { + padding: 12px; + } + + .nav-login { + display: block; + } + + .content { + font-size: 120%; + padding: 0; + } + + .pagination { + margin: 0 0 40px; + } + .pagination .pager-previous, .pagination .pager-next { + width: 100px; + } + + .toggle_aside, .btn.toggle_aside { + display: inline-block; + } + .aside { + position: fixed; + top: 0; left: 0; + width: 0; + overflow: hidden; + border-right: none; + z-index: 10; + transition: width 200ms linear; + } + .aside.aside_flux { + padding: 10px 0 0; + } + .aside:target { + width: 80%; + border-right: 1px solid #aaa; + overflow: auto; + } + .aside .toggle_aside { + position: absolute; + right: 0; + display: inline-block; + width: 26px; + height: 26px; + margin: 0 10px 0 0; + border: 1px solid #ccc; + border-radius: 20px; + text-align: center; + line-height: 26px; + } + .aside .categories { + margin: 30px 0; + } + + #nav_entries { + width: 100%; + } + + .nav_menu .btn { + margin: 5px 10px; + } + .nav_menu .stick { + margin: 0 10px; + } + .nav_menu .stick .btn { + margin: 5px 0; + } + .nav_menu .search { + display: inline-block; + max-width: 97%; + } + .nav_menu .search input { + max-width: 97%; + width: 90px; + } + .nav_menu .search input:focus { + width: 400px; + } + + #panel { + left: 5px; right: 5px; + } + + .day .date { + display: none; + } + .day .name { + height: 2.6em; + font-size: 1em; + text-shadow: none; + } + + .notification, + .actualizeProgress { + left: 10px; + right: 10px; + } +} + +/*** FALLBACK ***/ +.btn { + background: #fff; + background: -moz-linear-gradient(top, #fff 0%, #eee 100%); + background: -webkit-linear-gradient(top, #fff 0%, #eee 100%); + background: -o-linear-gradient(top, #fff 0%, #eee 100%); + background: -ms-linear-gradient(top, #fff 0%, #eee 100%); +} + .btn:hover { + background: #f0f0f0; + background: -moz-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); + background: -webkit-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); + background: -o-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); + background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); + } + .btn-important { + background: #0084CC; + background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%); + background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%); + background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%); + background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%); + } + .btn-important:hover { + background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%); + background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%); + background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%); + background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%); + } + .btn-attention { + background: #E95B57; + background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%); + } + .btn-attention:hover { + background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%); + } + +.dropdown-menu:after { + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); +} + +.nav-head { + background: #fff; + background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); +} + +.header > .item.search input { + -moz-transition: width 200ms linear; + -webkit-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; +} + +@media(max-width: 840px) { + .aside { + -moz-transition: width 200ms linear; + -webkit-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + } +} + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css new file mode 100644 index 000000000..49f3aa4cd --- /dev/null +++ b/p/themes/Origine/global.css @@ -0,0 +1,503 @@ +@charset "UTF-8"; + +/* FONTS */ +@font-face { + font-family: "OpenSans"; + src: url("../fonts/openSans.woff") format("woff"); +} + + +* { + margin: 0; + padding: 0; +} +html, body { + height: 100%; + font-size: 95%; + font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; +} + +/* LIENS */ +a { + color: #0062BE; + text-decoration: none; +} + a:hover { + text-decoration: underline; + } + +/* LISTES */ +ul, ol, dl { + margin: 10px 0 10px 30px; + line-height: 190%; +} + dd { + margin: 0 0 10px 30px; + } + +/* TITRES */ +h1, h2, h3 { + min-height: 40px; + margin: 15px 0 5px; + line-height: 40px; +} + +/* IMG */ +figure { + margin: 5px 0 10px; + text-align: center; +} + figcaption { + display: inline-block; + padding: 3px 20px; + color: #999; + font-style: italic; + border-bottom: 1px solid #ccc; + } +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} + a img { + border: none; + } + +/* VIDEOS */ +iframe, embed, object, video { + max-width: 100%; +} + +/* FORMULAIRES */ +legend { + display: block; + width: 100%; + margin: 20px 0 5px; + padding: 5px 0; + border-bottom: 1px solid #ddd; + font-size: 150%; + clear: both; +} +label { + display: block; + min-height: 25px; + padding: 5px 0; + font-size: 14px; + line-height: 25px; + cursor: pointer; +} +input, select, textarea { + display: inline-block; + max-width: 100%; + min-height: 25px; + padding: 5px; + background: #fdfdfd; + border: 1px solid #bbb; + border-radius: 3px; + color: #666; + line-height: 25px; + vertical-align: middle; + box-shadow: 0 2px 2px #eee inset; +} + option { + padding:0 .5em 0 .5em; + } + input[type="radio"], + input[type="checkbox"] { + width: 15px !important; + min-height: 15px !important; + } + input:focus, select:focus, textarea:focus { + color: #0062BE; + border-color: #33BBFF; + box-shadow: 0 2px 2px #DDDDFF inset; + } + input:invalid, select:invalid { + border-color: red; + box-shadow: 0 0 2px 1px red; + } + +.form-group { + margin: 0; +} + .form-group:after { + content: ""; + display: block; + clear: both; + } + .form-group.form-actions { + min-width: 250px; + padding: 5px 0; + background: #f4f4f4; + border-top: 1px solid #ddd; + } + .form-group.form-actions .btn { + margin: 0 10px; + } + .form-group .group-name { + display: block; + float: left; + width: 200px; + padding: 10px 0; + text-align: right; + } + .form-group .group-controls { + min-width: 250px; + min-height: 25px; + margin: 0 0 0 220px; + padding: 5px 0; + } + .form-group .group-controls .control { + display: block; + min-height: 30px; + padding: 5px 0; + line-height: 25px; + font-size: 14px; + } + +.stick { + display: inline-block; + white-space: nowrap; + font-size: 0px; + vertical-align: middle; +} + .stick input, + .stick .btn { + border-radius: 0; + font-size: 14px; + } + .stick .btn:first-child, + .stick input:first-child { + border-radius: 3px 0 0 3px; + } + .stick .btn-important:first-child { + border-right: 1px solid #06f; + } + .stick .btn:last-child, + .stick input:last-child { + border-radius: 0 3px 3px 0; + } + .stick .btn + .btn, + .stick .btn + input, + .stick input + .btn, + .stick input + input { + border-left: none; + } + .stick input + .btn { + border-top: 1px solid #bbb; + } + .stick .btn + .dropdown > .btn { + border-left: none; + border-radius: 0 3px 3px 0; + } + .stick .btn + .dropdown a { + font-size: 12px; + } + +.btn { + display: inline-block; + min-height: 37px; + min-width: 15px; + padding: 5px 10px; + background: linear-gradient(to bottom, #fff 0%, #eee 100%); + border-radius: 3px; + border: 1px solid #ddd; + border-bottom: 1px solid #aaa; + border-right: 1px solid #aaa; + color: #666; + text-shadow: 0px -1px 0 #ddd; + line-height: 20px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; +} + a.btn { + min-height: 25px; + line-height: 25px; + } + .btn:hover { + background: linear-gradient(to bottom, #f8f8f8, #f0f0f0); + text-decoration: none; + } + .btn.active, + .btn:active, + .dropdown-target:target ~ .btn.dropdown-toggle { + box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; + background: #eee; + } + + .btn-important { + background: linear-gradient(to bottom, #0084CC, #0045CC); + color: #fff; + border: 1px solid #0062B7; + text-shadow: 0px -1px 0 #aaa; + } + .btn-important:hover { + background: linear-gradient(to bottom, #0066CC, #0045CC); + } + .btn-important:active { + background: #0044CB; + box-shadow: none; + } + + .btn-attention { + background: linear-gradient(to bottom, #E95B57, #BD362F); + color: #fff; + border: 1px solid #C44742; + text-shadow: 0px -1px 0px #666; + } + .btn-attention:hover { + background: linear-gradient(to bottom, #D14641, #BD362F); + } + .btn-attention:active { + background: #BD362F; + box-shadow: none; + } + +/* NAVIGATION */ +.nav-list .nav-header, +.nav-list .item { + display: block; + height: 35px; + line-height: 35px; +} + .nav-list .item:hover { + background: #fafafa; + } + .nav-list .item:hover a { + color: #003388; + } + .nav-list .item.active { + background: #0062BE; + color: #fff; + } + .nav-list .item.active a { + color: #fff; + } + .nav-list .disable { + color: #aaa; + background: #fafafa; + text-align: center; + } + .nav-list .item > * { + display: block; + padding: 0 10px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .nav-list a:hover { + text-decoration: none; + } + .nav-list .item.error a { + color: #BD362F; + } + .nav-list .item.active.error a { + color: #fff; + background: #BD362F; + } + .nav-list .item.empty a { + color: #f39c12; + } + .nav-list .item.active.empty a { + color: #fff; + background: #f39c12; + } + + .nav-list .nav-header { + padding: 0 10px; + color: #888; + background: #f4f4f4; + border-bottom: 1px solid #ddd; + font-weight: bold; + text-shadow: 0 0 1px #ddd; + } + .nav-list .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #ddd; + } + + .nav-list .nav-form { + padding: 3px; + text-align: center; + } + +.nav-head { + display: block; + margin: 0; + background: linear-gradient(to bottom, #fff, #f0f0f0); + border-bottom: 1px solid #ddd; + text-align: right; +} + .nav-head .item { + display: inline-block; + padding: 5px 10px; + } + +/* HORIZONTAL-LIST */ +.horizontal-list { + display: table; + table-layout: fixed; + margin: 0; + padding: 0; + width: 100%; +} + .horizontal-list .item { + display: table-cell; + vertical-align: middle; + } + +/* DROPDOWN */ +.dropdown { + position: relative; + display: inline-block; +} + .dropdown-target { + display: none; + } + + .dropdown-menu { + display: none; + min-width: 200px; + margin: 5px 0 0; + padding: 5px 0; + position: absolute; + right: 0px; + background: #fff; + border: 1px solid #ddd; + border-radius: 5px; + text-align: left; + box-shadow: 3px 3px 3px #ddd; + } + .dropdown-menu:after { + content: ""; + position: absolute; + top: -6px; + right: 13px; + width: 10px; + height: 10px; + background: #fff; + border-top: 1px solid #ddd; + border-left: 1px solid #ddd; + z-index: -10; + transform: rotate(45deg); + } + .dropdown-header { + display: block; + padding: 0 5px; + color: #888; + font-weight: bold; + font-size: 14px; + line-height: 30px; + } + .dropdown-menu > .item { + display: block; + height: 30px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu > .item > a { + display: block; + padding: 0 25px; + line-height: 30px; + } + .dropdown-menu > .item:hover { + background: #0062BE; + color: #fff; + } + .dropdown-menu > .item[aria-checked="true"] > a:before { + content: '✓ '; + font-weight: bold; + margin: 0 0 0 -1.2em; + padding: 0 0.2em 0 0; + } + .dropdown-menu > .item:hover > a { + color: #fff; + text-decoration: none; + } + .dropdown-menu .input { + display: block; + height: 40px; + font-size: 90%; + line-height: 30px; + } + .dropdown-menu .input select, + .dropdown-menu .input input { + display: block; + height: 20px; + width: 95%; + margin: auto; + padding: 2px 5px; + border-radius: 3px; + } + .dropdown-menu .input select { + width: 70%; + height: auto; + } + .dropdown-menu .separator { + display: block; + height: 0; + margin: 5px 0; + border-bottom: 1px solid #ddd; + } + .dropdown-target:target ~ .dropdown-menu { + display: block; + z-index: 10; + } + .dropdown-close { + display: inline; + } + .dropdown-close a { + font-size: 0; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; + z-index: -10; + } + +/* ALERTS */ +.alert { + display: block; + width: 90%; + margin: 15px auto; + padding: 10px 15px; + background: #f4f4f4; + border: 1px solid #ccc; + border-right: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-radius: 5px; + color: #aaa; + text-shadow: 0 0 1px #eee; +} + .alert-head { + margin: 0; + font-weight: bold; + font-size: 110%; + } + .alert-warn { + background: #ffe; + border: 1px solid #eeb; + color: #c95; + } + .alert-success { + background: #dfd; + border: 1px solid #cec; + color: #484; + } + .alert-error { + background: #fdd; + border: 1px solid #ecc; + color: #844; + } + +/* ICÔNES */ +.icon { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + line-height: 16px; +} diff --git a/p/themes/Origine/loader.gif b/p/themes/Origine/loader.gif new file mode 100644 index 000000000..5ff26f0e3 Binary files /dev/null and b/p/themes/Origine/loader.gif differ diff --git a/p/themes/Origine/metadata.json b/p/themes/Origine/metadata.json new file mode 100644 index 000000000..f93dcbc3f --- /dev/null +++ b/p/themes/Origine/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Origine", + "author": "Marien Fressinaud", + "description": "Le thème par défaut pour FreshRSS", + "version": 0.1, + "files": ["global.css", "freshrss.css"] +} diff --git a/p/themes/default/freshrss.css b/p/themes/default/freshrss.css deleted file mode 100644 index 593f21d30..000000000 --- a/p/themes/default/freshrss.css +++ /dev/null @@ -1,880 +0,0 @@ -@charset "UTF-8"; - -/* STRUCTURE */ -.header { - display: table; - width: 100%; - background: #f4f4f4; - table-layout: fixed; -} - .header > .item { - display: table-cell; - padding: 10px 0; - border-bottom: 1px solid #aaa; - vertical-align: middle; - text-align: center; - } - .header > .item.title { - width: 250px; - white-space: nowrap; - } - .logo { - display: inline-block; - font-size: 48px; - height: 32px; - width: 32px; - padding: 10px; - } - .header > .item.title h1 { - display: inline-block; - margin: 0; - text-shadow: 1px -1px 0 #ccc; - } - .header > .item.search input { - width: 230px; - transition: width 200ms linear; - } - .header .item.search input:focus { - width: 330px; - } - .header > .item.configure { - width: 100px; - } - -.item a:hover { - text-decoration: none; -} - -#global { - display: table; - width: 100%; - height: 100%; - background: #fafafa; - table-layout: fixed; -} - .aside { - display: table-cell; - height: 100%; - width: 250px; - vertical-align: top; - border-right: 1px solid #aaa; - background: #fff; - } - .aside .nav-form input { - width: 180px; - } - .aside.aside_flux { - padding: 10px 0 40px; - } - .aside.aside_feed .nav-form input { - width: 140px; - } - .aside.aside_feed .nav-form .dropdown .dropdown-menu { - right: -20px; - } - .aside.aside_feed .nav-form .dropdown .dropdown-menu:after { - right: 33px; - } - - .nav-login { - display: none; - } - - .nav_menu { - width: 100%; - background: #fafafa; - border-bottom: 1px solid #aaa; - text-align: center; - padding: 5px 0; - } - .nav_menu .search { - display:none; - } - -.favicon { - height: 16px; - width: 16px; -} - -.categories { - margin: 0; - padding: 0; - text-align: center; - list-style: none; -} - .category { - display: block; - width: 220px; - margin: 10px auto; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .category .btn:first-child { - width: 195px; - position: relative; - } - .category.stick .btn:first-child { - width:160px; - } - .category .btn:first-child:not([data-unread="0"]):after { - content: attr(data-unread); - position: absolute; - top: 3px; right: 3px; - padding: 1px 5px; - background: #ccc; - color: #fff; - font-size: 90%; - border: 1px solid #bbb; - border-radius: 5px; - box-shadow: 1px 3px 3px #aaa inset; - text-shadow: 0 0 1px #aaa; - } - .category + .feeds:not(.active) { - display:none; - } - .categories .feeds { - width: 100%; - margin: 0; - list-style: none; - } - .categories .feeds .item.active { - background: #0062BE; - } - .categories .feeds .item.active .feed { - color: #fff; - } - .categories .feeds .item.empty .feed { - color: #e67e22; - } - .categories .feeds .item.empty.active { - background: #e67e22; - } - .categories .feeds .item.empty.active .feed { - color: #fff; - } - .categories .feeds .item.error .feed { - color: #BD362F; - } - .categories .feeds .item .feed { - display: inline-block; - margin: 0; - width: 165px; - line-height: 35px; - font-size: 90%; - vertical-align: middle; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .feed:not([data-unread="0"]) { - font-weight:bold; - } - .feed:not([data-unread="0"]):before { - content: "(" attr(data-unread) ") "; - } - .categories .feeds .dropdown-menu { - left: 0; - } - .categories .feeds .dropdown-menu:after { - left: 2px; - } - .categories .feeds .item .dropdown-toggle > .icon { - visibility: hidden; - cursor: pointer; - } - .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, - .categories .feeds .item:hover .dropdown-toggle > .icon, - .categories .feeds .item.active .dropdown-toggle > .icon { - background-color: #fff; - border-radius: 3px; - visibility: visible; - } - -.post { - padding: 10px 50px; -} - .post form { - margin: 10px 0; - } - -.day { - min-height: 50px; - padding: 0 10px; - font-size: 130%; - font-weight: bold; - line-height: 50px; - background: #fff; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - .day:first-child { - border-top: none; - } - .day .name { - position: absolute; - right: 0; - width: 50%; - height: 1.5em; - padding: 0 10px 0 0; - overflow: hidden; - color: #aab; - font-size: 1.8em; - opacity: .3; - text-shadow: 0px -1px 0px #333; - font-style: italic; - white-space: nowrap; - text-overflow: ellipsis; - text-align: right; - } - -.flux { - border-left: 3px solid #aaa; - background: #fafafa; -} - .flux:hover { - background: #fff; - } - .flux.not_read { - border-left: 3px solid #FF5300; - background: #FFF3ED; - } - .flux.favorite { - border-left: 3px solid #FFC300; - background: #FFF6DA; - } - .flux.current { - border-left: 3px solid #0062BE; - background: #fff; - } - - .flux_header { - background: inherit; - height: 25px; - font-size: 12px; - border-top: 1px solid #ddd; - cursor: pointer; - } - .flux .item { - line-height: 40px; - white-space: nowrap; - } - .flux_header > .item { - overflow: hidden; - text-overflow: ellipsis; - } - .flux .item.manage { - width: 40px; - text-align: center; - } - .flux .item.website { - width: 200px; - } - .website .favicon { - padding: 5px; - } - .flux .item.title { - background: inherit; - } - .flux:hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; - } - .flux .item.title a { - color: #000; - outline: none; - } - .flux.not_read .item.title, - .flux.current .item.title { - font-weight: bold; - } - .flux .item.date { - width: 200px; - padding:0 5px 0 0; - text-align: right; - font-size: 10px; - color: #666; - } - .link { - width: 40px; - text-align: center; - } - -#stream.reader .flux { - padding: 0 0 30px; - border: none; - background: #f0f0f0; - color: #333; -} - #stream.reader .flux .author { - margin: 0 0 10px; - font-size: 90%; - color: #666; - } - -#stream.global { - text-align: center; -} - #stream.global .box-category { - display: inline-block; - width: 280px; - margin: 20px 10px; - vertical-align: top; - background: #fff; - border: 1px solid #aaa; - border-radius: 5px; - text-align: left; - box-shadow: 0 0 5px #bbb; - } - #stream.global .category { - width: 100%; - margin: 0; - } - #stream.global .btn { - display: block; - width: auto; - height: 35px; - margin: 0; - padding: 0 10px; - background: #eee; - border: none; - border-bottom: 1px solid #aaa; - border-radius: 5px 5px 0 0; - line-height: 35px; - font-size: 120%; - } - #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; - } - #stream.global .btn:first-child:not([data-unread="0"]):after { - top: 0; right: 5px; - border: 0; - background: none; - color: #666; - font-weight: bold; - box-shadow: none; - } - #stream.global .box-category .feeds { - display: block; - max-height: 250px; - margin: 0; - list-style: none; - overflow: auto; - } - #stream.global .box-category .feeds .item { - padding: 2px 10px; - font-size: 90%; - } - #stream.global .box-category .feed { - width: 220px; - } - -.content { - min-height: 150px; - max-width: 550px; - margin: 0 auto; - padding: 20px 10px; - line-height: 170%; - word-wrap: break-word; -} - .content h1, .content h2, .content h3 { - margin: 20px 0 5px; - } - .content > .title { - font-size: x-large; - margin: 0; - } - - .content p { - margin: 0 0 20px; - } - img.big { - display: block; - margin: 10px auto; - } - figure img.big { - margin: 0; - } - .content hr { - margin: 30px 0; - height: 1px; - background: #ddd; - border: 0; - } - .content pre { - margin: 10px auto; - padding: 10px; - overflow: auto; - background: #000; - color: #fff; - font-size: 110%; - } - .content q, .content blockquote { - display: block; - margin: 5px 0; - padding: 5px 20px; - font-style: italic; - border-left: 4px solid #ccc; - color: #666; - } - .content blockquote p { - margin: 0; - } - -#panel { - display: none; - position: fixed; - top: 10px; bottom: 10px; - left: 100px; right: 100px; - overflow: auto; - background: #fff; - border: 1px solid #95a5a6; - border-radius: 5px; -} - #panel .close { - position: fixed; - top: 10px; right: 0; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border: 1px solid #ccc; - border-radius: 20px; - text-align: center; - line-height: 26px; - background: #fff; - } - -#overlay { - display: none; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - background: rgba(0, 0, 0, 0.9); -} - -.flux_content .bottom { - font-size: 90%; - text-align: center; -} - -.hide_posts > :not(.active) > .flux_content { - display:none; -} - -/*** PAGINATION ***/ -.pagination { - display: table; - width: 100%; - margin: 0; - background: #fafafa; - text-align: center; - color: #333; - font-size: 80%; - line-height: 200%; - table-layout: fixed; -} - .pagination .item { - display: table-cell; - line-height: 40px; - } - .pagination .item.pager-current { - font-weight: bold; - font-size: 140%; - } - .pagination .pager-first, - .pagination .pager-previous, - .pagination .pager-next, - .pagination .pager-last { - width: 100px; - } - .pagination .item a { - display: block; - color: #333; - font-style: italic; - } - .pagination:first-child .item { - border-bottom: 1px solid #aaa; - } - .pagination:last-child .item { - border-top: 1px solid #aaa; - } - -#nav_entries { - display: table; - width: 250px; - height: 40px; - position: fixed; - bottom: 0; - left: 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 a { - display: block; - } - #nav_entries .i_up { - margin: 5px 0 0; - vertical-align: top; - } - -.loading { - background: url("loader.gif") center center no-repeat; - font-size: 0; -} - -#bigMarkAsRead { - display: block; - font-style: normal; - padding: 32px 0 64px 0; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 0 #aaa; -} - #bigMarkAsRead:hover { - background: #333; - color: #fff; - } - .bigTick { - font-size: 72pt; - line-height: 1.6em; - } - -/*** NOTIFICATION ***/ -.notification { - position: absolute; - top: 10px; - left: 25%; right: 25%; - min-height: 30px; - padding: 10px; - line-height: 30px; - text-align: center; - border-radius: 5px; - box-shadow: 0 0 5px #666; - background: #ddd; - color: #666; - font-weight: bold; - z-index: 10; -} - .notification.good { - background: #f4f899; - } - .notification.bad { - background: #f4a899; - } - .notification a.close { - display: inline-block; - width: 16px; - height: 16px; - float: right; - margin: -20px -20px 0 0; - padding: 5px; - background: #fff; - border-radius: 50px; - border: 1px solid #aaa; - line-height: 16px; - } - -.toggle_aside, .btn.toggle_aside { - display: none; -} - -.actualizeProgress { - position: fixed; - top: 10px; - left: 25%; right: 25%; - padding: 5px; - background: #fff; - text-align: center; - border: 1px solid #ddd; - border-radius: 5px; -} - .actualizeProgress progress { - max-width: 100%; - vertical-align: middle; - } - .actualizeProgress .progress { - color: #999; - font-size: 90%; - vertical-align: middle; - } - -.logs { - border: 1px solid #aaa; -} - .log { - padding: 5px 2%; - overflow: auto; - background: #fafafa; - border-bottom: 1px solid #999; - color: #333; - font-size: 90%; - } - .log .date { - display: block; - } - .log.error { - background: #fdd; - color: #844; - } - .log.warning { - background: #ffe; - color: #c95; - } - .log.notice { - background: #f4f4f4; - color: #aaa; - } - .log.debug { - background: #111; - color: #eee; - } - -.form-group table { - border-collapse:collapse; - margin:10px 0 0 220px; - text-align:center; -} - -.form-group tr, .form-group th, .form-group td { - border:1px solid #DDD; - font-weight:normal; - padding:.5em; -} - -select.number option { - text-align:right; -} - -@media(max-width: 840px) { - .header, - .aside .btn-important, - .aside .feeds .dropdown, - .flux_header .item.website span, - .item.date { - display: none; - } - .flux_header .item.website { - width: 40px; - text-align: center; - } - .flux_header .item.website .favicon { - padding: 12px; - } - - .nav-login { - display: block; - } - - .content { - font-size: 120%; - padding: 0; - } - - .pagination { - margin: 0 0 40px; - } - .pagination .pager-previous, .pagination .pager-next { - width: 100px; - } - - .toggle_aside, .btn.toggle_aside { - display: inline-block; - } - .aside { - position: fixed; - top: 0; left: 0; - width: 0; - overflow: hidden; - border-right: none; - z-index: 10; - transition: width 200ms linear; - } - .aside.aside_flux { - padding: 10px 0 0; - } - .aside:target { - width: 80%; - border-right: 1px solid #aaa; - overflow: auto; - } - .aside .toggle_aside { - position: absolute; - right: 0; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border: 1px solid #ccc; - border-radius: 20px; - text-align: center; - line-height: 26px; - } - .aside .categories { - margin: 30px 0; - } - - #nav_entries { - width: 100%; - } - - .nav_menu .btn { - margin: 5px 10px; - } - .nav_menu .stick { - margin: 0 10px; - } - .nav_menu .stick .btn { - margin: 5px 0; - } - .nav_menu .search { - display: inline-block; - max-width: 97%; - } - .nav_menu .search input { - max-width: 97%; - width: 90px; - } - .nav_menu .search input:focus { - width: 400px; - } - - #panel { - left: 5px; right: 5px; - } - - .day .date { - display: none; - } - .day .name { - height: 2.6em; - font-size: 1em; - text-shadow: none; - } - - .notification, - .actualizeProgress { - left: 10px; - right: 10px; - } -} - -/*** FALLBACK ***/ -.btn { - background: #fff; - background: -moz-linear-gradient(top, #fff 0%, #eee 100%); - background: -webkit-linear-gradient(top, #fff 0%, #eee 100%); - background: -o-linear-gradient(top, #fff 0%, #eee 100%); - background: -ms-linear-gradient(top, #fff 0%, #eee 100%); -} - .btn:hover { - background: #f0f0f0; - background: -moz-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - } - .btn-important { - background: #0084CC; - background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%); - } - .btn-important:hover { - background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%); - } - .btn-attention { - background: #E95B57; - background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%); - } - .btn-attention:hover { - background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%); - } - -.dropdown-menu:after { - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); -} - -.nav-head { - background: #fff; - background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); -} - -.header > .item.search input { - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; -} - -@media(max-width: 840px) { - .aside { - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; - } -} - -@media print { - .header, - .aside, - .nav_menu, - .day, - .flux_header, - .flux_content .bottom, - .pagination { - display: none; - } - - html, body { - background: #fff; - color: #000; - font-family: Serif; - font-size: 12pt; - } - - #global, - .flux_content { - display: block !important; - } - - .flux_content .content { - width: 100% !important; - text-align: justify; - } - - .flux_content .content a { - color: #000; - } - .flux_content .content a:after { - content: " (" attr(href) ") "; - text-decoration: underline; - } -} diff --git a/p/themes/default/global.css b/p/themes/default/global.css deleted file mode 100644 index 49f3aa4cd..000000000 --- a/p/themes/default/global.css +++ /dev/null @@ -1,503 +0,0 @@ -@charset "UTF-8"; - -/* FONTS */ -@font-face { - font-family: "OpenSans"; - src: url("../fonts/openSans.woff") format("woff"); -} - - -* { - margin: 0; - padding: 0; -} -html, body { - height: 100%; - font-size: 95%; - font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; -} - -/* LIENS */ -a { - color: #0062BE; - text-decoration: none; -} - a:hover { - text-decoration: underline; - } - -/* LISTES */ -ul, ol, dl { - margin: 10px 0 10px 30px; - line-height: 190%; -} - dd { - margin: 0 0 10px 30px; - } - -/* TITRES */ -h1, h2, h3 { - min-height: 40px; - margin: 15px 0 5px; - line-height: 40px; -} - -/* IMG */ -figure { - margin: 5px 0 10px; - text-align: center; -} - figcaption { - display: inline-block; - padding: 3px 20px; - color: #999; - font-style: italic; - border-bottom: 1px solid #ccc; - } -img { - height: auto; - max-width: 100%; - vertical-align: middle; -} - a img { - border: none; - } - -/* VIDEOS */ -iframe, embed, object, video { - max-width: 100%; -} - -/* FORMULAIRES */ -legend { - display: block; - width: 100%; - margin: 20px 0 5px; - padding: 5px 0; - border-bottom: 1px solid #ddd; - font-size: 150%; - clear: both; -} -label { - display: block; - min-height: 25px; - padding: 5px 0; - font-size: 14px; - line-height: 25px; - cursor: pointer; -} -input, select, textarea { - display: inline-block; - max-width: 100%; - min-height: 25px; - padding: 5px; - background: #fdfdfd; - border: 1px solid #bbb; - border-radius: 3px; - color: #666; - line-height: 25px; - vertical-align: middle; - box-shadow: 0 2px 2px #eee inset; -} - option { - padding:0 .5em 0 .5em; - } - input[type="radio"], - input[type="checkbox"] { - width: 15px !important; - min-height: 15px !important; - } - input:focus, select:focus, textarea:focus { - color: #0062BE; - border-color: #33BBFF; - box-shadow: 0 2px 2px #DDDDFF inset; - } - input:invalid, select:invalid { - border-color: red; - box-shadow: 0 0 2px 1px red; - } - -.form-group { - margin: 0; -} - .form-group:after { - content: ""; - display: block; - clear: both; - } - .form-group.form-actions { - min-width: 250px; - padding: 5px 0; - background: #f4f4f4; - border-top: 1px solid #ddd; - } - .form-group.form-actions .btn { - margin: 0 10px; - } - .form-group .group-name { - display: block; - float: left; - width: 200px; - padding: 10px 0; - text-align: right; - } - .form-group .group-controls { - min-width: 250px; - min-height: 25px; - margin: 0 0 0 220px; - padding: 5px 0; - } - .form-group .group-controls .control { - display: block; - min-height: 30px; - padding: 5px 0; - line-height: 25px; - font-size: 14px; - } - -.stick { - display: inline-block; - white-space: nowrap; - font-size: 0px; - vertical-align: middle; -} - .stick input, - .stick .btn { - border-radius: 0; - font-size: 14px; - } - .stick .btn:first-child, - .stick input:first-child { - border-radius: 3px 0 0 3px; - } - .stick .btn-important:first-child { - border-right: 1px solid #06f; - } - .stick .btn:last-child, - .stick input:last-child { - border-radius: 0 3px 3px 0; - } - .stick .btn + .btn, - .stick .btn + input, - .stick input + .btn, - .stick input + input { - border-left: none; - } - .stick input + .btn { - border-top: 1px solid #bbb; - } - .stick .btn + .dropdown > .btn { - border-left: none; - border-radius: 0 3px 3px 0; - } - .stick .btn + .dropdown a { - font-size: 12px; - } - -.btn { - display: inline-block; - min-height: 37px; - min-width: 15px; - padding: 5px 10px; - background: linear-gradient(to bottom, #fff 0%, #eee 100%); - border-radius: 3px; - border: 1px solid #ddd; - border-bottom: 1px solid #aaa; - border-right: 1px solid #aaa; - color: #666; - text-shadow: 0px -1px 0 #ddd; - line-height: 20px; - vertical-align: middle; - cursor: pointer; - overflow: hidden; -} - a.btn { - min-height: 25px; - line-height: 25px; - } - .btn:hover { - background: linear-gradient(to bottom, #f8f8f8, #f0f0f0); - text-decoration: none; - } - .btn.active, - .btn:active, - .dropdown-target:target ~ .btn.dropdown-toggle { - box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; - background: #eee; - } - - .btn-important { - background: linear-gradient(to bottom, #0084CC, #0045CC); - color: #fff; - border: 1px solid #0062B7; - text-shadow: 0px -1px 0 #aaa; - } - .btn-important:hover { - background: linear-gradient(to bottom, #0066CC, #0045CC); - } - .btn-important:active { - background: #0044CB; - box-shadow: none; - } - - .btn-attention { - background: linear-gradient(to bottom, #E95B57, #BD362F); - color: #fff; - border: 1px solid #C44742; - text-shadow: 0px -1px 0px #666; - } - .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - } - .btn-attention:active { - background: #BD362F; - box-shadow: none; - } - -/* NAVIGATION */ -.nav-list .nav-header, -.nav-list .item { - display: block; - height: 35px; - line-height: 35px; -} - .nav-list .item:hover { - background: #fafafa; - } - .nav-list .item:hover a { - color: #003388; - } - .nav-list .item.active { - background: #0062BE; - color: #fff; - } - .nav-list .item.active a { - color: #fff; - } - .nav-list .disable { - color: #aaa; - background: #fafafa; - text-align: center; - } - .nav-list .item > * { - display: block; - padding: 0 10px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .nav-list a:hover { - text-decoration: none; - } - .nav-list .item.error a { - color: #BD362F; - } - .nav-list .item.active.error a { - color: #fff; - background: #BD362F; - } - .nav-list .item.empty a { - color: #f39c12; - } - .nav-list .item.active.empty a { - color: #fff; - background: #f39c12; - } - - .nav-list .nav-header { - padding: 0 10px; - color: #888; - background: #f4f4f4; - border-bottom: 1px solid #ddd; - font-weight: bold; - text-shadow: 0 0 1px #ddd; - } - .nav-list .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #ddd; - } - - .nav-list .nav-form { - padding: 3px; - text-align: center; - } - -.nav-head { - display: block; - margin: 0; - background: linear-gradient(to bottom, #fff, #f0f0f0); - border-bottom: 1px solid #ddd; - text-align: right; -} - .nav-head .item { - display: inline-block; - padding: 5px 10px; - } - -/* HORIZONTAL-LIST */ -.horizontal-list { - display: table; - table-layout: fixed; - margin: 0; - padding: 0; - width: 100%; -} - .horizontal-list .item { - display: table-cell; - vertical-align: middle; - } - -/* DROPDOWN */ -.dropdown { - position: relative; - display: inline-block; -} - .dropdown-target { - display: none; - } - - .dropdown-menu { - display: none; - min-width: 200px; - margin: 5px 0 0; - padding: 5px 0; - position: absolute; - right: 0px; - background: #fff; - border: 1px solid #ddd; - border-radius: 5px; - text-align: left; - box-shadow: 3px 3px 3px #ddd; - } - .dropdown-menu:after { - content: ""; - position: absolute; - top: -6px; - right: 13px; - width: 10px; - height: 10px; - background: #fff; - border-top: 1px solid #ddd; - border-left: 1px solid #ddd; - z-index: -10; - transform: rotate(45deg); - } - .dropdown-header { - display: block; - padding: 0 5px; - color: #888; - font-weight: bold; - font-size: 14px; - line-height: 30px; - } - .dropdown-menu > .item { - display: block; - height: 30px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu > .item > a { - display: block; - padding: 0 25px; - line-height: 30px; - } - .dropdown-menu > .item:hover { - background: #0062BE; - color: #fff; - } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } - .dropdown-menu > .item:hover > a { - color: #fff; - text-decoration: none; - } - .dropdown-menu .input { - display: block; - height: 40px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu .input select, - .dropdown-menu .input input { - display: block; - height: 20px; - width: 95%; - margin: auto; - padding: 2px 5px; - border-radius: 3px; - } - .dropdown-menu .input select { - width: 70%; - height: auto; - } - .dropdown-menu .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #ddd; - } - .dropdown-target:target ~ .dropdown-menu { - display: block; - z-index: 10; - } - .dropdown-close { - display: inline; - } - .dropdown-close a { - font-size: 0; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - display: block; - z-index: -10; - } - -/* ALERTS */ -.alert { - display: block; - width: 90%; - margin: 15px auto; - padding: 10px 15px; - background: #f4f4f4; - border: 1px solid #ccc; - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; - border-radius: 5px; - color: #aaa; - text-shadow: 0 0 1px #eee; -} - .alert-head { - margin: 0; - font-weight: bold; - font-size: 110%; - } - .alert-warn { - background: #ffe; - border: 1px solid #eeb; - color: #c95; - } - .alert-success { - background: #dfd; - border: 1px solid #cec; - color: #484; - } - .alert-error { - background: #fdd; - border: 1px solid #ecc; - color: #844; - } - -/* ICÔNES */ -.icon { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - line-height: 16px; -} diff --git a/p/themes/default/loader.gif b/p/themes/default/loader.gif deleted file mode 100644 index 5ff26f0e3..000000000 Binary files a/p/themes/default/loader.gif and /dev/null differ diff --git a/p/themes/default/metadata.json b/p/themes/default/metadata.json deleted file mode 100644 index d316ec517..000000000 --- a/p/themes/default/metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Default", - "author": "Marien Fressinaud", - "description": "Le thème par défaut pour FreshRSS", - "version": 0.1, - "files": ["global.css", "freshrss.css"] -} diff --git a/p/themes/default_dark/freshrss.css b/p/themes/default_dark/freshrss.css deleted file mode 100644 index e9eb2c705..000000000 --- a/p/themes/default_dark/freshrss.css +++ /dev/null @@ -1,862 +0,0 @@ -@charset "UTF-8"; - -/* STRUCTURE */ -.header { - display: table; - width: 100%; - background: #1c1c1c; - table-layout: fixed; -} - .header > .item { - display: table-cell; - padding: 10px 0; - border-bottom: 1px solid #2f2f2f; - vertical-align: middle; - text-align: center; - } - .header > .item.title { - width: 250px; - white-space: nowrap; - } - .logo { - display: inline-block; - font-size: 48px; - height: 32px; - width: 32px; - padding: 10px; - } - .header > .item.title h1 { - display: inline-block; - margin: 0; - } - .header > .item.search input { - width: 230px; - transition: width 200ms linear; - } - .header .item.search input:focus { - width: 330px; - } - .header > .item.configure { - width: 100px; - } - -.item a:hover { - text-decoration: none; -} - -#global { - display: table; - width: 100%; - height: 100%; - background: #1c1c1c; - table-layout: fixed; -} - .aside { - display: table-cell; - height: 100%; - width: 250px; - vertical-align: top; - border-right: 1px solid #2f2f2f; - background: #1c1c1c; - } - .aside .nav-form input { - width: 180px; - } - .aside.aside_flux { - padding: 10px 0 40px; - } - .aside.aside_feed .nav-form input { - width: 140px; - } - .aside.aside_feed .nav-form .dropdown .dropdown-menu { - right: -20px; - } - .aside.aside_feed .nav-form .dropdown .dropdown-menu:after { - right: 33px; - } - - .nav-login { - display: none; - } - - .nav_menu { - width: 100%; - background: #1c1c1c; - border-bottom: 1px solid #2f2f2f; - text-align: center; - padding: 5px 0; - } - .nav_menu .search { - display:none; - } - -.favicon { - height: 16px; - width: 16px; -} - -.categories { - margin: 0; - padding: 0; - text-align: center; - list-style: none; -} - .category { - display: block; - width: 220px; - margin: 10px auto; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .category .btn:first-child { - width: 195px; - position: relative; - } - .category.stick .btn:first-child { - width:160px; - } - .category .btn:first-child:not([data-unread="0"]):after { - content: attr(data-unread); - position: absolute; - top: 3px; right: 3px; - padding: 1px 5px; - background: #1a1a1a; - color: #888; - font-size: 90%; - border: 1px solid #000; - border-radius: 5px; - } - .category + .feeds:not(.active) { - display:none; - } - .categories .feeds { - width: 100%; - margin: 0; - list-style: none; - } - .categories .feeds .item.active { - background: #26303F; - } - .categories .feeds .item.active .feed { - color: #888; - } - .categories .feeds .item.empty .feed { - color: #e67e22; - } - .categories .feeds .item.empty.active { - background: #e67e22; - } - .categories .feeds .item.empty.active .feed { - color: #fff; - } - .categories .feeds .item.error .feed { - color: #BD362F; - } - .categories .feeds .item .feed { - display: inline-block; - margin: 0; - width: 165px; - line-height: 35px; - font-size: 90%; - vertical-align: middle; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .feed:not([data-unread="0"]):before { - content: "(" attr(data-unread) ") "; - } - .categories .feeds .dropdown-menu { - left: 0; - } - .categories .feeds .dropdown-menu:after { - left: 2px; - } - .categories .feeds .item .dropdown-toggle > .icon { - visibility: hidden; - cursor: pointer; - } - .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, - .categories .feeds .item:hover .dropdown-toggle > .icon, - .categories .feeds .item.active .dropdown-toggle > .icon { - background-color: #1c1c1c; - border-radius: 3px; - visibility: visible; - } - -.post { - padding: 10px 50px; -} - .post form { - margin: 10px 0; - } - -.day { - min-height: 50px; - padding: 0 10px; - font-size: 130%; - font-weight: bold; - line-height: 50px; - background: #1c1c1c; - border-top: 1px solid #888; - border-bottom: 1px solid #888; -} - .day:first-child { - border-top: none; - } - .day .name { - position: absolute; - right: 0; - width: 50%; - height: 1.5em; - padding: 0 10px 0 0; - overflow: hidden; - color: #aab; - font-size: 1.8em; - opacity: .3; - text-shadow: 0px -1px 0px #333; - font-style: italic; - white-space: nowrap; - text-overflow: ellipsis; - text-align: right; - } - -.flux { - border-left: 3px solid #aaa; - background: #1c1c1c; -} - .flux.not_read { - border-left: 3px solid #FF5300; - background: #1c1c1c; - } - .flux.favorite { - border-left: 3px solid #FFC300; - background: #1c1c1c; - } - .flux.current { - border-left: 3px solid #0062BE; - background: #1a1a1a; - } - - .flux_header { - background: inherit; - height: 25px; - font-size: 12px; - border-top: 1px solid #2f2f2f; - cursor: pointer; - } - .flux .item { - line-height: 40px; - white-space: nowrap; - } - .flux_header > .item { - overflow: hidden; - text-overflow: ellipsis; - } - .flux .item.manage { - width: 40px; - text-align: center; - } - .flux .item.website { - width: 200px; - } - .website .favicon { - padding: 5px; - } - .flux .item.title { - background: inherit; - } - .flux:hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; - } - .flux .item.title a { - color: #888; - outline: none; - } - .flux.not_read .item.title, - .flux.current .item.title { - font-weight: bold; - } - .flux .item.date { - width: 200px; - padding:0 5px 0 0; - text-align: right; - font-size: 10px; - color: #666; - } - .link { - width: 40px; - text-align: center; - } - -#stream.reader .flux { - padding: 0 0 30px; - border: none; - background: #1c1c1c; - color: #888; -} - #stream.reader .flux .author { - margin: 0 0 10px; - font-size: 90%; - color: #666; - } - -#stream.global { - text-align: center; -} - #stream.global .box-category { - display: inline-block; - width: 280px; - margin: 20px 10px; - vertical-align: top; - background: #1a1a1a; - border: 1px solid #000; - border-radius: 5px; - text-align: left; - box-shadow: 0 0 5px #2f2f2f; - } - #stream.global .category { - width: 100%; - margin: 0; - } - #stream.global .btn { - display: block; - width: auto; - height: 35px; - margin: 0; - padding: 0 10px; - background: #26303F; - border: none; - border-bottom: 1px solid #2f2f2f; - border-radius: 5px 5px 0 0; - line-height: 35px; - font-size: 120%; - } - #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; - } - #stream.global .btn:first-child:not([data-unread="0"]):after { - top: 0; right: 5px; - border: 0; - background: none; - color: #666; - font-weight: bold; - box-shadow: none; - } - #stream.global .box-category .feeds { - display: block; - max-height: 250px; - margin: 0; - list-style: none; - overflow: auto; - } - #stream.global .box-category .feeds .item { - padding: 2px 10px; - font-size: 90%; - } - #stream.global .box-category .feed { - width: 220px; - } - -.content { - min-height: 150px; - max-width: 550px; - margin: 0 auto; - padding: 20px 10px; - line-height: 170%; - word-wrap: break-word; -} - .content h1, .content h2, .content h3 { - margin: 20px 0 5px; - } - .content > .title { - font-size: x-large; - margin: 0; - } - - .content p { - margin: 0 0 20px; - } - img.big { - display: block; - margin: 10px auto; - } - figure img.big { - margin: 0; - } - .content hr { - margin: 30px 0; - height: 1px; - background: #ddd; - border: 0; - } - .content pre { - margin: 10px auto; - padding: 10px; - overflow: auto; - background: #000; - color: #fff; - font-size: 110%; - } - .content q, .content blockquote { - display: block; - margin: 5px 0; - padding: 5px 20px; - font-style: italic; - border-left: 4px solid #ccc; - color: #666; - } - .content blockquote p { - margin: 0; - } - -#panel { - display: none; - position: fixed; - top: 10px; bottom: 10px; - left: 100px; right: 100px; - overflow: auto; - background: #1c1c1c; - border: 1px solid #95a5a6; - border-radius: 5px; -} - #panel .close { - position: fixed; - top: 10px; right: 0; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border: 1px solid #ccc; - border-radius: 20px; - text-align: center; - line-height: 26px; - background: #fff; - } - -#overlay { - display: none; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - background: rgba(0, 0, 0, 0.9); -} - -.flux_content .bottom { - font-size: 90%; - text-align: center; -} - -.hide_posts > :not(.active) > .flux_content { - display:none; -} - -/*** PAGINATION ***/ -.pagination { - display: table; - width: 100%; - margin: 0; - background: #1a1a1a; - text-align: center; - color: #888; - font-size: 80%; - line-height: 200%; - table-layout: fixed; -} - .pagination .item { - display: table-cell; - line-height: 40px; - } - .pagination .item.pager-current { - font-weight: bold; - font-size: 140%; - } - .pagination .pager-first, - .pagination .pager-previous, - .pagination .pager-next, - .pagination .pager-last { - width: 100px; - } - .pagination .item a { - display: block; - color: #333; - font-style: italic; - } - .pagination:first-child .item { - border-bottom: 1px solid #aaa; - } - .pagination:last-child .item { - border-top: 1px solid #aaa; - } - -#nav_entries { - display: table; - width: 250px; - height: 40px; - position: fixed; - bottom: 0; - left: 0; - margin: 0; - background: #1c1c1c; - border-top: 1px solid #2f2f2f; - text-align: center; - line-height: 40px; - table-layout: fixed; -} - #nav_entries .item { - display: table-cell; - width: 30%; - } - #nav_entries a { - display: block; - } - #nav_entries .i_up { - margin: 5px 0 0; - vertical-align: top; - } - -.loading { - background: url("loader.gif") center center no-repeat; - font-size: 0; -} - -#bigMarkAsRead { - display: block; - font-style: normal; - padding: 32px 0 64px 0; - text-align: center; - text-decoration: none; -} - #bigMarkAsRead:hover { - background: #1c1c1c; - color: #888; - } - .bigTick { - font-size: 72pt; - line-height: 1.6em; - } - -/*** NOTIFICATION ***/ -.notification { - position: absolute; - top: 10px; - left: 25%; right: 25%; - min-height: 30px; - padding: 10px; - line-height: 30px; - text-align: center; - border-radius: 5px; - box-shadow: 0 0 5px #666; - background: #1a1a1a; - color: #888; - font-weight: bold; - z-index: 10; -} - .notification.good { - border:1px solid #f4f899; - } - .notification.bad { - border:1px solid #f4a899; - } - .notification a.close { - 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; -} - -.actualizeProgress { - position: fixed; - top: 10px; - left: 25%; right: 25%; - padding: 5px; - background: #1a1a1a; - text-align: center; - border: 1px solid #2f2f2f; - border-radius: 5px; -} - .actualizeProgress progress { - max-width: 100%; - vertical-align: middle; - } - .actualizeProgress .progress { - color: #888; - font-size: 90%; - vertical-align: middle; - } - -.logs { - border: 1px solid #aaa; -} - .log { - padding: 5px 2%; - overflow: auto; - background: #fafafa; - border-bottom: 1px solid #999; - color: #333; - font-size: 90%; - } - .log .date { - display: block; - } - .log.error { - background: #fdd; - color: #844; - } - .log.warning { - background: #ffe; - color: #c95; - } - .log.notice { - background: #f4f4f4; - color: #aaa; - } - .log.debug { - background: #111; - color: #eee; - } - -.form-group table { - border-collapse:collapse; - margin:10px 0 0 220px; - text-align:center; -} - -.form-group tr, .form-group th, .form-group td { - border:1px solid #2f2f2f; - font-weight:normal; - padding:.5em; -} - -select.number option { - text-align:right; -} - -@media(max-width: 840px) { - .header, - .aside .btn-important, - .aside .feeds .dropdown, - .flux_header .item.website span, - .item.date { - display: none; - } - .flux_header .item.website { - width: 40px; - text-align: center; - } - .flux_header .item.website .favicon { - padding: 12px; - } - - .nav-login { - display: block; - } - - .content { - font-size: 120%; - padding: 0; - } - - .pagination { - margin: 0 0 40px; - } - .pagination .pager-previous, .pagination .pager-next { - width: 100px; - } - - .toggle_aside, .btn.toggle_aside { - display: inline-block; - } - .aside { - position: fixed; - top: 0; left: 0; - width: 0; - overflow: hidden; - border-right: none; - z-index: 10; - transition: width 200ms linear; - } - .aside.aside_flux { - padding: 10px 0 0; - } - .aside:target { - width: 80%; - border-right: 1px solid #aaa; - overflow: auto; - } - .aside .toggle_aside { - position: absolute; - right: 0; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border: 1px solid #ccc; - border-radius: 20px; - text-align: center; - line-height: 26px; - } - .aside .categories { - margin: 30px 0; - } - - #nav_entries { - width: 100%; - } - - .nav_menu .btn { - margin: 5px 10px; - } - .nav_menu .stick { - margin: 0 10px; - } - .nav_menu .stick .btn { - margin: 5px 0; - } - .nav_menu .search { - display: inline-block; - max-width: 97%; - } - .nav_menu .search input { - max-width: 97%; - width: 90px; - } - .nav_menu .search input:focus { - width: 400px; - } - - #panel { - left: 5px; right: 5px; - } - - .day .date { - display: none; - } - .day .name { - height: 2.6em; - font-size: 1em; - text-shadow: none; - } - - .notification, - .actualizeProgress { - left: 10px; - right: 10px; - } -} - -/*** FALLBACK ***/ -.btn { - background: #1c1c1c; -} - .btn:hover { - background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - } - .btn-important { - background: #26303F; - } - .btn-important:hover { - background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - } - .btn-attention { - background: #880011; - } - .btn-attention:hover { - background: -moz-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -webkit-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -o-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -ms-linear-gradient(top, #cc0044 0%, #880011 100%); - } - -.dropdown-menu:after { - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); -} - -.nav-head { - background: #fff; - background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); -} - -.header > .item.search input { - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; -} - -@media(max-width: 840px) { - .aside { - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; - } -} - -@media print { - .header, - .aside, - .nav_menu, - .day, - .flux_header, - .flux_content .bottom, - .pagination { - display: none; - } - - html, body { - background: #fff; - color: #000; - font-family: Serif; - font-size: 12pt; - } - - #global, - .flux_content { - display: block !important; - } - - .flux_content .content { - width: 100% !important; - text-align: justify; - } - - .flux_content .content a { - color: #000; - } - .flux_content .content a:after { - content: " (" attr(href) ") "; - text-decoration: underline; - } -} diff --git a/p/themes/default_dark/global.css b/p/themes/default_dark/global.css deleted file mode 100644 index 04eb723f1..000000000 --- a/p/themes/default_dark/global.css +++ /dev/null @@ -1,487 +0,0 @@ -@charset "UTF-8"; - -/* FONTS */ -@font-face { - font-family: "OpenSans"; - src: url("../fonts/openSans.woff") format("woff"); -} - - -* { - margin: 0; - padding: 0; -} -html, body { - height: 100%; - font-size: 95%; - font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; - color: #888; -} - -/* LIENS */ -a { - color: #6986B2; - text-decoration: none; -} - a:hover { - text-decoration: underline; - } - -/* LISTES */ -ul, ol, dl { - margin: 10px 0 10px 30px; - line-height: 190%; -} - dd { - margin: 0 0 10px 30px; - } - -/* TITRES */ -h1, h2, h3 { - min-height: 40px; - margin: 15px 0 5px; - line-height: 40px; -} - -/* IMG */ -figure { - margin: 5px 0 10px; - text-align: center; -} - figcaption { - display: inline-block; - padding: 3px 20px; - color: #999; - font-style: italic; - border-bottom: 1px solid #ccc; - } -img { - height: auto; - max-width: 100%; - vertical-align: middle; -} - a img { - border: none; - } - -/* VIDEOS */ -iframe, embed, object, video { - max-width: 100%; -} - -/* FORMULAIRES */ -legend { - display: block; - width: 100%; - margin: 20px 0 5px; - padding: 5px 0; - border-bottom: 1px solid #2f2f2f; - font-size: 150%; - clear: both; -} -label { - display: block; - min-height: 25px; - padding: 5px 0; - font-size: 14px; - line-height: 25px; - cursor: pointer; -} -input, select, textarea { - display: inline-block; - max-width: 100%; - min-height: 25px; - padding: 5px; - background: #333; - border: 1px solid #000; - border-radius: 3px; - color: #999; - line-height: 25px; - vertical-align: middle; - box-shadow: 0 2px 2px #1d1d1d inset; -} - option { - padding:0 .5em 0 .5em; - } - input[type="radio"], - input[type="checkbox"] { - width: 15px !important; - min-height: 15px !important; - } - input:focus, select:focus, textarea:focus { - color: #6986b2; - border-color: #2f2f2f; - } - input:invalid, select:invalid { - border-color: red; - box-shadow: 0 0 2px 1px red; - } - -.form-group { - margin: 0; -} - .form-group:after { - content: ""; - display: block; - clear: both; - } - .form-group.form-actions { - min-width: 250px; - padding: 5px 0; - background: #1a1a1a; - border-top: 1px solid #2f2f2f; - } - .form-group.form-actions .btn { - margin: 0 10px; - } - .form-group .group-name { - display: block; - float: left; - width: 200px; - padding: 10px 0; - text-align: right; - } - .form-group .group-controls { - min-width: 250px; - min-height: 25px; - margin: 0 0 0 220px; - padding: 5px 0; - } - .form-group .group-controls .control { - display: block; - min-height: 30px; - padding: 5px 0; - line-height: 25px; - font-size: 14px; - } - -.stick { - display: inline-block; - white-space: nowrap; - font-size: 0px; - vertical-align: middle; -} - .stick input, - .stick .btn { - border-radius: 0; - font-size: 14px; - } - .stick .btn:first-child, - .stick input:first-child { - border-radius: 3px 0 0 3px; - } - .stick .btn-important:first-child { - border-right: 1px solid #000; - } - .stick .btn:last-child, - .stick input:last-child { - border-radius: 0 3px 3px 0; - } - .stick .btn + .btn, - .stick .btn + input, - .stick input + .btn, - .stick input + input { - border-left: none; - } - .stick .btn + .dropdown > .btn { - border-left: none; - border-radius: 0 3px 3px 0; - } - .stick .btn + .dropdown a { - font-size: 12px; - } - -.btn { - display: inline-block; - min-height: 37px; - min-width: 15px; - padding: 5px 10px; - background: linear-gradient(to bottom, #fff 0%, #eee 100%); - border-radius: 3px; - border: 1px solid #000; - color: #888; - line-height: 20px; - vertical-align: middle; - cursor: pointer; - overflow: hidden; -} - a.btn { - min-height: 25px; - line-height: 25px; - } - .btn:hover { - background: linear-gradient(to bottom, #4A5D7A, #26303F); - text-decoration: none; - } - .btn.active, - .btn:active, - .dropdown-target:target ~ .btn.dropdown-toggle { - background: #26303F; - } - - .btn-important { - background: linear-gradient(to bottom, #0084CC, #0045CC); - color: #888888; - border: 1px solid #000000; - } - .btn-important:hover { - background: linear-gradient(to bottom, #0066CC, #0045CC); - } - .btn-important:active { - background: #0044CB; - box-shadow: none; - } - - .btn-attention { - background: linear-gradient(to bottom, #E95B57, #BD362F); - color: #888888; - border: 1px solid #000000; - } - .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - } - .btn-attention:active { - background: #BD362F; - box-shadow: none; - } - -/* NAVIGATION */ -.nav-list .nav-header, -.nav-list .item { - display: block; - height: 35px; - line-height: 35px; -} - .nav-list .item:hover { - background: #1a1a1a; - } - .nav-list .item:hover a { - color: #26303F; - } - .nav-list .item.active { - background: #26303F; - color: #1a1a1a; - } - .nav-list .item.active a { - color: #888; - } - .nav-list .disable { - color: #aaa; - background: #fafafa; - text-align: center; - } - .nav-list .item > * { - display: block; - padding: 0 10px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .nav-list a:hover { - text-decoration: none; - } - .nav-list .item.error a { - color: #BD362F; - } - .nav-list .item.active.error a { - color: #fff; - background: #BD362F; - } - .nav-list .item.empty a { - color: #f39c12; - } - .nav-list .item.active.empty a { - color: #fff; - background: #f39c12; - } - - .nav-list .nav-header { - padding: 0 10px; - background: #1a1a1a; - border-bottom: 1px solid #2f2f2f; - font-weight: bold; - } - .nav-list .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #ddd; - } - - .nav-list .nav-form { - padding: 3px; - text-align: center; - } - -.nav-head { - display: block; - margin: 0; - background: linear-gradient(to bottom, #fff, #f0f0f0); - border-bottom: 1px solid #ddd; - text-align: right; -} - .nav-head .item { - display: inline-block; - padding: 5px 10px; - } - -/* HORIZONTAL-LIST */ -.horizontal-list { - display: table; - table-layout: fixed; - margin: 0; - padding: 0; - width: 100%; -} - .horizontal-list .item { - display: table-cell; - vertical-align: middle; - } - -/* DROPDOWN */ -.dropdown { - position: relative; - display: inline-block; -} - .dropdown-target { - display: none; - } - - .dropdown-menu { - display: none; - min-width: 200px; - margin: 5px 0 0; - padding: 5px 0; - position: absolute; - right: 0px; - background: #1a1a1a; - border: 1px solid #888; - border-radius: 5px; - text-align: left; - } - .dropdown-menu:after { - content: ""; - position: absolute; - top: -6px; - right: 13px; - width: 10px; - height: 10px; - background: #1a1a1a; - border-top: 1px solid #888; - border-left: 1px solid #888; - z-index: -10; - transform: rotate(45deg); - } - .dropdown-header { - display: block; - padding: 0 5px; - color: #888; - font-weight: bold; - font-size: 14px; - line-height: 30px; - } - .dropdown-menu .item { - display: block; - height: 30px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu > .item > a { - display: block; - padding: 0 25px; - line-height: 30px; - } - .dropdown-menu > .item:hover { - background: #26303F; - color: #888; - } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } - .dropdown-menu > .item:hover > a { - color: #888; - text-decoration: none; - } - .dropdown-menu .input { - display: block; - height: 40px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu .input select, - .dropdown-menu .input input { - display: block; - height: 20px; - width: 95%; - margin: auto; - padding: 2px 5px; - border-radius: 3px; - } - .dropdown-menu .input select { - width: 70%; - height: auto; - } - .dropdown-menu .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #888; - } - .dropdown-target:target ~ .dropdown-menu { - display: block; - z-index: 10; - } - .dropdown-close { - display: inline; - } - .dropdown-close a { - font-size: 0; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - display: block; - z-index: -10; - } - -/* ALERTS */ -.alert { - display: block; - width: 90%; - margin: 15px auto; - padding: 10px 15px; - background: #1a1a1a; - border: 1px solid #ccc; - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; - border-radius: 5px; - color: #aaa; -} - .alert-head { - margin: 0; - font-weight: bold; - font-size: 110%; - } - .alert-warn { - border: 1px solid #c95; - color: #c95; - } - .alert-success { - border: 1px solid #484; - color: #484; - } - .alert-error { - border: 1px solid #844; - color: #844; - } - -/* ICÔNES */ -.icon { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - line-height: 16px; -} diff --git a/p/themes/default_dark/loader.gif b/p/themes/default_dark/loader.gif deleted file mode 100644 index 86022be71..000000000 Binary files a/p/themes/default_dark/loader.gif and /dev/null differ diff --git a/p/themes/default_dark/metadata.json b/p/themes/default_dark/metadata.json deleted file mode 100644 index 7504831a6..000000000 --- a/p/themes/default_dark/metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Dark", - "author": "AD", - "description": "Le coté obscur du thème par défaut pour FreshRSS", - "version": 0.1, - "files": ["global.css", "freshrss.css"] -} diff --git a/p/themes/flat-design/freshrss.css b/p/themes/flat-design/freshrss.css deleted file mode 100644 index dca1b3f28..000000000 --- a/p/themes/flat-design/freshrss.css +++ /dev/null @@ -1,817 +0,0 @@ -@charset "UTF-8"; - -/* STRUCTURE */ -body { - background: #fafafa; -} - -.header { - display: table; - width: 100%; - table-layout: fixed; - background: #ecf0f1; -} - .header > .item { - display: table-cell; - padding: 10px 0; - vertical-align: middle; - text-align: center; - } - .header > .item.title { - width: 250px; - white-space: nowrap; - } - .logo { - display: inline-block; - font-size: 48px; - height: 32px; - width: 32px; - padding: 10px; - } - .header > .item.title h1 { - display: inline-block; - margin: 0; - } - .header > .item.search input { - width: 230px; - transition: width 200ms linear; - } - .header .item.search input:focus { - width: 330px; - } - .header > .item.configure { - width: 100px; - } - -.item a:hover { - text-decoration: none; -} - -#global { - display: table; - width: 100%; - height: 100%; - table-layout: fixed; -} - .aside { - display: table-cell; - height: 100%; - width: 250px; - vertical-align: top; - background: #ecf0f1; - } - .aside .nav-form input { - width: 180px; - } - .aside.aside_flux { - padding: 10px 0 40px; - } - .aside.aside_feed .nav-form input { - width: 140px; - } - .aside.aside_feed .nav-form .dropdown-menu { - right: -20px; - } - .aside.aside_feed .nav-form .dropdown-menu:after { - right: 33px; - } - - .nav-login { - display: none; - } - - .nav_menu { - width: 100%; - text-align: center; - padding: 5px 0; - } - .nav_menu .search { - display:none; - } - -.favicon { - height: 16px; - width: 16px; -} - -.categories { - margin: 0; - padding: 0; - text-align: center; - list-style: none; -} - .category { - display: block; - width: 220px; - margin: 10px auto; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .category .btn:first-child { - width: 195px; - position: relative; - } - .category.stick .btn:first-child { - width:160px; - } - .category .btn:first-child:not([data-unread="0"]):after { - content: attr(data-unread); - position: absolute; - top: 5px; right: 5px; - padding: 0 5px; - color: #fff; - font-size: 90%; - background: #3498DB; - border-radius: 5px; - } - .category + .feeds:not(.active) { - display:none; - } - .categories .feeds { - width: 100%; - margin: 0 auto; - list-style: none; - } - .categories .feeds .item.active:after { - content: "⇢"; - line-height: 35px; - float: right; - } - .categories .feeds .item.empty .feed { - color: #e67e22; - } - .categories .feeds .item.error .feed { - color: #BD362F; - } - .categories .feeds .item .feed { - display: inline-block; - margin: 0; - width: 165px; - line-height: 35px; - font-size: 90%; - vertical-align: middle; - text-align: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .feed:not([data-unread="0"]) { - font-weight:bold; - } - .feed:not([data-unread="0"]):before { - content: "(" attr(data-unread) ") "; - } - .categories .feeds .dropdown-menu { - left: 0; - } - .categories .feeds .dropdown-menu:after { - left: 2px; - } - .categories .feeds .item .dropdown-toggle > .icon { - visibility: hidden; - cursor: pointer; - } - .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, - .categories .feeds .item:hover .dropdown-toggle > .icon, - .categories .feeds .item.active .dropdown-toggle > .icon { - background-color: #95a5a6; - border-radius: 3px; - visibility: visible; - } - .categories .btn:hover .notRead, - .categories .btn.active .notRead { - background: #2980B9; - border-left: 3px solid #3498DB; - } - -.post { - padding: 10px 50px; -} - .post form { - margin: 10px 0; - } - -.day { - padding: 5px 15px; - font-size: 130%; - font-weight: bold; - line-height: 50px; - border-left: 3px solid #ecf0f1; -} - .day .name { - position: absolute; - right: 0; - width: 50%; - height: 1.5em; - padding: 0 10px 0 0; - overflow: hidden; - color: #aab; - font-size: 1.8em; - opacity: .3; - font-style: italic; - text-align: right; - white-space: nowrap; - text-overflow: ellipsis; - z-index: -10; - } - -.flux { - border-left: 3px solid #ecf0f1; -} - .flux:hover { - background: #fff; - } - .flux.not_read { - border-left-color: #FF5300; - background: #FFF3ED; - } - .flux.favorite { - border-left-color: #FFC300; - background: #FFF6DA; - } - .flux.current { - border-left-color: #3498db; - background: #fff; - } - - .flux_header { - background: inherit; - height: 25px; - font-size: 12px; - border-top: 1px solid #ecf0f1; - cursor: pointer; - } - .flux .item { - line-height: 40px; - white-space: nowrap; - } - .flux_header > .item { - overflow: hidden; - text-overflow: ellipsis; - } - .flux .item.manage { - width: 40px; - text-align: center; - } - .flux .item.website { - width: 200px; - } - .website .favicon { - padding: 5px; - } - .flux .item.title { - background: inherit; - } - .flux:hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; - } - .flux .item.title a { - color: #333; - outline: none; - } - .flux.current .item.title, - .flux.not_read .item.title { - font-weight: bold; - } - .flux .item.date { - width: 200px; - padding:0 5px 0 0; - text-align: right; - font-size: 10px; - color: #666; - } - .link { - width: 40px; - text-align: center; - } - -#stream.reader .flux { - position: relative; - padding: 0 0 30px; - border: none; - background: #ecf0f1; - color: #34495e; - font-size: 120%; -} - #stream.reader .flux .author { - margin: 0 0 10px; - font-size: 90%; - color: #aaa; - } - -#stream.global { - text-align: center; -} - #stream.global .box-category { - display: inline-block; - width: 280px; - margin: 20px 10px; - vertical-align: top; - border: 1px solid #ddd; - border-radius: 5px; - text-align: left; - } - #stream.global .category { - width: 100%; - margin: 0; - } - #stream.global .btn { - display: block; - width: auto; - height: 35px; - margin: 0; - padding: 0 10px; - background: #ecf0f1; - color: #333; - border-bottom: 1px solid #ddd; - border-radius: 5px 5px 0 0; - line-height: 35px; - font-size: 120%; - } - #stream.global .btn:not([data-unread="0"]) { - font-weight:bold; - } - #stream.global .btn:first-child:not([data-unread="0"]):after { - top: 0; right: 5px; - border: 0; - background: none; - color: #333; - font-weight: bold; - box-shadow: none; - } - #stream.global .box-category .feeds { - display: block; - max-height: 250px; - margin: 0; - list-style: none; - overflow: auto; - } - #stream.global .box-category .feeds .item { - padding: 2px 10px; - font-size: 90%; - } - #stream.global .box-category .feed { - width: 220px; - } - -.content { - min-height: 150px; - max-width: 550px; - margin: 0 auto; - padding: 20px 10px; - line-height: 170%; - word-wrap: break-word; -} - .content h1, .content h2, .content h3 { - margin: 20px 0 5px; - } - .content > .title { - font-size: x-large; - margin: 0; - } - - .content p { - margin: 0 0 20px; - } - img.big { - display: block; - margin: 10px auto; - } - figure img.big { - margin: 0; - } - .content hr { - margin: 30px 0; - height: 1px; - background: #ddd; - border: 0; - } - .content pre { - margin: 10px auto; - padding: 10px; - overflow: auto; - background: #000; - color: #fff; - font-size: 110%; - } - .content q, .content blockquote { - display: block; - margin: 5px 0; - padding: 5px 20px; - font-style: italic; - border-left: 4px solid #ccc; - color: #666; - } - .content blockquote p { - margin: 0; - } - -#panel { - display: none; - position: fixed; - top: 10px; bottom: 10px; - left: 100px; right: 100px; - overflow: auto; - background: #fff; - border: 1px solid #95a5a6; - border-radius: 5px; -} - #panel .close { - position: fixed; - top: 10px; right: 0px; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border-radius: 3px; - text-align: center; - line-height: 24px; - background: #95a5a6; - } - #panel .close:hover { - background: #7f8c8d; - } - -#overlay { - display: none; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - background: rgba(0, 0, 0, 0.9); -} - -.flux_content .bottom { - font-size: 90%; - text-align: center; -} - -.hide_posts > :not(.active) > .flux_content { - display:none; -} - -/*** PAGINATION ***/ -.pagination { - display: table; - width: 100%; - margin: 0; - background: #ecf0f1; - text-align: center; - color: #000; - font-size: 80%; - line-height: 200%; - table-layout: fixed; - font-weight: bold; -} - .pagination .item { - display: table-cell; - line-height: 40px; - vertical-align: top; - } - .pagination .item.pager-current { - font-weight: bold; - font-size: 140%; - color: #ecf0f1; - background: #34495e; - } - .pagination .item.pager-first, - .pagination .item.pager-previous, - .pagination .item.pager-next, - .pagination .item.pager-last { - width: 100px; - } - .pagination .item a { - display: block; - color: #000; - font-weight: bold; - line-height: 40px; - } - .pagination .item a:hover { - color: #ecf0f1; - background: #34495e; - } - -#nav_entries { - display: table; - width: 250px; - height: 40px; - position: fixed; - bottom: 0; - left: 0; - margin: 0; - background: #34495e; - text-align: center; - line-height: 40px; - table-layout: fixed; -} - #nav_entries .item { - display: table-cell; - width: 30%; - } - #nav_entries a { - display: block; - } - #nav_entries .i_up { - margin: 5px 0 0; - vertical-align: top; - } - -.pagination .loading, -.pagination a:hover.loading { - background: url("loader.gif") center center no-repeat #34495e; - font-size: 0; -} - -#bigMarkAsRead { - background: #ecf0f1; - display: block; - font-style: normal; - padding: 32px 0 64px 0; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 0 #aaa; -} - #bigMarkAsRead:hover { - background: #34495e; - color: #fff; - } - .bigTick { - font-size: 72pt; - line-height: 1.6em; - } - -/*** NOTIFICATION ***/ -.notification { - position: absolute; - top: 10px; - left: 25%; right: 25%; - min-height: 30px; - padding: 10px; - line-height: 30px; - text-align: center; - border-radius: 3px; - background: #ddd; - color: #666; - font-weight: bold; - z-index: 10; -} - .notification.good { - background: #1abc9c; - color: #fff; - } - .notification.bad { - background: #e74c3c; - color: #fff; - } - .notification a.close { - display: inline-block; - width: 16px; - height: 16px; - float: right; - margin: -16px -16px 0 0; - padding: 5px; - border-radius: 3px; - line-height: 16px; - } - .notification.good a.close { - background: #1abc9c; - } - .notification.bad a.close { - background: #e74c3c; - } - -.toggle_aside, .btn.toggle_aside { - display: none; -} - -.actualizeProgress { - position: fixed; - top: 10px; - left: 25%; right: 25%; - padding: 5px; - background: #3498db; - color: #fff; - text-align: center; - border-radius: 3px; - font-weight: bold; -} - .actualizeProgress progress { - max-width: 100%; - width: 250px; - height: 15px; - vertical-align: middle; - background: #fff; - border: none; - } - .actualizeProgress .progress { - color: #ecf0f1; - } - -.logs { - border: 1px solid #34495e; -} - .log { - margin: 10px 0; - padding: 5px 2%; - overflow: auto; - background: #fafafa; - color: #666; - font-size: 90%; - } - .log>.date { - margin: 0 10px 0 0; - padding: 5px 10px; - border-radius: 20px; - } - .log.error>.date { - background: #e74c3c; - color: #fff; - } - .log.warning>.date { - background: #f39c12; - } - .log.notice>.date { - background: #ecf0f1; - } - .log.debug>.date { - background: #111; - color: #eee; - } - -.form-group table { - border-collapse:collapse; - margin:10px 0 0 220px; - text-align:center; -} - -.form-group tr, .form-group th, .form-group td { - font-weight:normal; - padding:.5em; -} - -select.number option { - text-align:right; -} - -@media(max-width: 840px) { - .header, - .aside .btn-important, - .aside .feeds .dropdown, - .flux_header .item.website span, - .item.date { - display: none; - } - .flux_header .item.website { - width: 40px; - text-align: center; - } - .flux_header .item.website .favicon { - padding: 12px; - } - - .nav-login { - display: block; - } - - .content { - font-size: 120%; - padding: 0; - } - - .pagination { - margin: 0 0 40px; - } - .pagination .pager-previous, .pagination .pager-next { - width: 100px; - } - - .toggle_aside, .btn.toggle_aside { - display: inline-block; - } - .aside { - position: fixed; - top: 0; left: 0; - width: 0; - overflow: hidden; - z-index: 10; - transition: width 200ms linear; - background: #ecf0f1; - } - .aside.aside_flux { - padding: 10px 0 0; - } - .aside:target { - width: 80%; - border-right: 1px solid #aaa; - overflow: auto; - } - .aside .toggle_aside { - position: absolute; - right: 10px; - display: inline-block; - width: 26px; - height: 26px; - margin: 0 10px 0 0; - border-radius: 3px; - text-align: center; - line-height: 24px; - background: #95a5a6; - } - .aside .toggle_aside:hover { - background: #7f8c8d; - } - .aside .categories { - margin: 30px 0; - } - - #nav_entries { - width: 100%; - } - - .nav_menu .btn { - margin: 5px 10px; - } - .nav_menu .stick { - margin: 0 10px; - } - .nav_menu .stick .btn { - margin: 5px 0; - } - .nav_menu .search { - display: inline-block; - max-width: 97%; - } - .nav_menu .search input { - max-width: 97%; - width: 90px; - } - .nav_menu .search input:focus { - width: 400px; - } - - #panel { - left: 5px; right: 5px; - } - - .day .date { - display: none; - } - .day .name { - height: 2.6em; - font-size: 1em; - text-shadow: none; - } - - .notification, - .actualizeProgress { - left: 10px; - right: 10px; - } -} - -/*** FALLBACK ***/ -.dropdown-menu:after { - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); -} - -@media print { - .header, - .aside, - .nav_menu, - .day, - .flux_header, - .flux_content .bottom, - .pagination { - display: none; - } - - html, body { - background: #fff; - color: #000; - font-family: Serif; - font-size: 12pt; - } - - #global, - .flux_content { - display: block !important; - } - - .flux_content .content { - width: 100% !important; - text-align: justify; - } - - .flux_content .content a { - color: #000; - } - .flux_content .content a:after { - content: " (" attr(href) ") "; - text-decoration: underline; - } -} diff --git a/p/themes/flat-design/global.css b/p/themes/flat-design/global.css deleted file mode 100644 index 5fd0a4dcf..000000000 --- a/p/themes/flat-design/global.css +++ /dev/null @@ -1,495 +0,0 @@ -@charset "UTF-8"; - -/* FONTS */ -@font-face { - font-family: "OpenSans"; - src: url("../fonts/openSans.woff") format("woff"); -} - - -* { - margin: 0; - padding: 0; -} -html, body { - height: 100%; - font-size: 95%; - font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif; -} - -/* LIENS */ -a { - color: #2980b9; - text-decoration: none; -} - a:hover { - text-decoration: underline; - } - -/* LISTES */ -ul, ol, dl { - margin: 10px 0 10px 30px; - line-height: 190%; -} - dd { - margin: 0 0 10px 30px; - } - -/* TITRES */ -h1, h2, h3 { - min-height: 40px; - margin: 15px 0 5px; - line-height: 40px; -} - -/* IMG */ -figure { - margin: 5px 0 10px; - text-align: center; -} - figcaption { - display: inline-block; - padding: 3px 20px; - color: #999; - font-style: italic; - border-bottom: 1px solid #ccc; - } -img { - height: auto; - max-width: 100%; - vertical-align: middle; -} - a img { - border: none; - } - -/* VIDEOS */ -iframe, embed, object, video { - max-width: 100%; -} - -/* FORMULAIRES */ -legend { - display: inline-block; - margin: 20px 0 5px; - padding: 5px 20px; - font-size: 150%; - clear: both; - background: #ecf0f1; - border-radius: 20px; -} -label { - display: block; - min-height: 25px; - padding: 5px 0; - font-size: 12px; - line-height: 25px; - cursor: pointer; - font-weight: bold; - color: #444; -} -input, select, textarea { - display: inline-block; - max-width: 100%; - min-height: 25px; - padding: 5px; - background: #FFF; - border: none; - border-bottom: 3px solid #ddd; - color: #666; - line-height: 25px; - vertical-align: middle; - border-radius: 5px; -} - option { - padding:0 .5em 0 .5em; - } - input[type="radio"], - input[type="checkbox"] { - width: 15px !important; - min-height: 15px !important; - } - input:focus, select:focus, textarea:focus { - color: #333; - border-color: #2980b9; - } - input:invalid, select:invalid { - border-color: red; - box-shadow: 0 0 2px 1px red; - } - -.form-group { - margin: 5px 0; - border: 1px solid transparent; -} - .form-group:after { - content: ""; - display: block; - clear: both; - } - .form-group:hover { - background: #fff; - border: 1px solid #eee; - border-radius: 3px; - } - .form-group.form-actions { - min-width: 250px; - margin: 20px 0; - padding: 5px 0; - background: #ecf0f1; - border-top: 3px solid #bdc3c7; - border-radius: 5px 5px 0 0; - } - .form-group.form-actions .btn { - margin: 0 10px; - } - .form-group .group-name { - display: block; - float: left; - width: 200px; - padding: 10px 0; - text-align: right; - } - .form-group .group-controls { - min-width: 250px; - min-height: 25px; - margin: 0 0 0 220px; - padding: 5px 0; - } - .form-group .group-controls label { - font-weight: normal; - font-size: 14px; - color: #000; - } - .form-group .group-controls .control { - display: block; - min-height: 30px; - padding: 5px 0; - line-height: 25px; - font-size: 14px; - } - -.stick { - display: inline-block; - white-space: nowrap; - font-size: 0px; - vertical-align: middle; -} - .stick .btn, - .stick input { - font-size: 14px; - border-radius: 0; - } - .stick .btn:first-child, - .stick input:first-child { - border-radius: 5px 0 0 5px; - } - .stick .btn:last-child, - .stick input:last-child, - .stick .btn + .dropdown > .btn { - border-radius: 0 5px 5px 0; - } - .stick .btn + .dropdown a { - font-size: 12px; - } - -.btn { - display: inline-block; - min-height: 38px; - min-width: 18px; - padding: 5px 10px; - background: #3498db; - border-radius: 5px; - border: none; - border-bottom: 3px solid #2980b9; - color: #fff; - line-height: 20px; - vertical-align: middle; - cursor: pointer; - overflow: hidden; -} - a.btn { - min-height: 25px; - line-height: 25px; - } - .btn.active, - .btn:active, - .btn:hover, - .dropdown-target:target ~ .btn.dropdown-toggle { - background: #2980b9; - text-decoration: none; - } - - .btn-important { - background: #e67e22; - color: #fff; - border-bottom: 3px solid #d35400; - } - .btn-important:active, - .btn-important:hover { - background: #d35400; - } - - .btn-attention { - background: #e74c3c; - color: #fff; - border-bottom: 3px solid #c0392b; - } - .btn-attention:hover, - .btn-attention:active { - background: #c0392b; - } - -/* NAVIGATION */ -.nav-list { - border-right: 1px solid #ecf0f1; -} -.nav-list .nav-header, -.nav-list .item { - display: block; - height: 35px; - line-height: 35px; - margin: 5px 0; -} - .nav-list .item:hover, - .nav-list .item.active { - background: #2980b9; - color: #fff; - } - .nav-list .item:hover a, - .nav-list .item.active a { - color: #fff; - } - .nav-list .disable { - color: #aaa; - background: #fafafa; - text-align: center; - } - .nav-list .item > * { - display: block; - padding: 0 10px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .nav-list a:hover { - text-decoration: none; - } - .nav-list .item.error a { - color: #BD362F; - } - .nav-list .item:hover.error a, - .nav-list .item.active.error a { - color: #fff; - background: #BD362F; - } - .nav-list .item.empty a { - color: #f39c12; - } - .nav-list .item:hover.empty a, - .nav-list .item.active.empty a { - color: #fff; - background: #f39c12; - } - - .nav-list .nav-header { - padding: 0 10px; - margin: 0; - color: #fff; - background: #34495e; - font-weight: bold; - } - .nav-list .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #ddd; - } - - .nav-list .nav-form { - padding: 3px; - text-align: center; - } - -.nav-head { - display: block; - margin: 0; - background: #34495e; - color: #fff; - text-align: right; -} - .nav-head a { - color: #fff; - } - .nav-head .item { - display: inline-block; - padding: 5px 10px; - } - -/* HORIZONTAL-LIST */ -.horizontal-list { - display: table; - table-layout: fixed; - margin: 0; - padding: 0; - width: 100%; -} - .horizontal-list .item { - display: table-cell; - vertical-align: middle; - } - -/* DROPDOWN */ -.dropdown { - position: relative; - display: inline-block; -} - .dropdown-target { - display: none; - } - - .dropdown-menu { - display: none; - min-width: 200px; - margin: 5px 0 0; - padding: 5px 0; - position: absolute; - right: 0px; - background: #fff; - border: 1px solid #95a5a6; - border-radius: 3px; - text-align: left; - } - .dropdown-menu:after { - content: ""; - position: absolute; - top: -6px; - right: 13px; - width: 10px; - height: 10px; - background: #fff; - border-top: 1px solid #95a5a6; - border-left: 1px solid #95a5a6; - z-index: -10; - transform: rotate(45deg); - } - .dropdown-header { - display: block; - padding: 0 5px; - color: #34495e; - font-weight: bold; - font-size: 14px; - line-height: 30px; - } - .dropdown-menu > .item { - display: block; - height: 30px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu > .item > a { - display: block; - padding: 0 25px; - line-height: 30px; - } - .dropdown-menu > .item:hover > a { - background: #2980b9; - color: #fff; - } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } - .dropdown-menu > .item:hover > a { - color: #fff; - text-decoration: none; - } - .dropdown-menu .input { - display: block; - height: 40px; - font-size: 90%; - line-height: 30px; - } - .dropdown-menu label { - font-weight: normal; - } - .dropdown-menu .input select, - .dropdown-menu .input input { - display: block; - height: 20px; - width: 95%; - margin: auto; - padding: 2px 5px; - border-radius: 3px; - } - .dropdown-menu .input select { - width: 70%; - height: auto; - } - .dropdown-menu .separator { - display: block; - height: 0; - margin: 5px 0; - border-bottom: 1px solid #95a5a6; - } - .dropdown-target:target ~ .dropdown-menu { - display: block; - z-index: 10; - } - .dropdown-close { - display: inline; - } - .dropdown-close a { - font-size: 0; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - display: block; - z-index: -10; - } - -/* ALERTS */ -.alert { - display: block; - width: 90%; - margin: 15px auto; - padding: 10px 15px; - background: #f4f4f4; - border: 1px solid #ccc; - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; - border-radius: 5px; - color: #aaa; - text-shadow: 0 0 1px #eee; -} - .alert-head { - margin: 0; - font-weight: bold; - font-size: 110%; - } - .alert-warn { - background: #ffe; - border: 1px solid #eeb; - color: #c95; - } - .alert-success { - background: #dfd; - border: 1px solid #cec; - color: #484; - } - .alert-error { - background: #fdd; - border: 1px solid #ecc; - color: #844; - } - -/* ICÔNES */ -.icon { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - line-height: 16px; -} diff --git a/p/themes/flat-design/icons/add.svg b/p/themes/flat-design/icons/add.svg deleted file mode 100644 index 15767a3ad..000000000 --- a/p/themes/flat-design/icons/add.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/all.svg b/p/themes/flat-design/icons/all.svg deleted file mode 100644 index d20e0f5bf..000000000 --- a/p/themes/flat-design/icons/all.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/close.svg b/p/themes/flat-design/icons/close.svg deleted file mode 100644 index 629fda7ff..000000000 --- a/p/themes/flat-design/icons/close.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Gnome Symbolic Icon Theme - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/configure.svg b/p/themes/flat-design/icons/configure.svg deleted file mode 100644 index 969c5719f..000000000 --- a/p/themes/flat-design/icons/configure.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/down.svg b/p/themes/flat-design/icons/down.svg deleted file mode 100644 index 31730626f..000000000 --- a/p/themes/flat-design/icons/down.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/next.svg b/p/themes/flat-design/icons/next.svg deleted file mode 100644 index d75cc40f5..000000000 --- a/p/themes/flat-design/icons/next.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/prev.svg b/p/themes/flat-design/icons/prev.svg deleted file mode 100644 index 9ba03ceb2..000000000 --- a/p/themes/flat-design/icons/prev.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/refresh.svg b/p/themes/flat-design/icons/refresh.svg deleted file mode 100644 index 8f95bf443..000000000 --- a/p/themes/flat-design/icons/refresh.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/search.svg b/p/themes/flat-design/icons/search.svg deleted file mode 100644 index bca7571b4..000000000 --- a/p/themes/flat-design/icons/search.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/icons/up.svg b/p/themes/flat-design/icons/up.svg deleted file mode 100644 index 3ab11b168..000000000 --- a/p/themes/flat-design/icons/up.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - diff --git a/p/themes/flat-design/loader.gif b/p/themes/flat-design/loader.gif deleted file mode 100644 index ce36565b3..000000000 Binary files a/p/themes/flat-design/loader.gif and /dev/null differ diff --git a/p/themes/flat-design/metadata.json b/p/themes/flat-design/metadata.json deleted file mode 100644 index 6b94d11c2..000000000 --- a/p/themes/flat-design/metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Flat design", - "author": "Marien Fressinaud", - "description": "Thème plat pour FreshRSS", - "version": 0.1, - "files": ["global.css", "freshrss.css"] -} \ No newline at end of file -- cgit v1.2.3 From 693cd17cb8b26687fe46788033db49654310405a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 13 Jan 2014 22:54:50 +0100 Subject: Quand Persona n'est pas utilisé, évite de communiquer current_user_mail en JS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG | 1 + app/views/helpers/javascript_vars.phtml | 90 +++++++++++++++++---------------- 2 files changed, 47 insertions(+), 44 deletions(-) (limited to 'app') diff --git a/CHANGELOG b/CHANGELOG index 5c9b56465..9a0ae1f61 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -54,6 +54,7 @@ * Chargement différé JavaScript pour iframe * CSS : * Nouveau thème sombre + * Chargement plus robuste des thèmes * Meilleur support des longs titres d’articles sur des écrans étroits * Meilleure accessibilité * FreshRSS fonctionne aussi en mode dégradé sans images (alternatives Unicode) et/ou sans CSS diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index f4f36b4f3..3fd5580f4 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -1,45 +1,47 @@ conf->mark_when; - echo 'var ', - 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', - ',auto_mark_article=', $mark['article'] ? 'true' : 'false', - ',auto_mark_site=', $mark['site'] ? 'true' : 'false', - ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', - ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false', - ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false', - ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false'; - - $s = $this->conf->shortcuts; - echo ',shortcuts={', - 'mark_read:"', $s['mark_read'], '",', - 'mark_favorite:"', $s['mark_favorite'], '",', - 'go_website:"', $s['go_website'], '",', - 'prev_entry:"', $s['prev_entry'], '",', - 'next_entry:"', $s['next_entry'], '",', - 'collapse_entry:"', $s['collapse_entry'], '",', - 'load_more:"', $s['load_more'], '",', - 'auto_share:"', $s['auto_share'], '"', - "},\n"; - - if (Minz_Request::param ('output') === 'global') { - echo "iconClose='", FreshRSS_Themes::icon('close'), "',\n"; - } - - $mail = Minz_Session::param ('mail', 'null'); - if ($mail != 'null') { - $mail = '"' . $mail . '"'; - } - echo 'authType="', Minz_Configuration::authType(), '",', - 'url_freshrss="', _url ('index', 'index'), '",', - 'url_login="', _url ('index', 'login'), '",', - 'url_logout="', _url ('index', 'logout'), '",', - 'current_user_mail=', $mail, ",\n"; - - echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n"; - - $autoActualise = Minz_Session::param('actualize_feeds', false); - echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n"; - if ($autoActualise) { - Minz_Session::_param('actualize_feeds', false); - } + +echo '"use strict";', "\n"; + +$mark = $this->conf->mark_when; +echo 'var ', + 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', + ',auto_mark_article=', $mark['article'] ? 'true' : 'false', + ',auto_mark_site=', $mark['site'] ? 'true' : 'false', + ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', + ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false', + ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false', + ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false'; + +$s = $this->conf->shortcuts; +echo ',shortcuts={', + 'mark_read:"', $s['mark_read'], '",', + 'mark_favorite:"', $s['mark_favorite'], '",', + 'go_website:"', $s['go_website'], '",', + 'prev_entry:"', $s['prev_entry'], '",', + 'next_entry:"', $s['next_entry'], '",', + 'collapse_entry:"', $s['collapse_entry'], '",', + 'load_more:"', $s['load_more'], '",', + 'auto_share:"', $s['auto_share'], '"', +"},\n"; + +if (Minz_Request::param ('output') === 'global') { + echo "iconClose='", FreshRSS_Themes::icon('close'), "',\n"; +} + +$authType = Minz_Configuration::authType(); +if ($authType === 'persona') { + echo 'current_user_mail="' . Minz_Session::param ('mail', '') . '",'; +} + +echo 'authType="', $authType, '",', + 'url_freshrss="', _url ('index', 'index'), '",', + 'url_login="', _url ('index', 'login'), '",', + 'url_logout="', _url ('index', 'logout'), '",'; + +echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n"; + +$autoActualise = Minz_Session::param('actualize_feeds', false); +echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n"; +if ($autoActualise) { + Minz_Session::_param('actualize_feeds', false); +} -- cgit v1.2.3 From fd26178d7ca8ef3258d15ca95d43af143b4cd440 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 13 Jan 2014 23:31:07 +0100 Subject: Lien pour ajouter des flux quand FreshRSS est vide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/marienfressinaud/FreshRSS/issues/355 + Correction bug cache thèmes du précédant patch --- app/FreshRSS.php | 2 +- app/i18n/en.php | 4 ++-- app/i18n/fr.php | 4 ++-- app/views/helpers/view/normal_view.phtml | 3 ++- app/views/helpers/view/reader_view.phtml | 3 ++- p/themes/Dark/global.css | 4 ++++ p/themes/Flat/global.css | 4 ++++ p/themes/Origine/global.css | 4 ++++ 8 files changed, 21 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 52f34c6e2..40e1d23db 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -117,7 +117,7 @@ class FreshRSS extends Minz_FrontController { $theme = FreshRSS_Themes::load($this->conf->theme); if ($theme) { foreach($theme['files'] as $file) { - Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['id'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file))); + Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['id'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['id'] . '/' . $file))); } } diff --git a/app/i18n/en.php b/app/i18n/en.php index 71ca9538f..c90563036 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -157,7 +157,7 @@ return array ( 'not_yet_implemented' => 'Not yet implemented', 'access_protected_feeds' => 'Connection allows to access HTTP protected RSS feeds', 'no_selected_feed' => 'No feed selected.', - 'think_to_add' => 'Think to add RSS feeds!', + 'think_to_add' => 'Remember to add some RSS feeds!', 'current_user' => 'Current user', 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', @@ -242,7 +242,7 @@ return array ( 'before_yesterday' => 'Before yesterday', 'by_author' => 'By %s', 'related_tags' => 'Related tags', - 'no_feed_to_display' => 'No feed to show.', + 'no_feed_to_display' => 'There is no feed to show yet.', 'about_freshrss' => 'About FreshRSS', 'project_website' => 'Project website', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 8ffc5ec88..37f847f4d 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -157,7 +157,7 @@ return array ( 'not_yet_implemented' => 'Pas encore implémenté', 'access_protected_feeds' => 'La connexion permet d’accéder aux flux protégés par une authentification HTTP', 'no_selected_feed' => 'Aucun flux sélectionné.', - 'think_to_add' => 'Pensez à en ajouter !', + 'think_to_add' => 'Pensez à en ajouter !', 'current_user' => 'Utilisateur actuel', 'password' =>'Mot de passe
    (pour connexion par formulaire)', @@ -242,7 +242,7 @@ return array ( 'before_yesterday' => 'À partir d’avant-hier', 'by_author' => 'Par %s', 'related_tags' => 'Tags associés', - 'no_feed_to_display' => 'Il n’y a aucun flux à afficher.', + 'no_feed_to_display' => 'Il n’y a aucun flux à afficher pour l’instant.', 'about_freshrss' => 'À propos de FreshRSS', 'project_website' => 'Site du projet', diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 7e4457ecc..40c840e5d 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -217,5 +217,6 @@ if (!empty($this->entries)) {
    +
    - \ No newline at end of file + diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml index 55d7bb99e..bda96e86d 100644 --- a/app/views/helpers/view/reader_view.phtml +++ b/app/views/helpers/view/reader_view.phtml @@ -44,5 +44,6 @@ if (!empty($this->entries)) {
    +
    - \ No newline at end of file + diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css index 04eb723f1..c76e3b1ba 100644 --- a/p/themes/Dark/global.css +++ b/p/themes/Dark/global.css @@ -464,6 +464,10 @@ input, select, textarea { font-weight: bold; font-size: 110%; } + .alert > a { + color: inherit; + text-decoration: underline; + } .alert-warn { border: 1px solid #c95; color: #c95; diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css index 5fd0a4dcf..df9c9f8c9 100644 --- a/p/themes/Flat/global.css +++ b/p/themes/Flat/global.css @@ -469,6 +469,10 @@ input, select, textarea { font-weight: bold; font-size: 110%; } + .alert > a { + color: inherit; + text-decoration: underline; + } .alert-warn { background: #ffe; border: 1px solid #eeb; diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css index 49f3aa4cd..23e190330 100644 --- a/p/themes/Origine/global.css +++ b/p/themes/Origine/global.css @@ -477,6 +477,10 @@ input, select, textarea { font-weight: bold; font-size: 110%; } + .alert > a { + color: inherit; + text-decoration: underline; + } .alert-warn { background: #ffe; border: 1px solid #eeb; -- cgit v1.2.3 From 7261a551e908229ea4625b6645d490712570e71c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 17 Jan 2014 22:47:21 +0100 Subject: Essaye d'éviter les problèmes d'auto-remplissage des champs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/327#issuecomment-32635516 --- app/Controllers/feedController.php | 4 ++-- app/layout/aside_feed.phtml | 6 +++--- app/views/configure/feed.phtml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 2d7c0ab43..d2117f665 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -30,8 +30,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $cat = $def_cat->id (); } - $user = Minz_Request::param ('username'); - $pass = Minz_Request::param ('password'); + $user = Minz_Request::param ('http_user'); + $pass = Minz_Request::param ('http_pass'); $params = array (); $transactionStarted = false; diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 7fbccce1e..2446e72cb 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -1,7 +1,7 @@
    diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml index a0fe39f8a..fc26ab58b 100644 --- a/app/views/configure/feed.phtml +++ b/app/views/configure/feed.phtml @@ -11,7 +11,7 @@

    - +
    -- cgit v1.2.3 From 781d8a717f315525807bfd702cb740248b6087ea Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 00:17:03 +0100 Subject: Choix du type de connexion dans l'installeur + diverses corrections dans l'installeur Adresse une partie de https://github.com/marienfressinaud/FreshRSS/issues/355 --- app/i18n/en.php | 5 +-- app/i18n/fr.php | 5 +-- app/i18n/install.en.php | 2 -- app/i18n/install.fr.php | 2 -- app/views/configure/users.phtml | 4 +-- p/i/install.php | 75 ++++++++++++++++++++++++++++++++--------- 6 files changed, 68 insertions(+), 25 deletions(-) (limited to 'app') diff --git a/app/i18n/en.php b/app/i18n/en.php index c90563036..6dc7a4acf 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -160,8 +160,8 @@ return array ( 'think_to_add' => 'Remember to add some RSS feeds!', 'current_user' => 'Current user', - 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', - 'password' =>'Password
    (for the Web-form login method)', + 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', + 'password_form' =>'Password
    (for the Web-form login method)', 'persona_connection_email' => 'Login mail address
    (for Mozilla Persona)', 'allow_anonymous' => 'Allow anonymous reading for the default user (%s)', 'auth_token' => 'Authentication token', @@ -176,6 +176,7 @@ return array ( 'users_list' => 'List of users', 'create_user' => 'Create new user', 'username' => 'Username', + 'password' => 'Password', 'create' => 'Create', 'user_created' => 'User %s has been created', 'user_deleted' => 'User %s has been deleted', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 37f847f4d..16d93a59a 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -160,8 +160,8 @@ return array ( 'think_to_add' => 'Pensez à en ajouter !', 'current_user' => 'Utilisateur actuel', - 'password' =>'Mot de passe
    (pour connexion par formulaire)', - 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', + 'password_form' =>'Mot de passe
    (pour connexion par formulaire)', + 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', 'persona_connection_email' => 'Adresse courriel de connexion
    (pour Mozilla Persona)', 'allow_anonymous' => 'Autoriser la lecture anonyme pour l’utilisateur par défaut (%s)', 'auth_token' => 'Jeton d’identification', @@ -176,6 +176,7 @@ return array ( 'users_list' => 'Liste des utilisateurs', 'create_user' => 'Créer un nouvel utilisateur', 'username' => 'Nom d’utilisateur', + 'password' => 'Mot de passe', 'create' => 'Créer', 'user_created' => 'L’utilisateur %s a été créé', 'user_deleted' => 'L’utilisateur %s a été supprimé', diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php index 24335c6c9..1c24c7d7e 100644 --- a/app/i18n/install.en.php +++ b/app/i18n/install.en.php @@ -53,8 +53,6 @@ return array ( 'bdd_conf_is_ok' => 'Database configuration has been saved.', 'bdd_conf_is_ko' => 'Verify your database information.', 'host' => 'Host', - 'username' => 'Username', - 'password' => 'Password', 'bdd' => 'Database', 'prefix' => 'Table prefix', diff --git a/app/i18n/install.fr.php b/app/i18n/install.fr.php index 554d17587..68927df6d 100644 --- a/app/i18n/install.fr.php +++ b/app/i18n/install.fr.php @@ -53,8 +53,6 @@ return array ( 'bdd_conf_is_ok' => 'La configuration de la base de données a été enregistrée.', 'bdd_conf_is_ko' => 'Vérifiez les informations d’accès à la base de données.', 'host' => 'Hôte', - 'username' => 'Nom utilisateur', - 'password' => 'Mot de passe', 'bdd' => 'Base de données', 'prefix' => 'Préfixe des tables', diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 0419df747..602dfaf62 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -18,7 +18,7 @@
    - +
    @@ -140,7 +140,7 @@
    - +
    diff --git a/p/i/install.php b/p/i/install.php index 08ed9ccb9..294231fc0 100644 --- a/p/i/install.php +++ b/p/i/install.php @@ -1,5 +1,11 @@ BCRYPT_COST)); + $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js + $_SESSION['passwordHash'] = $passwordHash; + } $token = ''; if ($_SESSION['mail_login']) { @@ -169,8 +182,10 @@ function saveStep2 () { $config_array = array ( 'language' => $_SESSION['language'], + 'theme' => $_SESSION['theme'], 'old_entries' => $_SESSION['old_entries'], 'mail_login' => $_SESSION['mail_login'], + 'passwordHash' => $_SESSION['passwordHash'], 'token' => $token, ); @@ -214,7 +229,7 @@ function saveStep3 () { 'title' => $_SESSION['title'], 'default_user' => $_SESSION['default_user'], 'auth_type' => $_SESSION['auth_type'], - 'allow_anonymous' => $_SESSION['allow_anonymous'], + 'allow_anonymous' => isset($_SESSION['allow_anonymous']) ? $_SESSION['allow_anonymous'] : false, ), 'db' => array( 'type' => $_SESSION['bd_type'], @@ -466,21 +481,11 @@ function checkStep0 () { } else { $userConfig = array(); } - if (isset($userConfig['theme'])) { - switch (strtolower($userConfig['theme'])) { - case 'default': //v0.6 - $userConfig['theme'] = 'Origine'; - break; - case 'flat-design': //v0.6 - $userConfig['theme'] = 'Flat'; - break; - case 'default_dark': //v0.6 - $userConfig['theme'] = 'Dark'; - break; - } + if (empty($_SESSION['auth_type'])) { //v0.7b + $_SESSION['auth_type'] = ''; } - $keys = array('language', 'old_entries', 'mail_login'); + $keys = array('language', 'theme', 'old_entries', 'mail_login', 'passwordHash'); foreach ($keys as $key) { if ((!isset($_SESSION[$key])) && isset($userConfig[$key])) { $_SESSION[$key] = $userConfig[$key]; @@ -491,6 +496,25 @@ function checkStep0 () { $language = isset ($_SESSION['language']) && isset ($languages[$_SESSION['language']]); + if (empty($_SESSION['passwordHash'])) { //v0.7b + $_SESSION['passwordHash'] = ''; + } + if (empty($_SESSION['theme'])) { + $_SESSION['theme'] = 'Origine'; + } else { + switch (strtolower($_SESSION['theme'])) { + case 'default': //v0.7b + $_SESSION['theme'] = 'Origine'; + break; + case 'flat-design': //v0.7b + $_SESSION['theme'] = 'Flat'; + break; + case 'default_dark': //v0.7b + $_SESSION['theme'] = 'Dark'; + break; + } + } + return array ( 'language' => $language ? 'ok' : 'ko', 'all' => $language ? 'ok' : 'ko' @@ -777,10 +801,31 @@ function printStep2 () {
    +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    +
    - +
    -- cgit v1.2.3 From fb908d45577cd0f156104eb23b4b9859d40b6da2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 00:34:46 +0100 Subject: Corrige rafraîchissement automatique après mise-à-jour avec Persona ou formulaire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/327#issuecomment-31958851 --- app/Controllers/feedController.php | 1 + app/views/helpers/javascript_vars.phtml | 3 --- p/i/install.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index d2117f665..c40b3c400 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -164,6 +164,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feedDAO = new FreshRSS_FeedDAO (); $entryDAO = new FreshRSS_EntryDAO (); + Minz_Session::_param('actualize_feeds', false); $id = Minz_Request::param ('id'); $force = Minz_Request::param ('force', false); diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 3fd5580f4..0ecdc1bca 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -42,6 +42,3 @@ echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n"; $autoActualise = Minz_Session::param('actualize_feeds', false); echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n"; -if ($autoActualise) { - Minz_Session::_param('actualize_feeds', false); -} diff --git a/p/i/install.php b/p/i/install.php index 294231fc0..18dfc1449 100644 --- a/p/i/install.php +++ b/p/i/install.php @@ -817,7 +817,7 @@ function printStep2 () {
    - +
    -- cgit v1.2.3 From 41033768c3eacbd564c3ec15455587e4f725a055 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 01:00:17 +0100 Subject: Mode anonyme pour connexion avec formulaire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/361 --- app/Controllers/usersController.php | 2 +- app/views/configure/users.phtml | 18 ++++-------------- lib/Minz/Configuration.php | 9 +++++---- 3 files changed, 10 insertions(+), 19 deletions(-) (limited to 'app') diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index 7e44b3d35..a044cd25b 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -57,8 +57,8 @@ class FreshRSS_users_Controller extends Minz_ActionController { $auth_type = Minz_Request::param('auth_type', 'none'); if ($anon != Minz_Configuration::allowAnonymous() || $auth_type != Minz_Configuration::authType()) { - Minz_Configuration::_allowAnonymous($anon); Minz_Configuration::_authType($auth_type); + Minz_Configuration::_allowAnonymous($anon); $ok &= Minz_Configuration::writeFile(); } } diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 602dfaf62..3f352f9bf 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -58,20 +58,11 @@
    -
    -
    - - -
    -
    - - - - Mozilla Persona
    @@ -81,7 +72,8 @@ conf->token; ?>
    - + />
    @@ -92,8 +84,6 @@ - -
    diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 433992e0d..72e2cedc0 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -113,7 +113,7 @@ class Minz_Configuration { } public static function _allowAnonymous($allow = false) { - self::$allow_anonymous = (bool)$allow; + self::$allow_anonymous = ((bool)$allow) && self::canLogIn(); } public static function _authType($value) { $value = strtolower($value); @@ -125,6 +125,7 @@ class Minz_Configuration { self::$auth_type = $value; break; } + self::_allowAnonymous(self::$allow_anonymous); } /** @@ -252,12 +253,12 @@ class Minz_Configuration { if (isset ($general['default_user'])) { self::$default_user = $general['default_user']; } - if (isset ($general['allow_anonymous'])) { - self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no'); - } if (isset ($general['auth_type'])) { self::_authType($general['auth_type']); } + if (isset ($general['allow_anonymous'])) { + self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no'); + } // Base de données if (isset ($ini_array['db'])) { -- cgit v1.2.3 From dda7b002def51405bab82bd4a31fc3ad8c33c572 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 01:38:11 +0100 Subject: Corrections mode anonyme avec formulaire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/361 --- app/Controllers/indexController.php | 4 ++-- app/layout/header.phtml | 17 ++++++++++----- app/views/helpers/view/login.phtml | 43 ------------------------------------- app/views/index/formLogin.phtml | 43 +++++++++++++++++++++++++++++++++++++ app/views/index/index.phtml | 4 ++-- 5 files changed, 59 insertions(+), 52 deletions(-) delete mode 100644 app/views/helpers/view/login.phtml create mode 100644 app/views/index/formLogin.phtml (limited to 'app') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 772a08f30..d05a106bb 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -296,7 +296,6 @@ class FreshRSS_index_Controller extends Minz_ActionController { } public function formLoginAction () { - $this->view->_useLayout (false); if (Minz_Request::isPost()) { $ok = false; $nonce = Minz_Session::param('nonce'); @@ -327,9 +326,10 @@ class FreshRSS_index_Controller extends Minz_ActionController { ); Minz_Session::_param('notification', $notif); } + $this->view->_useLayout(false); + Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); } invalidateHttpCache(); - Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); } public function formLogoutAction () { diff --git a/app/layout/header.phtml b/app/layout/header.phtml index e90da6196..d43f682b0 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -90,9 +90,16 @@ if (Minz_Configuration::canLogIn()) { - -
    - -
    - +
    diff --git a/app/views/helpers/view/login.phtml b/app/views/helpers/view/login.phtml deleted file mode 100644 index e4a24f9ed..000000000 --- a/app/views/helpers/view/login.phtml +++ /dev/null @@ -1,43 +0,0 @@ -
    - -

    -
    - -
    - -
    -
    -
    - -
    - - - -
    -
    -
    -
    - -
    -
    -

    FreshRSS

    -

    - -

    -
    diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml new file mode 100644 index 000000000..e4a24f9ed --- /dev/null +++ b/app/views/index/formLogin.phtml @@ -0,0 +1,43 @@ +
    + +

    +
    + +
    + +
    +
    +
    + +
    + + + +
    +
    +
    +
    + +
    +
    +

    FreshRSS

    +

    + +

    +
    diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 9b69233e9..9a7c9f3b9 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -21,8 +21,8 @@ if ($this->loginOk || Minz_Configuration::allowAnonymous()) { if ($token_is_ok) { $this->renderHelper ('view/rss_view'); } else { - $this->renderHelper ('view/login'); + Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true); } } else { - $this->renderHelper ('view/login'); + Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true); } -- cgit v1.2.3 From 85ebb8d11603107364818d582edaff2437db82f5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 01:51:49 +0100 Subject: i18n lecture anonyme https://github.com/marienfressinaud/FreshRSS/issues/361 --- app/i18n/en.php | 2 +- app/i18n/fr.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/i18n/en.php b/app/i18n/en.php index 6dc7a4acf..1b76dfc52 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -163,7 +163,7 @@ return array ( 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', 'password_form' =>'Password
    (for the Web-form login method)', 'persona_connection_email' => 'Login mail address
    (for Mozilla Persona)', - 'allow_anonymous' => 'Allow anonymous reading for the default user (%s)', + 'allow_anonymous' => 'Allow anonymous reading of the articles of the default user (%s)', 'auth_token' => 'Authentication token', 'explain_token' => 'Allows to access RSS output of the default user without authentication.
    %s?token=%s', 'login_configuration' => 'Login', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 16d93a59a..5d54dc2dd 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -163,7 +163,7 @@ return array ( 'password_form' =>'Mot de passe
    (pour connexion par formulaire)', 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', 'persona_connection_email' => 'Adresse courriel de connexion
    (pour Mozilla Persona)', - 'allow_anonymous' => 'Autoriser la lecture anonyme pour l’utilisateur par défaut (%s)', + 'allow_anonymous' => 'Autoriser la lecture anonyme des articles de l’utilisateur par défaut (%s)', 'auth_token' => 'Jeton d’identification', 'explain_token' => 'Permet d’accéder à la sortie RSS de l’utilisateur par défaut sans besoin de s’authentifier.
    %s?output=rss&token=%s', 'login_configuration' => 'Identification', -- cgit v1.2.3 From 69f7bce75b6f45b7f8be376a5d9c14d5da62c91d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 16:41:10 +0100 Subject: Changements de vues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction d'un bug JavaScript récent dans la vue globale. Corrections de nombreux bugs lors des changements de vue https://github.com/marienfressinaud/FreshRSS/issues/346 et amélioration des performances pour la génération des URL en évitant beaucoup d'appels de fonctions https://github.com/marienfressinaud/FreshRSS/pull/362 De plus, dans les URL, is_favorite et is_read ont maintenant une valeur par défaut de 1, ce qui évite de les écrire dans beaucoup de cas. Suppression des espaces blancs de la sortie HTML au niveau de quelques boucles critiques. --- app/Controllers/entryController.php | 13 ++-- app/i18n/en.php | 2 +- app/i18n/fr.php | 2 +- app/layout/aside_flux.phtml | 73 +++++++++--------- app/layout/nav_menu.phtml | 8 +- app/views/entry/bookmark.phtml | 2 +- app/views/entry/read.phtml | 2 +- app/views/helpers/view/normal_view.phtml | 122 +++++++++++++++++-------------- p/scripts/global_view.js | 7 +- 9 files changed, 131 insertions(+), 100 deletions(-) (limited to 'app') diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index a24dfe6d6..ded7598d9 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -10,6 +10,11 @@ class FreshRSS_entry_Controller extends Minz_ActionController { } $this->params = array (); + $output = Minz_Request::param('output', ''); + if (($output != '') && ($this->conf->view_mode !== $output)) { + $this->params['output'] = $output; + } + $this->redirect = false; $ajax = Minz_Request::param ('ajax'); if ($ajax) { @@ -34,13 +39,10 @@ class FreshRSS_entry_Controller extends Minz_ActionController { $this->redirect = true; $id = Minz_Request::param ('id'); - $is_read = Minz_Request::param ('is_read'); $get = Minz_Request::param ('get'); $nextGet = Minz_Request::param ('nextGet', $get); $idMax = Minz_Request::param ('idMax', 0); - $is_read = (bool)$is_read; - $entryDAO = new FreshRSS_EntryDAO (); if ($id == false) { if (!$get) { @@ -63,7 +65,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { break; } if ($nextGet !== 'a') { - $this->params = array ('get' => $nextGet); + $this->params['get'] = $nextGet; } } @@ -73,6 +75,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { ); Minz_Session::_param ('notification', $notif); } else { + $is_read = (bool)(Minz_Request::param ('is_read', true)); $entryDAO->markRead ($id, $is_read); } } @@ -83,7 +86,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { $id = Minz_Request::param ('id'); if ($id) { $entryDAO = new FreshRSS_EntryDAO (); - $entryDAO->markFavorite ($id, Minz_Request::param ('is_favorite')); + $entryDAO->markFavorite ($id, (bool)(Minz_Request::param ('is_favorite', true))); } } diff --git a/app/i18n/en.php b/app/i18n/en.php index 1b76dfc52..01d86e5da 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -161,7 +161,7 @@ return array ( 'current_user' => 'Current user', 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', - 'password_form' =>'Password
    (for the Web-form login method)', + 'password_form' => 'Password
    (for the Web-form login method)', 'persona_connection_email' => 'Login mail address
    (for Mozilla Persona)', 'allow_anonymous' => 'Allow anonymous reading of the articles of the default user (%s)', 'auth_token' => 'Authentication token', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 5d54dc2dd..2c44aa8d0 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -160,7 +160,7 @@ return array ( 'think_to_add' => 'Pensez à en ajouter !', 'current_user' => 'Utilisateur actuel', - 'password_form' =>'Mot de passe
    (pour connexion par formulaire)', + 'password_form' => 'Mot de passe
    (pour connexion par formulaire)', 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', 'persona_connection_email' => 'Adresse courriel de connexion
    (pour Mozilla Persona)', 'allow_anonymous' => 'Autoriser la lecture anonyme des articles de l’utilisateur par défaut (%s)', diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index f2f85df30..f7d8b12b9 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -13,15 +13,15 @@
  • - 'index', 'a' => 'index', 'params' => array()); if ($this->conf->view_mode !== Minz_Request::param('output', 'normal')) { - $output = array('output', 'normal'); + $arUrl['params']['output'] = 'normal'; } ?>
  • - + @@ -30,43 +30,46 @@
  • - cat_aside as $cat) { ?> - feeds (); ?> - -
  • - get_c == $cat->id ()) { $c_active = true; } ?> -
    - name (); ?> - -
    - -
      - id (); $nbEntries = $feed->nbEntries (); - $f_active = ($this->get_f == $feed_id); - ?> -
    • - - ✇ - name(); ?> -
    • - -
    -
  • - + cat_aside as $cat) { + $feeds = $cat->feeds (); + if (!empty ($feeds)) { + ?>
  • get_c == $cat->id ()) { + $c_active = true; + } + ?>
      id (); + $nbEntries = $feed->nbEntries (); + $f_active = ($this->get_f == $feed_id); + ?>
    • ✇ name(); ?>
  • - @@ -79,7 +82,7 @@
  • -
  • +
  • diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 705ed3314..b9ce33295 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -56,7 +56,13 @@ } $p = isset($this->entries[0]) ? $this->entries[0] : null; $idMax = $p === null ? '0' : $p->id(); - $markReadUrl = _url ('entry', 'read', 'is_read', 1, 'get', $get, 'nextGet', $nextGet, 'idMax', $idMax); + + $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax)); + $output = Minz_Request::param('output', ''); + if (($output != '') && ($this->conf->view_mode !== $output)) { + $arUrl['params']['output'] = $output; + } + $markReadUrl = Minz_Url::display($arUrl); Minz_Session::_param ('markReadUrl', $markReadUrl); ?> diff --git a/app/views/entry/bookmark.phtml b/app/views/entry/bookmark.phtml index 55b2d3d3d..c1fc32b7f 100755 --- a/app/views/entry/bookmark.phtml +++ b/app/views/entry/bookmark.phtml @@ -1,7 +1,7 @@ entries)) { $bottomline_link = $this->conf->bottomline_link; ?> -
    - entries as $item) { ?> +
    entries as $item) { + if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) { + ?>
    currentName; ?>
    isDay (FreshRSS_Days::YESTERDAY, $this->today)) { + ?>
    currentName; ?>
    isDay (FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) { + ?>
    currentName; ?>
    isDay (FreshRSS_Days::TODAY, $this->today)) { ?> -
    - - - currentName; ?> -
    - - isDay (FreshRSS_Days::YESTERDAY, $this->today)) { ?> -
    - - - currentName; ?> -
    - - isDay (FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) { ?> -
    - - currentName; ?> -
    - - -
    diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js index 0cdcdd3fa..c34fbf1a7 100644 --- a/p/scripts/global_view.js +++ b/p/scripts/global_view.js @@ -50,11 +50,14 @@ function init_global_view() { $(".nav_menu #nav_menu_read_all, .nav_menu .toggle_aside").remove(); - init_stream_delegates($("#panel")); + init_stream($("#panel")); } function init_all_global_view() { - if (!(window.$ && window.init_stream_delegates)) { + if (!(window.$ && window.init_stream)) { + if (window.console) { + console.log('FreshRSS Global view waiting for JS…'); + } window.setTimeout(init_all_global_view, 50); //Wait for all js to be loaded return; } -- cgit v1.2.3 From fdd179d344dbe8734480b83bb7a0fba189275d5a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 19:29:44 +0100 Subject: Corrections vue globale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/353 --- app/Controllers/entryController.php | 2 +- app/Controllers/indexController.php | 6 ++---- app/views/helpers/view/global_view.phtml | 16 ++++++++++------ lib/Minz/View.php | 6 +++--- p/scripts/global_view.js | 10 ++++++++++ p/scripts/main.js | 8 +++++--- 6 files changed, 31 insertions(+), 17 deletions(-) (limited to 'app') diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index ded7598d9..1756c91e5 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -11,7 +11,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { $this->params = array (); $output = Minz_Request::param('output', ''); - if (($output != '') && ($this->conf->view_mode !== $output)) { + if (($output != '') && ($this->view->conf->view_mode !== $output)) { $this->params['output'] = $output; } diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index d05a106bb..45ded6fd4 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -46,10 +46,8 @@ class FreshRSS_index_Controller extends Minz_ActionController { // no layout for RSS output $this->view->_useLayout (false); header('Content-Type: application/rss+xml; charset=utf-8'); - } else { - if ($output === 'global') { - Minz_View::appendScript (Minz_Url::display ('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js'))); - } + } elseif ($output === 'global') { + Minz_View::appendScript (Minz_Url::display ('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js'))); } $this->view->cat_aside = $this->catDAO->listCategories (); diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml index ca7b66e0c..4fb807649 100644 --- a/app/views/helpers/view/global_view.phtml +++ b/app/views/helpers/view/global_view.phtml @@ -2,18 +2,22 @@
    'index', 'a' => 'index', 'params' => array()); + if ($this->conf->view_mode !== 'normal') { + $arUrl['params']['output'] = 'normal'; } + $p = Minz_Request::param('state', ''); + if (($p != '') && ($this->conf->default_view !== $p)) { + $arUrl['params']['state'] = $p; + } + foreach ($this->cat_aside as $cat) { $feeds = $cat->feeds (); if (!empty ($feeds)) { ?>
    @@ -22,7 +26,7 @@ nbNotRead (); ?>
  • ✇ - + name(); ?>
  • diff --git a/lib/Minz/View.php b/lib/Minz/View.php index ba9555cd7..e170bd406 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -63,7 +63,7 @@ class Minz_View { * Affiche la Vue en elle-même */ public function render () { - if ((@include($this->view_filename)) === false) { + if ((include($this->view_filename)) === false) { Minz_Log::record ('File not found: `' . $this->view_filename . '`', Minz_Log::NOTICE); @@ -79,7 +79,7 @@ class Minz_View { . self::LAYOUT_PATH_NAME . '/' . $part . '.phtml'; - if ((@include($fic_partial)) === false) { + if ((include($fic_partial)) === false) { Minz_Log::record ('File not found: `' . $fic_partial . '`', Minz_Log::WARNING); @@ -95,7 +95,7 @@ class Minz_View { . '/views/helpers/' . $helper . '.phtml'; - if ((@include($fic_helper)) === false) {; + if ((include($fic_helper)) === false) {; Minz_Log::record ('File not found: `' . $fic_helper . '`', Minz_Log::WARNING); diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js index c34fbf1a7..3973cb2ec 100644 --- a/p/scripts/global_view.js +++ b/p/scripts/global_view.js @@ -24,6 +24,16 @@ function load_panel(link) { // en en ouvrant une autre ensuite, on se retrouve au même point de scroll $("#panel").scrollTop(0); + $('#nav_menu_read_all a, #bigMarkAsRead').click(function () { + $.ajax({ + url: $(this).attr("href"), + async: false + }); + //$("#panel .close").first().click(); + window.location.reload(false); + return false; + }); + panel_loading = false; }); } diff --git a/p/scripts/main.js b/p/scripts/main.js index 5bdc316db..3f6352baf 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -137,7 +137,9 @@ function mark_favorite(active) { if (active.closest('div').hasClass('not_read')) { var elem = $('#aside_flux .favorites').children(':first').get(0), feed_unreads = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unreads + inc)); + if (elem) { + elem.setAttribute('data-unread', Math.max(0, feed_unreads + inc)); + } } }); } @@ -559,6 +561,8 @@ function load_more_posts() { } function init_load_more(box) { + box_load_more = box; + var $next_link = $("#load_more"); if (!$next_link.length) { // no more article to load @@ -566,8 +570,6 @@ function init_load_more(box) { return; } - box_load_more = box; - url_load_more = $next_link.attr("href"); var $prefetch = $('#prefetch'); if ($prefetch.attr('href') !== url_load_more) { -- cgit v1.2.3 From 5f0594c630028b8612b57da15bcdf00a932930bc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 21:26:33 +0100 Subject: Désactive l'identification par formulaire en dessous de PHP 5.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHP 5.3 est sorti en juin 2009. https://github.com/ircmaxell/password_compat Pour plus de tranquillité (compatibilité et sécurité), il faudrait même désactiver en dessous de PHP 5.3.7 (août 2011) --- CHANGELOG | 1 + README.md | 2 +- app/views/configure/users.phtml | 2 +- p/i/install.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/CHANGELOG b/CHANGELOG index 9a0ae1f61..f72bd8ff5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ * Nécessite un contrôle d’accès, soit : * par le nouveau mode de connexion par formulaire (nom d’utilisateur + mot de passe) * relativement sûr même sans HTTPS (le mot de passe n’est pas transmis en clair) + * requiert JavaScript et PHP 5.3+ * par HTTP (par exemple sous Apache en créant un fichier ./p/i/.htaccess et .htpasswd) * le nom d’utilisateur HTTP doit correspondre au nom d’utilisateur FreshRSS * par Mozilla Persona, en renseignant l’adresse courriel des utilisateurs diff --git a/README.md b/README.md index 4100a8638..abc40d489 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Privilégiez pour cela des demandes sur GitHub * Serveur modeste, par exemple sous Linux ou Windows * Fonctionne même sur un Raspberry Pi avec des temps de réponse < 1s (testé sur 150 flux, 22k articles, soit 32Mo de données partiellement compressées) * Serveur Web Apache2 ou Nginx (non testé sur les autres) -* PHP 5.2+ (PHP 5.3.4+ recommandé) +* PHP 5.2+ (PHP 5.3.7+ recommandé) * Requis : [PDO_MySQL](http://php.net/pdo-mysql), [cURL](http://php.net/curl), [LibXML](http://php.net/xml), [PCRE](http://php.net/pcre), [ctype](http://php.net/ctype) * Recommandés : [JSON](http://php.net/json), [zlib](http://php.net/zlib), [mbstring](http://php.net/mbstring), [iconv](http://php.net/iconv) * MySQL 5.0.3+ (ou SQLite 3.7.4+ à venir) diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 3f352f9bf..41129333c 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -50,7 +50,7 @@
    - + -- cgit v1.2.3 From 6f117abfb6010150f95d2d0830a9715cd6f270fc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Jan 2014 22:54:53 +0100 Subject: Bugs chargement des articles complets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/365 Ajoute le nettoyage correct du HTML par SimplePie, ainsi que le décodage des caractères HTML dans l'URL, et enfin un message dans le syslog pour chaque article téléchargé --- app/Models/Entry.php | 2 +- lib/lib_rss.php | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'app') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 83f68ce78..a6c67221b 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -159,7 +159,7 @@ class FreshRSS_Entry extends Minz_Model { try { // l'article n'est pas en BDD, on va le chercher sur le site $this->content = get_content_by_parsing( - $this->link(), $pathEntries + htmlspecialchars_decode($this->link(), ENT_QUOTES), $pathEntries ); } catch (Exception $e) { // rien à faire, on garde l'ancien contenu (requête a échoué) diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 4f98ed14a..33d7ebc32 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -110,6 +110,7 @@ function sanitizeHTML($data) { static $simplePie = null; if ($simplePie == null) { $simplePie = new SimplePie(); + $simplePie->init(); } return html_only_entity_decode($simplePie->sanitize->sanitize($data, SIMPLEPIE_CONSTRUCT_MAYBE_HTML)); } @@ -118,22 +119,13 @@ function sanitizeHTML($data) { function get_content_by_parsing ($url, $path) { require_once (LIB_PATH . '/lib_phpQuery.php'); + syslog(LOG_INFO, 'FreshRSS GET ' . $url); $html = file_get_contents ($url); if ($html) { $doc = phpQuery::newDocument ($html); $content = $doc->find ($path); - $content->find ('*')->removeAttr ('style') - ->removeAttr ('id') - ->removeAttr ('class') - ->removeAttr ('onload') - ->removeAttr ('target'); - $content->removeAttr ('style') - ->removeAttr ('id') - ->removeAttr ('class') - ->removeAttr ('onload') - ->removeAttr ('target'); - return $content->__toString (); + return sanitizeHTML($content->__toString()); } else { throw new Exception (); } -- cgit v1.2.3 From afbb608f1e380ce72e3836822b33c25554a15bf1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 19 Jan 2014 16:37:11 +0100 Subject: autofocus formLogin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémente https://github.com/marienfressinaud/FreshRSS/issues/327#issuecomment-32710864 --- app/views/index/formLogin.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml index e4a24f9ed..cc43bcd19 100644 --- a/app/views/index/formLogin.phtml +++ b/app/views/index/formLogin.phtml @@ -10,7 +10,7 @@ if (Minz_Configuration::canLogIn()) {
    - +
    -- cgit v1.2.3 From 8a011f00f9f5c4f508cbf6d307f68ea901108967 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 19 Jan 2014 20:30:08 +0100 Subject: Détails IE10, token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/configure/users.phtml | 2 ++ p/index.html | 3 +++ 2 files changed, 5 insertions(+) (limited to 'app') diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 41129333c..990c80acc 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -68,6 +68,7 @@
    +
    conf->token; ?> @@ -77,6 +78,7 @@
    +
    diff --git a/p/index.html b/p/index.html index 5adacab2c..260f437bd 100644 --- a/p/index.html +++ b/p/index.html @@ -22,6 +22,9 @@ h1 a { color: #0062BE; text-decoration: none; } +img { + border: 0; +} -- cgit v1.2.3 From cf1f9b0f79ef885e108b7704a8f31732c5506654 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 19 Jan 2014 20:38:13 +0100 Subject: i18n token anglais --- app/i18n/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/i18n/en.php b/app/i18n/en.php index 01d86e5da..bb983d397 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -165,7 +165,7 @@ return array ( 'persona_connection_email' => 'Login mail address
    (for Mozilla Persona)', 'allow_anonymous' => 'Allow anonymous reading of the articles of the default user (%s)', 'auth_token' => 'Authentication token', - 'explain_token' => 'Allows to access RSS output of the default user without authentication.
    %s?token=%s', + 'explain_token' => 'Allows to access RSS output of the default user without authentication.
    %s?output=rss&token=%s', 'login_configuration' => 'Login', 'is_admin' => 'is administrator', 'auth_type' => 'Authentication method', -- cgit v1.2.3