commit 3eeb4b2c54676ef4d9eb4788e5e978720f6309f9
parent f8dfe6444e5eb6e1f623f5d60229528c369ace93
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sun, 27 Oct 2024 12:50:20 +0100
feat: ensure that only the summary of articles is shown
Diffstat:
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/template.html b/template.html
@@ -33,11 +33,18 @@
{
display: none;
}
+ /* Only show first paragraph of article content (typically the summary) */
+ .article_content > *:nth-child(n + 2) {
+ display: none;
+ }
+ .article_content {
+ margin-bottom: 1.5em;
+ }
/* Hide iframes and images in case they are not filtered out */
- section > iframe,
- section > p > iframe,
- section > img,
- section > p > img
+ .article_content > iframe,
+ .article_content > img,
+ .article_content > * > img,
+ .article_content > * > iframe
{
display: none;
}
@@ -100,13 +107,13 @@
<h2>
<a href="[% entry.link | url | html %]">[% entry.title | html %] ↗</a>
</h2>
- <p>
- [% IF entry.summary.body %]
- [% entry.summary.body %]
- [% ELSE %]
- [% entry.content.body %]
- [% END %]
- </p>
+ <div class="article_content">
+ [% IF entry.summary.body %]
+ <p>[% entry.summary.body %]</p>
+ [% ELSE %]
+ [% entry.content.body %]
+ [% END %]
+ </div>
<div class="button-row">
<a class="button" href="[% entry.link | url | html %]" style="width:65px;">