@* One event as a card: calendar sheet on the left, title, time, place and note on the right. With an Href the whole card is that link (home embed); without one it is a plain card (events page) and offers the event as a calendar file instead. *@ @if (Href is null) {
@Details
} else { @Details } @code { // The card's content, the same in both forms. A template, not a child component, // so the wrapper above stays the only difference between the two. private RenderFragment Details => @ @Value.Title @* The sheet is hidden from screen readers; this is the date they hear. *@ @if (Span.Length > 0) { @Span } @if (!string.IsNullOrWhiteSpace(Value.Location)) { @Value.Location } @if (!string.IsNullOrWhiteSpace(Value.Note)) { @Value.Note } @* A link inside a link is invalid HTML, so only the plain card offers it. *@ @if (Href is null) { In Kalender übernehmen } ; }