@model (string BrandColor, string CssFileId, string CustomCSSLink, string EmbeddedCSS)
@using BTCPayServer.Abstractions.Extensions
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Contracts
@inject IFileService FileService
@{
var cssUrl = !string.IsNullOrEmpty(Model.CssFileId)
? await FileService.GetFileUrl(Context.Request.GetAbsoluteRootUri(), Model.CssFileId)
: null;
}
@if (!string.IsNullOrEmpty(Model.BrandColor))
{
var brandColor = Model.BrandColor;
var accentColor = ColorPalette.Default.AdjustBrightness(brandColor, (float)-0.15);
var complement = ColorPalette.Default.TextColor(brandColor).ToLowerInvariant();
var complementColor = $"var(--btcpay-{(complement == "black" ? "black" : "white")})";
}
@if (!string.IsNullOrEmpty(cssUrl))
{
}
@* Deprecated, but added for backwards-compatibility *@
@if (!string.IsNullOrEmpty(Model.CustomCSSLink))
{
}
@if (!string.IsNullOrEmpty(Model.EmbeddedCSS))
{
}