Refresh header and footer with signet, gradient, nav pills and three-column footer; fix box-sizing of design boxes
This commit is contained in:
1 parent
a641beab16
commit
d539fde09d
10 files changed
+407
-59
No files matched your search
@@ -0,0 +1,35 @@
|
||||
namespace Elternbeirat.Web.Features.Layout;
|
||||
|
||||
/// <summary>
|
||||
/// Works out the year shown in the footer's copyright line.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The container runs on UTC, but visitors live in Germany. Taking the year
|
||||
/// straight from the server clock would show the old year for the first hour
|
||||
/// (two in summer time) of every new year, so the instant is converted to
|
||||
/// Europe/Berlin first.
|
||||
/// </remarks>
|
||||
public static class FooterYear
|
||||
{
|
||||
/// <summary>
|
||||
/// IANA id; resolves on every platform .NET supports, Windows included.
|
||||
/// </summary>
|
||||
private static readonly TimeZoneInfo Berlin =
|
||||
TimeZoneInfo.FindSystemTimeZoneById("Europe/Berlin");
|
||||
|
||||
/// <summary>
|
||||
/// Returns the calendar year in Berlin at the given instant.
|
||||
/// </summary>
|
||||
/// <param name="now">
|
||||
/// The current instant, in any offset; usually
|
||||
/// <see cref="TimeProvider.GetUtcNow"/>.
|
||||
/// </param>
|
||||
/// <returns>The year a visitor in Germany would see on their calendar.</returns>
|
||||
/// <example>
|
||||
/// <code>
|
||||
/// FooterYear.For(new DateTimeOffset(2026, 12, 31, 23, 30, 0, TimeSpan.Zero)); // 2027
|
||||
/// </code>
|
||||
/// </example>
|
||||
public static int For(DateTimeOffset now) =>
|
||||
TimeZoneInfo.ConvertTime(now, Berlin).Year;
|
||||
}
|
||||
Reference in new issue
Block a user