Add a wrapper span to dates in PageList.

This means there is a placeholder when date is not specified, so the values in grid-template-columns always line up correctly.
This commit is contained in:
ndrooo 2024-08-12 21:39:11 -04:00
parent 3b5ed813f5
commit e83dcc2751
2 changed files with 8 additions and 6 deletions

View File

@ -46,11 +46,13 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
return (
<li class="section-li">
<div class="section">
{page.dates && (
<p class="meta">
<Date date={getDate(cfg, page)!} locale={cfg.locale} />
</p>
)}
<span>
{page.dates && (
<p class="meta">
<Date date={getDate(cfg, page)!} locale={cfg.locale} />
</p>
)}
</span>
<div class="desc">
<h3>
<a href={resolveRelative(fileData.slug!, page.slug!)} class="internal">

View File

@ -23,7 +23,7 @@ li.section-li {
background-color: transparent;
}
& > .meta {
& .meta {
margin: 0 1em 0 0;
opacity: 0.6;
}