diff --git a/assets/css/app.css b/assets/css/app.css index 09c2b80..d6eb1fd 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -430,7 +430,7 @@ nav .active a { } .item-menu, -.items p { +.items .preview { color: #aaa; font-size: 70%; } diff --git a/controllers/bookmark.php b/controllers/bookmark.php index 9e178e4..6e798c1 100644 --- a/controllers/bookmark.php +++ b/controllers/bookmark.php @@ -46,6 +46,7 @@ Router\get_action('bookmarks', function() { Response\html(Template\layout('bookmarks', array( 'order' => '', 'direction' => '', + 'display_mode' => Model\Config\get('items_display_mode'), 'items' => Model\Item\get_bookmarks($offset, Model\Config\get('items_per_page')), 'nb_items' => $nb_items, 'offset' => $offset, diff --git a/controllers/config.php b/controllers/config.php index 12f420e..18c2367 100644 --- a/controllers/config.php +++ b/controllers/config.php @@ -104,6 +104,7 @@ Router\get_action('config', function() { 'paging_options' => Model\Config\get_paging_options(), 'theme_options' => Model\Config\get_themes(), 'sorting_options' => Model\Config\get_sorting_directions(), + 'display_mode' => Model\Config\get_display_mode(), 'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(), 'menu' => 'config', 'title' => t('Preferences') @@ -139,6 +140,7 @@ Router\post_action('config', function() { 'theme_options' => Model\Config\get_themes(), 'sorting_options' => Model\Config\get_sorting_directions(), 'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(), + 'display_mode' => Model\Config\get_display_mode(), 'menu' => 'config', 'title' => t('Preferences') ))); diff --git a/controllers/history.php b/controllers/history.php index 5f429d6..d0d0c8d 100644 --- a/controllers/history.php +++ b/controllers/history.php @@ -22,6 +22,7 @@ Router\get_action('history', function() { ), 'order' => '', 'direction' => '', + 'display_mode' => Model\Config\get('items_display_mode'), 'nb_items' => $nb_items, 'offset' => $offset, 'items_per_page' => Model\Config\get('items_per_page'), diff --git a/controllers/item.php b/controllers/item.php index 0ec42fb..6a4a695 100644 --- a/controllers/item.php +++ b/controllers/item.php @@ -26,6 +26,7 @@ Router\get_action('unread', function() { Response\html(Template\layout('unread_items', array( 'order' => $order, 'direction' => $direction, + 'display_mode' => Model\Config\get('items_display_mode'), 'items' => $items, 'nb_items' => $nb_items, 'nb_unread_items' => $nb_items, @@ -86,6 +87,7 @@ Router\get_action('feed-items', function() { Response\html(Template\layout('feed_items', array( 'order' => $order, 'direction' => $direction, + 'display_mode' => Model\Config\get('items_display_mode'), 'feed' => $feed, 'items' => $items, 'nb_items' => $nb_items, diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index f15474a..d7743b8 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -225,4 +225,7 @@ return array( 'Create' => 'Créer', 'Unknown' => 'Inconnu', 'Remember Me' => 'Connexion automatique', + 'Display items on lists' => 'Mode d\'affichage en listes', + 'Summaries' => 'Résumés', + 'Full contents' => 'Contenus complets' ); diff --git a/models/config.php b/models/config.php index 3c002d6..b679704 100644 --- a/models/config.php +++ b/models/config.php @@ -8,7 +8,7 @@ use PicoDb\Database; use PicoFeed\Config as ReaderConfig; use PicoFeed\Logging; -const DB_VERSION = 26; +const DB_VERSION = 27; const HTTP_USER_AGENT = 'Miniflux (http://miniflux.net)'; // Get PicoFeed config @@ -116,6 +116,15 @@ function get_sorting_directions() ); } +// Display summaries or full contents on lists +function get_display_mode() +{ + return array( + 'summaries' => t('Summaries'), + 'full' => t('Full contents') + ); +} + // Autoflush choices for items function get_autoflush_options() { @@ -237,6 +246,7 @@ function get_all() 'auth_google_token', 'auth_mozilla_token', 'items_sorting_direction', + 'items_display_mode', 'redirect_nothing_to_read', 'auto_update_url' ) diff --git a/models/schema.php b/models/schema.php index cf11d70..255a294 100644 --- a/models/schema.php +++ b/models/schema.php @@ -2,6 +2,10 @@ namespace Schema; +function version_27($pdo) +{ + $pdo->exec('ALTER TABLE config ADD COLUMN items_display_mode TEXT DEFAULT "summaries"'); +} function version_26($pdo) { diff --git a/templates/bookmarks.php b/templates/bookmarks.php index 74b0946..a02fd5a 100644 --- a/templates/bookmarks.php +++ b/templates/bookmarks.php @@ -12,7 +12,7 @@
- $item, 'menu' => $menu, 'offset' => $offset, 'hide' => false)) ?> + $item, 'menu' => $menu, 'offset' => $offset, 'hide' => false, 'display_mode' => $display_mode)) ?> $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction)) ?> diff --git a/templates/config.php b/templates/config.php index 3e1cd5f..7dfb12d 100644 --- a/templates/config.php +++ b/templates/config.php @@ -28,6 +28,9 @@
+ +
+
diff --git a/templates/feed_items.php b/templates/feed_items.php index 4462da6..354c423 100644 --- a/templates/feed_items.php +++ b/templates/feed_items.php @@ -18,7 +18,7 @@
- $item, 'menu' => $menu, 'offset' => $offset, 'hide' => false)) ?> + $item, 'menu' => $menu, 'offset' => $offset, 'hide' => false, 'display_mode' => $display_mode)) ?>
diff --git a/templates/history.php b/templates/history.php index 2e572af..68e856c 100644 --- a/templates/history.php +++ b/templates/history.php @@ -15,7 +15,7 @@
- $item, 'menu' => $menu, 'offset' => $offset, 'hide' => true)) ?> + $item, 'menu' => $menu, 'offset' => $offset, 'hide' => true, 'display_mode' => $display_mode)) ?> $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction)) ?> diff --git a/templates/item.php b/templates/item.php index a2685f7..5de375f 100644 --- a/templates/item.php +++ b/templates/item.php @@ -18,9 +18,15 @@ -

