mirror of https://github.com/FreshRSS/FreshRSS.git
feat: create config to display website icon only / name only / icon and name / none on feeds (#4969)
* feat: create config to display website icon only / name only / icon and name / none on feeds * fix title hovering * reverted: column in .phtml * Update app/i18n/fr/conf.php --------- Co-authored-by: mathContao <math-home@web.de> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
parent
27c7367534
commit
d3966befaf
|
@ -51,6 +51,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|||
FreshRSS_Context::$user_conf->topline_favorite = Minz_Request::param('topline_favorite', false);
|
||||
FreshRSS_Context::$user_conf->topline_date = Minz_Request::param('topline_date', false);
|
||||
FreshRSS_Context::$user_conf->topline_link = Minz_Request::param('topline_link', false);
|
||||
FreshRSS_Context::$user_conf->topline_website = Minz_Request::param('topline_website', false);
|
||||
FreshRSS_Context::$user_conf->topline_thumbnail = Minz_Request::param('topline_thumbnail', false);
|
||||
FreshRSS_Context::$user_conf->topline_summary = Minz_Request::param('topline_summary', false);
|
||||
FreshRSS_Context::$user_conf->topline_display_authors = Minz_Request::param('topline_display_authors', false);
|
||||
|
|
|
@ -272,6 +272,13 @@ class FreshRSS_ConfigurationSetter {
|
|||
private function _topline_read(&$data, $value) {
|
||||
$data['topline_read'] = $this->handleBool($value);
|
||||
}
|
||||
private function _topline_website(&$data, $value) {
|
||||
$value = strtolower($value);
|
||||
if (!in_array($value, array('none', 'icon', 'name', 'full'))) {
|
||||
$value = 'full';
|
||||
}
|
||||
$data['topline_website'] = $value;
|
||||
}
|
||||
private function _topline_thumbnail(&$data, $value) {
|
||||
$value = strtolower($value);
|
||||
if (!in_array($value, array('none', 'portrait', 'square', 'landscape'))) {
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
* @property bool $topline_link
|
||||
* @property bool $topline_read
|
||||
* @property bool $topline_summary
|
||||
* @property string $topline_website
|
||||
* @property string $topline_thumbnail
|
||||
* @property int $ttl_default
|
||||
* @property int $dynamic_opml_ttl_default
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Zobrazení',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Šířka obsahu',
|
||||
'large' => 'Široká',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Anzeige',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Inhaltsbreite',
|
||||
'large' => 'Groß',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Display', // TODO
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Content width', // TODO
|
||||
'large' => 'Wide', // TODO
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // IGNORE
|
||||
'title' => 'Display', // IGNORE
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // IGNORE
|
||||
'icon' => 'Icon only', // IGNORE
|
||||
'label' => 'Website', // IGNORE
|
||||
'name' => 'Name only', // IGNORE
|
||||
'none' => 'None', // IGNORE
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Content width', // IGNORE
|
||||
'large' => 'Wide', // IGNORE
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone',
|
||||
'title' => 'Display',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name',
|
||||
'icon' => 'Icon only',
|
||||
'label' => 'Website',
|
||||
'name' => 'Name only',
|
||||
'none' => 'None',
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Content width',
|
||||
'large' => 'Wide',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Visualización',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Ancho de contenido',
|
||||
'large' => 'Grande',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Fuseau horaire',
|
||||
'title' => 'Affichage',
|
||||
'website' => array(
|
||||
'full' => 'Icône et nom',
|
||||
'icon' => 'Icône seulement',
|
||||
'label' => 'Site Web',
|
||||
'name' => 'Nom seulement',
|
||||
'none' => 'Aucun',
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Largeur du contenu',
|
||||
'large' => 'Large', // IGNORE
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'תצוגה',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'רוחב התוכן',
|
||||
'large' => 'גדול',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Display', // TODO
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Content width', // TODO
|
||||
'large' => 'Wide', // TODO
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Visualizzazione',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Larghezza contenuto',
|
||||
'large' => 'Largo',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'ディスプレイ',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'コンテンツ幅',
|
||||
'large' => '広い',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => '표시',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => '내용 표시 너비',
|
||||
'large' => '넓게',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Tijdzone',
|
||||
'title' => 'Opmaak',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Inhoud breedte',
|
||||
'large' => 'Breed',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Afichatge',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Largor del contengut',
|
||||
'large' => 'Larga',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Wyświetlanie',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Rozmiar treści',
|
||||
'large' => 'Szeroka',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Exibição',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Largura do conteúdo',
|
||||
'large' => 'Largo',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Отображение',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Ширина содержимого',
|
||||
'large' => 'Широкое',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Zobraziť',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'Šírka obsahu',
|
||||
'large' => 'Veľká',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => 'Görünüm',
|
||||
'website' => array(
|
||||
'full' => 'simgesi and adı',
|
||||
'icon' => 'Sadece simgesi',
|
||||
'label' => 'Site',
|
||||
'name' => 'Sadece adı',
|
||||
'none' => 'Hiçbiri',
|
||||
),
|
||||
'width' => array(
|
||||
'content' => 'İçerik genişliği',
|
||||
'large' => 'Geniş',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => '显示',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => '内容宽度',
|
||||
'large' => '宽',
|
||||
|
|
|
@ -66,6 +66,13 @@ return array(
|
|||
),
|
||||
'timezone' => 'Time zone', // TODO
|
||||
'title' => '顯示',
|
||||
'website' => array(
|
||||
'full' => 'Icon and name', // TODO
|
||||
'icon' => 'Icon only', // TODO
|
||||
'label' => 'Website', // TODO
|
||||
'name' => 'Name only', // TODO
|
||||
'none' => 'None', // TODO
|
||||
),
|
||||
'width' => array(
|
||||
'content' => '內容寬度',
|
||||
'large' => '寬',
|
||||
|
|
|
@ -136,6 +136,27 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php $topline_website = FreshRSS_Context::$user_conf->topline_website; ?>
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="topline_website"><?= _t('conf.display.website.label') ?></label>
|
||||
<div class="group-controls">
|
||||
<select name="topline_website" id="topline_website" required="" data-leave-validation="<?= $topline_website ?>">
|
||||
<option value="none" <?= $topline_website === 'none' ? 'selected="selected"' : '' ?>>
|
||||
<?= _t('conf.display.website.none') ?>
|
||||
</option>
|
||||
<option value="icon" <?= $topline_website === 'icon' ? 'selected="selected"' : '' ?>>
|
||||
<?= _t('conf.display.website.icon') ?>
|
||||
</option>
|
||||
<option value="name" <?= $topline_website === 'name' ? 'selected="selected"' : '' ?>>
|
||||
<?= _t('conf.display.website.name') ?>
|
||||
</option>
|
||||
<option value="full" <?= $topline_website === 'full' ? 'selected="selected"' : '' ?>>
|
||||
<?= _t('conf.display.website.full') ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail; ?>
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="topline_thumbnail"><?= _t('conf.display.thumbnail.label') ?></label>
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
/** @var FreshRSS_View $this */
|
||||
$topline_read = FreshRSS_Context::$user_conf->topline_read;
|
||||
$topline_favorite = FreshRSS_Context::$user_conf->topline_favorite;
|
||||
$topline_website = FreshRSS_Context::$user_conf->topline_website;
|
||||
$topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail;
|
||||
$topline_summary = FreshRSS_Context::$user_conf->topline_summary;
|
||||
$topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors;
|
||||
$topline_date = FreshRSS_Context::$user_conf->topline_date;
|
||||
$topline_link = FreshRSS_Context::$user_conf->topline_link;
|
||||
$lazyload = FreshRSS_Context::$user_conf->lazyload;
|
||||
?><ul class="horizontal-list flux_header"><?php
|
||||
?><ul class="horizontal-list flux_header website<?= $topline_website ?>"><?php
|
||||
if (FreshRSS_Auth::hasAccess()) {
|
||||
if ($topline_read) {
|
||||
?><li class="item manage"><?php
|
||||
|
@ -31,11 +32,14 @@
|
|||
?></li><?php
|
||||
}
|
||||
}
|
||||
?><li class="item website">
|
||||
|
||||
if ($topline_website !== 'none'):
|
||||
?><li class="item website <?= $topline_website ?>">
|
||||
<a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>" class="item-element" title="<?= _t('gen.action.filter') ?>: <?= $this->feed->name() ?>">
|
||||
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><span><?= $this->feed->name() ?></span>
|
||||
<?php if (FreshRSS_Context::$user_conf->show_favicons && 'name' !== $topline_website): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><?php if ('icon' !== $topline_website): ?><span class="websiteName"><?= $this->feed->name() ?></span><?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
</li><?php
|
||||
endif; ?>
|
||||
|
||||
<?php
|
||||
if ($topline_thumbnail !== 'none'):
|
||||
|
|
|
@ -100,6 +100,7 @@ return array (
|
|||
|
||||
'topline_read' => true,
|
||||
'topline_favorite' => true,
|
||||
'topline_website' => 'full',
|
||||
'topline_thumbnail' => 'none',
|
||||
'topline_summary' => false,
|
||||
'topline_display_authors' => false,
|
||||
|
|
|
@ -1199,6 +1199,26 @@ input[type="search"] {
|
|||
width: 200px;
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websitenone .item.title {
|
||||
max-width: calc(100% - 3 * (2 * var(--frss-padding-flux-items) + 16px));
|
||||
}
|
||||
|
||||
.flux .websiteicon .item.website {
|
||||
width: calc(2 * var(--frss-padding-flux-items) + 16px);
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websiteicon .item.title {
|
||||
max-width: calc(100% - 4 * (2 * var(--frss-padding-flux-items) + 16px));
|
||||
}
|
||||
|
||||
.flux .websitename .item.website {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websitename .item.title {
|
||||
max-width: calc(100% - 3 * (2 * var(--frss-padding-flux-items) + 16px) - 150px);
|
||||
}
|
||||
|
||||
.website a:hover .favicon,
|
||||
a.website:hover .favicon {
|
||||
filter: grayscale(100%);
|
||||
|
|
|
@ -1199,6 +1199,26 @@ input[type="search"] {
|
|||
width: 200px;
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websitenone .item.title {
|
||||
max-width: calc(100% - 3 * (2 * var(--frss-padding-flux-items) + 16px));
|
||||
}
|
||||
|
||||
.flux .websiteicon .item.website {
|
||||
width: calc(2 * var(--frss-padding-flux-items) + 16px);
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websiteicon .item.title {
|
||||
max-width: calc(100% - 4 * (2 * var(--frss-padding-flux-items) + 16px));
|
||||
}
|
||||
|
||||
.flux .websitename .item.website {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.flux:not(.current):hover .websitename .item.title {
|
||||
max-width: calc(100% - 3 * (2 * var(--frss-padding-flux-items) + 16px) - 150px);
|
||||
}
|
||||
|
||||
.website a:hover .favicon,
|
||||
a.website:hover .favicon {
|
||||
filter: grayscale(100%);
|
||||
|
|
Loading…
Reference in New Issue