From 4739bcc62e02bbae83b061464512481cf9cfffa8 Mon Sep 17 00:00:00 2001 From: Inverle Date: Sun, 4 Jan 2026 12:03:59 +0100 Subject: [PATCH] Allow styling entries by category in User CSS (#8397) * Allow styling entries by category in User CSS Since we have `data-feed`, it is useful to have `data-category` too. Example of usage to hide titles in all entries that belong to a specific category ID: ```css [data-category="6"] { .title { display: none !important } .summary { position: relative; bottom: 2rem; } } ``` * Add `data-link` to entries in `reader.phtml` --- app/views/index/normal.phtml | 1 + app/views/index/reader.phtml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index dd15f9b0e..c5523b42a 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -79,6 +79,7 @@ $today = @strtotime('today'); ?>feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : '' ?>" id="flux_entry->id() ?>" data-entry="entry->id() + ?>" data-category="feed->categoryId() ?>" data-feed="feed->id() ?>" data-priority="feed->priority() ?>" data-link="entry->link() diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index cd86c0590..1d6498397 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -37,8 +37,10 @@ $useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context: ?>feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : '' ?>" id="flux_entry->id() ?>" data-entry="entry->id() + ?>" data-category="feed->categoryId() ?>" data-feed="feed->id() ?>" data-priority="feed->priority() + ?>" data-link="entry->link() ?>">renderHelper('index/article'); ?>