Show published dates for cards

This commit is contained in:
Lim Chee Aun 2024-03-23 12:26:50 +08:00
parent d6b65d0413
commit 5ccf8b6842
2 changed files with 24 additions and 10 deletions

View file

@ -1585,16 +1585,16 @@ a:focus-visible .card img {
} }
.card .meta.domain { .card .meta.domain {
opacity: 1; opacity: 1;
color: var(--link-color); color: var(--text-insignificant-color);
white-space: nowrap;
text-overflow: ellipsis; .domain {
overflow: hidden; color: var(--link-color);
display: block; }
} }
.card:visited .meta.domain { .card:visited .meta .domain {
color: var(--link-visited-color); color: var(--link-visited-color);
} }
.card .meta.domain * { .card .meta .domain * {
vertical-align: middle; vertical-align: middle;
} }
a.card { a.card {

View file

@ -2228,8 +2228,14 @@ function Card({ card, selfReferential, instance }) {
/> />
</div> </div>
<div class="meta-container"> <div class="meta-container">
<p class="meta domain" dir="auto"> <p class="meta domain">
{domain} <span class="domain">{domain}</span>{' '}
{!!publishedAt && <>&middot; </>}
{!!publishedAt && (
<>
<RelativeTime datetime={publishedAt} format="micro" />
</>
)}
</p> </p>
<p class="title" dir="auto" title={title}> <p class="title" dir="auto" title={title}>
{title} {title}
@ -2301,7 +2307,15 @@ function Card({ card, selfReferential, instance }) {
> >
<div class="meta-container"> <div class="meta-container">
<p class="meta domain"> <p class="meta domain">
<Icon icon="link" size="s" /> <span>{domain}</span> <span class="domain">
<Icon icon="link" size="s" /> <span>{domain}</span>
</span>{' '}
{!!publishedAt && <>&middot; </>}
{!!publishedAt && (
<>
<RelativeTime datetime={publishedAt} format="micro" />
</>
)}
</p> </p>
<p class="title" title={title}> <p class="title" title={title}>
{title} {title}