From af7c48acb2c1eeaf1701d33b7bad1ecfed0faa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Thu, 25 Jul 2024 20:48:59 -0700 Subject: [PATCH] feat: add support for aside HTML element in entry content --- internal/reader/sanitizer/sanitizer.go | 1 + internal/ui/static/css/common.css | 9 +++++++++ internal/ui/static/css/dark.css | 1 + internal/ui/static/css/light.css | 1 + 4 files changed, 12 insertions(+) diff --git a/internal/reader/sanitizer/sanitizer.go b/internal/reader/sanitizer/sanitizer.go index 3af138b2eb3..05c6e7b8246 100644 --- a/internal/reader/sanitizer/sanitizer.go +++ b/internal/reader/sanitizer/sanitizer.go @@ -24,6 +24,7 @@ var ( "a": {"href", "title", "id"}, "abbr": {"title"}, "acronym": {"title"}, + "aside": {}, "audio": {"src"}, "blockquote": {}, "br": {}, diff --git a/internal/ui/static/css/common.css b/internal/ui/static/css/common.css index 0f906207bae..6ffaa8bf091 100644 --- a/internal/ui/static/css/common.css +++ b/internal/ui/static/css/common.css @@ -1174,6 +1174,15 @@ article.category-has-unread { border-bottom: 1px dashed var(--entry-content-abbr-border-color); } +.entry-content aside { + width: 30%; + padding: 1ch; + margin-left: 15px; + float: right; + font-style: italic; + border: dotted var(--entry-content-aside-border-color) 2px; +} + details.entry-enclosures { margin-top: 25px; } diff --git a/internal/ui/static/css/dark.css b/internal/ui/static/css/dark.css index 545036e3735..8d7162ea2b5 100644 --- a/internal/ui/static/css/dark.css +++ b/internal/ui/static/css/dark.css @@ -97,6 +97,7 @@ --entry-content-code-border-color: #888; --entry-content-quote-color: #777; --entry-content-abbr-border-color: #777; + --entry-content-aside-border-color: #777; --entry-enclosure-border-color: #333; --parsing-error-color: #eee; diff --git a/internal/ui/static/css/light.css b/internal/ui/static/css/light.css index fb159ef22f7..94c5f200731 100644 --- a/internal/ui/static/css/light.css +++ b/internal/ui/static/css/light.css @@ -97,6 +97,7 @@ --entry-content-code-border-color: #ddd; --entry-content-quote-color: #666; --entry-content-abbr-border-color: #999; + --entry-content-aside-border-color: #D3D3D3; --entry-enclosure-border-color: #333; --parsing-error-color: #333;