> - -

+ +
> + +
+ +

> + +

+
  • diff --git a/templates/unread_items.php b/templates/unread_items.php index 2224fd9..855a21f 100644 --- a/templates/unread_items.php +++ b/templates/unread_items.php @@ -16,7 +16,7 @@
    - $item, 'menu' => $menu, 'offset' => $offset, 'hide' => true)) ?> + $item, 'menu' => $menu, 'offset' => $offset, 'hide' => true, 'display_mode' => $display_mode)) ?>
    diff --git a/themes/copper/css/app.css b/themes/copper/css/app.css index e5ae1b2..a90fdb1 100644 --- a/themes/copper/css/app.css +++ b/themes/copper/css/app.css @@ -159,10 +159,6 @@ section.page { font-family: 'Muli', sans-serif; } -.items li { - font-family: 'Muli', sans-serif; -} - form { border: none; padding-left: 10px; diff --git a/themes/midnight/css/app.css b/themes/midnight/css/app.css index 9ce74ee..e3281a7 100644 --- a/themes/midnight/css/app.css +++ b/themes/midnight/css/app.css @@ -33,7 +33,7 @@ pre, code { margin-top: 20px } -.items p { +.items .preview { color: #666; } diff --git a/themes/still/css/app.css b/themes/still/css/app.css index ae4e9b4..cd22b60 100644 --- a/themes/still/css/app.css +++ b/themes/still/css/app.css @@ -52,10 +52,6 @@ pre, code { font-weight : normal; } -.items p { - color: #666; -} - .items article:hover .preview, .items #current-item .preview { color: #666; @@ -66,13 +62,10 @@ pre, code { font-family: roboto; } -.preview p { - color: #ff0000; -} - .items .preview { font-family: roboto; text-align: justify; + color: #aaa; } .items a:hover {