Files
EnvelopeGenerator/EnvelopeGenerator.Server/EnvelopeGenerator.Server.Client/Layout/MainLayout.razor
TekH 06551d502b Update branding to "signFLOW" for consistency
The footer text in `MainLayout.razor` and the header title in `IndexPage.razor` have been updated to change the branding from "SignFlow" to "signFLOW". This change ensures consistent presentation of the brand across the application by adjusting the capitalization.
2026-10-26 09:47:36 +01:00

80 lines
2.4 KiB
Plaintext

@using EnvelopeGenerator.Server.Client.Services
@using EnvelopeGenerator.Application.Resources
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.Extensions.Localization
@using System.Globalization
@inherits LayoutComponentBase
@implements IDisposable
@inject ThemeService ThemeService
@inject IStringLocalizer<Resource> UiLocalizer
@inject NavigationManager Navigation
<HeadContent>
<link href="@ThemeService.ThemeCssHref" rel="stylesheet" />
</HeadContent>
<div class="page" data-bs-theme="@ThemeService.BootstrapTheme">
<main>
<article class="content">
@Body
</article>
</main>
<footer class="receiver-footer">
<div class="receiver-footer__left">
<span>&copy; signFLOW 2023-2024 <a href="https://digitaldata.works" target="_blank" rel="noopener">Digital Data GmbH</a></span>
<span class="receiver-footer__sep">&#124;</span>
<a href="@GetPrivacyPolicyPath()" target="_blank" rel="noopener">@L("PrivacyPolicy", "Datenschutz")</a>
</div>
<div class="receiver-footer__right">
<LanguageControls />
<ThemeControls />
</div>
</footer>
</div>
@code {
[Inject] IHttpClientFactory HttpClientFactory { get; set; } = default!;
private Action? _themeChangeHandler;
protected override async Task OnInitializedAsync()
{
Navigation.LocationChanged += OnLocationChanged;
await FontLoader.LoadFonts(HttpClientFactory, ["opensans.ttf"]);
_themeChangeHandler = () => InvokeAsync(StateHasChanged);
ThemeService.OnChange += _themeChangeHandler;
await base.OnInitializedAsync();
}
public void Dispose()
{
ThemeService.OnChange -= _themeChangeHandler;
Navigation.LocationChanged -= OnLocationChanged;
}
private void OnLocationChanged(object? sender, LocationChangedEventArgs e)
=> _ = InvokeAsync(StateHasChanged);
private string GetPrivacyPolicyPath()
{
var current = CultureInfo.CurrentUICulture.Name;
var code = current switch
{
"de-DE" => "de-DE",
"en-US" => "en-US",
"fr-FR" => "fr-FR",
_ => "de-DE"
};
return $"docs/privacy-policy.{code}.html";
}
string L(string key, string fallback)
{
var value = UiLocalizer[key];
return value.ResourceNotFound ? fallback : value.Value;
}
}