Skip to content

A free, self-hostable news aggregator…

Convert feed view into grid where appropriate (#8631)

Michael61f3151f7fd1
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml
index 7172d5f2d..52c15cbec 100644
--- a/app/views/helpers/index/normal/entry_header.phtml
+++ b/app/views/helpers/index/normal/entry_header.phtml
@@ -12,10 +12,17 @@
$topline_date = FreshRSS_Context::userConf()->topline_date;
$topline_link = FreshRSS_Context::userConf()->topline_link;
$lazyload = FreshRSS_Context::userConf()->lazyload;
+ $headerClasses = ['horizontal-list', 'flux_header', 'website' . $topline_website];
+ if ($topline_thumbnail !== 'none') {
+ $headerClasses[] = 'has-thumbnail';
+ }
+ if ($topline_summary) {
+ $headerClasses[] = 'has-summary';
+ }
if ($this->feed === null || $this->entry === null) {
return;
}
-?><ul class="horizontal-list flux_header website<?= $topline_website ?>" data-website-name="<?= $this->feed->name() ?>" data-article-authors="<?= implode(' · ', $this->entry->authors()) ?>"><?php
+?><ul class="<?= implode(' ', $headerClasses) ?>" data-website-name="<?= $this->feed->name() ?>" data-article-authors="<?= implode(' · ', $this->entry->authors()) ?>"><?php
if (FreshRSS_Auth::hasAccess()) {
if ($topline_read) {
?><li class="item manage"><?php
diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.css
index f65aa14cf..6f02bad86 100644
--- a/p/themes/base-theme/frss.css
+++ b/p/themes/base-theme/frss.css
@@ -2541,6 +2541,55 @@ html.slider-active {
padding-right: 1rem;
}
+ .flux .flux_header.has-thumbnail.has-summary {
+ display: grid;
+ grid-template-columns: auto 1fr auto auto auto;
+ grid-template-rows: auto auto;
+ grid-template-areas: "website website manage-read manage-bookmark manage-share manage-labels link"
+ "thumbnail content content content content content content";
+ align-items: start;
+ list-style: none;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.website .websiteName {
+ display: inline;
+ }
+
+ /** place all the elements in their respective template areas */
+ .flux .flux_header.has-thumbnail.has-summary li.website {
+ grid-area: website;
+ /** Show feed name */
+ width: auto;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.thumbnail {
+ grid-area: thumbnail;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.titleAuthorSummaryDate {
+ grid-area: content;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.manage:has(.read) {
+ grid-area: manage-read;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.manage:has(.bookmark) {
+ grid-area: manage-bookmark;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.link {
+ grid-area: link;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.labels {
+ grid-area: manage-labels
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.share {
+ grid-area: manage-share
+ }
+
#overlay .close {
position: relative;
}
diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.css
index 67e779f5d..6fcb94984 100644
--- a/p/themes/base-theme/frss.rtl.css
+++ b/p/themes/base-theme/frss.rtl.css
@@ -2541,6 +2541,55 @@ html.slider-active {
padding-left: 1rem;
}
+ .flux .flux_header.has-thumbnail.has-summary {
+ display: grid;
+ grid-template-columns: auto 1fr auto auto auto;
+ grid-template-rows: auto auto;
+ grid-template-areas: "website website manage-read manage-bookmark manage-share manage-labels link"
+ "thumbnail content content content content content content";
+ align-items: start;
+ list-style: none;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.website .websiteName {
+ display: inline;
+ }
+
+ /** place all the elements in their respective template areas */
+ .flux .flux_header.has-thumbnail.has-summary li.website {
+ grid-area: website;
+ /** Show feed name */
+ width: auto;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.thumbnail {
+ grid-area: thumbnail;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.titleAuthorSummaryDate {
+ grid-area: content;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.manage:has(.read) {
+ grid-area: manage-read;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.manage:has(.bookmark) {
+ grid-area: manage-bookmark;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.link {
+ grid-area: link;
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.labels {
+ grid-area: manage-labels
+ }
+
+ .flux .flux_header.has-thumbnail.has-summary li.share {
+ grid-area: manage-share
+ }
+
#overlay .close {
position: relative;
}