Add home hero with intro and buttons from the body, next-event card and page tiles

This commit is contained in:
tleininger committed 2026-10-01 14:05:25 +02:00
1 parent b737f57ef7
commit e51afeb34b
23 files changed
+1262 -65

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
namespace Elternbeirat.Web.Shared;
/// <summary>
/// Tells the current calendar day as people at the school see it.
/// </summary>
/// <remarks>
/// The container's clock runs in UTC, so <see cref="DateTime.Today"/> would flip to
/// the next day at 01:00 or 02:00 Berlin time, and an event shortly after midnight
/// would count as past for an hour or two. Event times are Berlin wall-clock
/// values (see <c>LocalDateTimeConverter</c>), so "today" has to be a Berlin day
/// too.
/// <para>
/// The time comes from an injected <see cref="TimeProvider"/>, not the system
/// clock, so tests can pin "today" and check what a page shows before and after
/// an event.
/// </para>
/// </remarks>
public static class BerlinClock
{
/// <summary>
/// IANA id; resolves on every platform .NET supports, Windows included.
/// </summary>
private static readonly TimeZoneInfo Berlin =
TimeZoneInfo.FindSystemTimeZoneById("Europe/Berlin");
/// <summary>
/// Returns today's date in Berlin.
/// </summary>
/// <param name="time">The clock to read, usually <see cref="TimeProvider.System"/>.</param>
/// <returns>The current Berlin calendar day.</returns>
public static DateOnly Today(TimeProvider time) =>
DateOnly.FromDateTime(TimeZoneInfo.ConvertTime(time.GetUtcNow(), Berlin).DateTime);
}