Link feed titles in summary to the full entry on the right
This commit is contained in:
parent
56d6c8e408
commit
2b94270767
2 changed files with 17 additions and 3 deletions
|
|
@ -129,3 +129,8 @@ li.entry:before {
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.feed-summary-feed-link {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
|
|
|||
15
cry/views.py
15
cry/views.py
|
|
@ -45,13 +45,22 @@ def _feed_summary(f: feed.Feed) -> tags.li:
|
|||
" ago",
|
||||
),
|
||||
),
|
||||
tags.p({"class": "feed-summary-entry"}, entry.title),
|
||||
tags.p(
|
||||
{"class": "feed-summary-entry"},
|
||||
tags.a({"href": entry.link, "target": "_blank"}, entry.title),
|
||||
),
|
||||
]
|
||||
|
||||
result = tags.li(
|
||||
{"class": "feed-summary"},
|
||||
# TODO: Image!
|
||||
tags.h2({"class": "feed-summary-title"}, f.title),
|
||||
tags.h2(
|
||||
{"class": "feed-summary-title"},
|
||||
tags.a(
|
||||
{"class": "feed-summary-feed-link", "href": f"#{f.meta.url}"},
|
||||
f.title,
|
||||
),
|
||||
),
|
||||
last_entry,
|
||||
)
|
||||
assert isinstance(result, tags.li)
|
||||
|
|
@ -93,7 +102,7 @@ def feed_view(feeds: list[feed.Feed]) -> tags.html:
|
|||
tags.div(
|
||||
{"class": "fv-feed"},
|
||||
tags.h2(
|
||||
{"class": "fv-feed-title"},
|
||||
{"class": "fv-feed-title", "id": f.meta.url},
|
||||
tags.a(f.title, href=f.link, target="_blank"),
|
||||
),
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue