add classes future/past to date list items

This commit is contained in:
2024-08-18 22:22:46 +02:00
parent 4853e74fe0
commit e5367c640f
2 changed files with 5 additions and 13 deletions

View File

@ -16,7 +16,11 @@ const DateListItem = ({ occurrence }: { occurrence: EventOccurrence }) => {
const wholeCastle = occurrence.venue?.slug === "hele-huset";
return (
<li className={styles.date}>
<li
className={`${styles.date} ${
isTodayOrFuture(occurrence.start) ? styles.future : styles.past
}`}
>
<div className={styles.time}>
<span className={styles.day}>
{formatExtendedDateTime(occurrence.start, true)}

View File

@ -4,12 +4,6 @@
.dateList {
list-style: none;
&[data-showall=true] {
.date {
display: block;
}
}
}
.date {
@ -21,12 +15,6 @@
line-height: 1.4;
padding: var(--spacing-s) 0;
border-bottom: var(--border);
display: none;
&:nth-of-type(1), &:nth-of-type(2), &:nth-of-type(3), &:nth-of-type(4) {
display: block;
}
}
.header {