From b164d68b4f73377402eac3bd9d9aa67e089dcfdc Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 18 Apr 2023 23:46:59 +0800 Subject: [PATCH] Try show non-image cards --- src/components/status.css | 4 ++++ src/components/status.jsx | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/components/status.css b/src/components/status.css index cdc02f0a..17a69b6d 100644 --- a/src/components/status.css +++ b/src/components/status.css @@ -841,6 +841,10 @@ a:focus-visible .card img { -webkit-line-clamp: 2; line-clamp: 2; } +.card.no-image :is(.title, .meta) { + -webkit-line-clamp: 3; + line-clamp: 3; +} .card .meta.domain { opacity: 1; color: var(--link-color); diff --git a/src/components/status.jsx b/src/components/status.jsx index f6a1dab7..e34741c0 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1335,6 +1335,22 @@ function Card({ card, instance }) { dangerouslySetInnerHTML={{ __html: html }} /> ); + } else if (hasText && !image) { + const domain = new URL(url).hostname.replace(/^www\./, ''); + return ( + +
+

{domain}

+

{title}

+

{description || providerName || authorName}

+
+
+ ); } }