This commit is contained in:
parent
e63a5c2fb6
commit
96daccd923
5 changed files with 61 additions and 25 deletions
|
|
@ -73,21 +73,22 @@ export const EventRow = ({date, end, title, location, cancelled, href, color = "
|
||||||
[styles.lineWhite]: color === "white",
|
[styles.lineWhite]: color === "white",
|
||||||
})}></div>
|
})}></div>
|
||||||
|
|
||||||
<div className={classNames({
|
<div className={styles.details}>
|
||||||
[styles.details]: true,
|
<span className={classNames({ [styles.cancelled]: cancelled })}>{title}</span>
|
||||||
[styles.cancelled]: cancelled
|
{cancelled && <span className={styles.cancelledLabel}>Abgesagt</span>}
|
||||||
})}>
|
<br />
|
||||||
{title} <br />
|
<span className={classNames({ [styles.cancelled]: cancelled })}>
|
||||||
{ showDate &&
|
{ showDate &&
|
||||||
<>
|
<>
|
||||||
{dateObj.toLocaleDateString("de-DE", { weekday: "long" })}
|
{dateObj.toLocaleDateString("de-DE", { weekday: "long" })}
|
||||||
{dayFormat === "long" && " " + dateObj.toLocaleDateString("de-DE", { dateStyle: "short" })}, {dateObj.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" })}
|
{dayFormat === "long" && " " + dateObj.toLocaleDateString("de-DE", { dateStyle: "short" })}, {dateObj.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" })}
|
||||||
{ endObj ? <> - {endObj.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" })}</> : "" }
|
{ endObj ? <> - {endObj.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" })}</> : "" }
|
||||||
Uhr
|
Uhr
|
||||||
<br />
|
<br />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
{location}
|
{location}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancelled {
|
.cancelled {
|
||||||
text-decoration: line-through;
|
color: #757575;
|
||||||
|
// line-through can't be repositioned, so draw an underline and pull it
|
||||||
|
// up into the text; a less negative offset moves the line further down
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
text-underline-offset: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancelledLabel {
|
||||||
|
margin-left: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #b3261e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container:hover .dayBase {
|
.container:hover .dayBase {
|
||||||
|
|
|
||||||
|
|
@ -61,3 +61,12 @@ export const Cancelled: Story = {
|
||||||
cancelled: true,
|
cancelled: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const CancelledLongDayName: Story = {
|
||||||
|
args: {
|
||||||
|
id: '1',
|
||||||
|
date: '2024-08-22T15:00:00.000Z',
|
||||||
|
type: 'WORD',
|
||||||
|
cancelled: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,30 +32,34 @@ export const MassTableRow = ({
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href={`/gottesdienst/${id}`}
|
href={`/gottesdienst/${id}`}
|
||||||
className={classNames({ [styles.cancelled]: cancelled }, styles.link)}
|
className={styles.link}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={styles.row}
|
className={styles.row}
|
||||||
onMouseEnter={() => setSymbol('†')}
|
onMouseEnter={() => setSymbol('†')}
|
||||||
onMouseLeave={() => setSymbol('')}
|
onMouseLeave={() => setSymbol('')}
|
||||||
>
|
>
|
||||||
<div className={styles.day}>{day}</div>
|
<div className={classNames({ [styles.cancelled]: cancelled }, styles.day)}>{day}</div>
|
||||||
<div className={styles.symbol}>{symbol}</div>
|
<div className={styles.symbol}>{!cancelled && symbol}</div>
|
||||||
<div className={styles.time}>
|
<div className={styles.time}>
|
||||||
{time}
|
<span className={classNames({ [styles.cancelled]: cancelled })}>
|
||||||
|
{time}
|
||||||
|
</span>
|
||||||
|
|
||||||
{type === 'FAMILY' && (
|
{!cancelled && type === 'FAMILY' && (
|
||||||
<Image src={family} width={18} height={18} alt={'Familien Messe'} />
|
<Image src={family} width={18} height={18} alt={'Familien Messe'} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{type === 'WORD' && (
|
{!cancelled && type === 'WORD' && (
|
||||||
<Image src={bible} width={18} height={18} alt={'Wortgottesfeier'} />
|
<Image src={bible} width={18} height={18} alt={'Wortgottesfeier'} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{type === 'LANGUAGE' && (
|
{!cancelled && type === 'LANGUAGE' && (
|
||||||
<Image src={language} width={18} height={18} alt={'Fremdsprache'} />
|
<Image src={language} width={18} height={18} alt={'Fremdsprache'} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{cancelled && <span className={styles.cancelledLabel}>Abgesagt</span>}
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
height: 24px;
|
height: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
align-items: flex-start;
|
align-items: baseline;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,7 +27,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancelled {
|
.cancelled {
|
||||||
text-decoration: line-through;
|
color: #757575;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
text-underline-offset: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancelledLabel {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #b3261e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.symbol {
|
.symbol {
|
||||||
|
|
@ -39,6 +48,7 @@
|
||||||
.day {
|
.day {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
|
line-height: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue