Try show non-image cards
This commit is contained in:
parent
fdf30c37cb
commit
b164d68b4f
2 changed files with 20 additions and 0 deletions
|
@ -841,6 +841,10 @@ a:focus-visible .card img {
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
line-clamp: 2;
|
line-clamp: 2;
|
||||||
}
|
}
|
||||||
|
.card.no-image :is(.title, .meta) {
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
line-clamp: 3;
|
||||||
|
}
|
||||||
.card .meta.domain {
|
.card .meta.domain {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
|
|
|
@ -1335,6 +1335,22 @@ function Card({ card, instance }) {
|
||||||
dangerouslySetInnerHTML={{ __html: html }}
|
dangerouslySetInnerHTML={{ __html: html }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
} else if (hasText && !image) {
|
||||||
|
const domain = new URL(url).hostname.replace(/^www\./, '');
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
href={cardStatusURL || url}
|
||||||
|
target={cardStatusURL ? null : '_blank'}
|
||||||
|
rel="nofollow noopener noreferrer"
|
||||||
|
class={`card link no-image`}
|
||||||
|
>
|
||||||
|
<div class="meta-container">
|
||||||
|
<p class="meta domain">{domain}</p>
|
||||||
|
<p class="title">{title}</p>
|
||||||
|
<p class="meta">{description || providerName || authorName}</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue