diff options
| author | 2026-01-04 12:03:59 +0100 | |
|---|---|---|
| committer | 2026-01-04 12:03:59 +0100 | |
| commit | 4739bcc62e02bbae83b061464512481cf9cfffa8 (patch) | |
| tree | d43e06e6195c90233c8e14e80020f25f04a3523b /app/views | |
| parent | ed632bb5c44ebeb5a59a5a9aadfd1b1167cfb618 (diff) | |
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`
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/index/normal.phtml | 1 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 2 |
2 files changed, 3 insertions, 0 deletions
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'); ?><?= $useKeepUnreadImportant && ($this->feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : '' ?>" id="flux_<?= $this->entry->id() ?>" data-entry="<?= $this->entry->id() + ?>" data-category="<?= $this->feed->categoryId() ?>" data-feed="<?= $this->feed->id() ?>" data-priority="<?= $this->feed->priority() ?>" data-link="<?= $this->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: ?><?= $useKeepUnreadImportant && ($this->feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : '' ?>" id="flux_<?= $this->entry->id() ?>" data-entry="<?= $this->entry->id() + ?>" data-category="<?= $this->feed->categoryId() ?>" data-feed="<?= $this->feed->id() ?>" data-priority="<?= $this->feed->priority() + ?>" data-link="<?= $this->entry->link() ?>"><?php $this->renderHelper('index/article'); ?> </div><?php endforeach; |
