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;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
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",
|
" 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(
|
result = tags.li(
|
||||||
{"class": "feed-summary"},
|
{"class": "feed-summary"},
|
||||||
# TODO: Image!
|
# 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,
|
last_entry,
|
||||||
)
|
)
|
||||||
assert isinstance(result, tags.li)
|
assert isinstance(result, tags.li)
|
||||||
|
|
@ -93,7 +102,7 @@ def feed_view(feeds: list[feed.Feed]) -> tags.html:
|
||||||
tags.div(
|
tags.div(
|
||||||
{"class": "fv-feed"},
|
{"class": "fv-feed"},
|
||||||
tags.h2(
|
tags.h2(
|
||||||
{"class": "fv-feed-title"},
|
{"class": "fv-feed-title", "id": f.meta.url},
|
||||||
tags.a(f.title, href=f.link, target="_blank"),
|
tags.a(f.title, href=f.link, target="_blank"),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue