mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-28 18:28:28 -04:00
Add an option to choose content width
- 4 options: thin, medium, large and no limit - Thin is by default
This commit is contained in:
@@ -145,6 +145,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
|
||||
$themeId = FreshRSS_Themes::defaultTheme;
|
||||
}
|
||||
$this->view->conf->_theme($themeId);
|
||||
$this->view->conf->_content_width(Minz_Request::param('content_width', 'thin'));
|
||||
$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));
|
||||
|
||||
@@ -28,6 +28,7 @@ class FreshRSS_Configuration {
|
||||
'reception' => false,
|
||||
),
|
||||
'theme' => 'Origine',
|
||||
'content_width' => 'thin',
|
||||
'shortcuts' => array(
|
||||
'mark_read' => 'r',
|
||||
'mark_favorite' => 'f',
|
||||
@@ -221,6 +222,15 @@ class FreshRSS_Configuration {
|
||||
public function _theme($value) {
|
||||
$this->data['theme'] = $value;
|
||||
}
|
||||
public function _content_width($value) {
|
||||
if ($value === 'medium' ||
|
||||
$value === 'large' ||
|
||||
$value === 'no_limit') {
|
||||
$this->data['content_width'] = $value;
|
||||
} else {
|
||||
$this->data['content_width'] = 'thin';
|
||||
}
|
||||
}
|
||||
public function _token($value) {
|
||||
$this->data['token'] = $value;
|
||||
}
|
||||
|
||||
@@ -240,6 +240,11 @@ return array (
|
||||
'optimize_bdd' => 'Optimize database',
|
||||
'optimize_todo_sometimes' => 'To do occasionally to reduce the size of the database',
|
||||
'theme' => 'Theme',
|
||||
'content_width' => 'Content width',
|
||||
'width_thin' => 'Thin',
|
||||
'width_medium' => 'Medium',
|
||||
'width_large' => 'Large',
|
||||
'width_no_limit' => 'No limit',
|
||||
'more_information' => 'More information',
|
||||
'activate_sharing' => 'Activate sharing',
|
||||
'shaarli' => 'Shaarli',
|
||||
|
||||
@@ -240,6 +240,11 @@ return array (
|
||||
'optimize_bdd' => 'Optimiser la base de données',
|
||||
'optimize_todo_sometimes' => 'À faire de temps en temps pour réduire la taille de la BDD',
|
||||
'theme' => 'Thème',
|
||||
'content_width' => 'Largeur du contenu',
|
||||
'width_thin' => 'Fine',
|
||||
'width_medium' => 'Moyenne',
|
||||
'width_large' => 'Large',
|
||||
'width_no_limit' => 'Pas de limite',
|
||||
'more_information' => 'Plus d’informations',
|
||||
'activate_sharing' => 'Activer le partage',
|
||||
'shaarli' => 'Shaarli',
|
||||
|
||||
@@ -35,6 +35,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $width = $this->conf->content_width; ?>
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="content_width"><?php echo Minz_Translate::t('content_width'); ?></label>
|
||||
<div class="group-controls">
|
||||
<select name="content_width" id="content_width" required="">
|
||||
<option value="thin" <?php echo $width === 'thin'? 'selected="selected"' : ''; ?>>
|
||||
<?php echo Minz_Translate::t('width_thin'); ?>
|
||||
</option>
|
||||
<option value="medium" <?php echo $width === 'medium'? 'selected="selected"' : ''; ?>>
|
||||
<?php echo Minz_Translate::t('width_medium'); ?>
|
||||
</option>
|
||||
<option value="large" <?php echo $width === 'large'? 'selected="selected"' : ''; ?>>
|
||||
<?php echo Minz_Translate::t('width_large'); ?>
|
||||
</option>
|
||||
<option value="no_limit" <?php echo $width === 'no_limit'? 'selected="selected"' : ''; ?>>
|
||||
<?php echo Minz_Translate::t('width_no_limit'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="theme"><?php echo Minz_Translate::t ('article_icons'); ?></label>
|
||||
<table>
|
||||
|
||||
@@ -24,6 +24,8 @@ if (!empty($this->entries)) {
|
||||
$bottomline_tags = $this->conf->bottomline_tags;
|
||||
$bottomline_date = $this->conf->bottomline_date;
|
||||
$bottomline_link = $this->conf->bottomline_link;
|
||||
|
||||
$content_width = $this->conf->content_width;
|
||||
?>
|
||||
|
||||
<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
|
||||
@@ -87,7 +89,7 @@ if (!empty($this->entries)) {
|
||||
</ul>
|
||||
|
||||
<div class="flux_content">
|
||||
<div class="content">
|
||||
<div class="content <?php echo $content_width; ?>">
|
||||
<h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></h1>
|
||||
<?php
|
||||
$author = $item->author ();
|
||||
|
||||
@@ -3,6 +3,7 @@ $this->partial ('nav_menu');
|
||||
|
||||
if (!empty($this->entries)) {
|
||||
$lazyload = $this->conf->lazyload;
|
||||
$content_width = $this->conf->content_width;
|
||||
?>
|
||||
|
||||
<div id="stream" class="reader">
|
||||
@@ -10,7 +11,7 @@ if (!empty($this->entries)) {
|
||||
|
||||
<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
|
||||
<div class="flux_content">
|
||||
<div class="content">
|
||||
<div class="content <?php echo $content_width; ?>">
|
||||
<?php
|
||||
$feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
|
||||
if (empty($feed)) $feed = $item->feed (true);
|
||||
|
||||
Reference in New Issue
Block a user