mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-27 07:57:33 +01:00
26 lines
871 B
Text
26 lines
871 B
Text
@model (string BrandColor, string CssFileId)
|
|
@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))
|
|
{
|
|
<style>
|
|
:root {
|
|
--btcpay-primary: @Model.BrandColor;
|
|
--btcpay-primary-bg-hover: @Model.BrandColor;
|
|
--btcpay-primary-bg-active: @Model.BrandColor;
|
|
--btcpay-primary-shadow: @Model.BrandColor;
|
|
--btcpay-body-link-accent: @Model.BrandColor;
|
|
}
|
|
</style>
|
|
}
|
|
@if (!string.IsNullOrEmpty(cssUrl))
|
|
{
|
|
<link href="@cssUrl" asp-append-version="true" rel="stylesheet" />
|
|
}
|