diff --git a/Source/Quartzmin/Helpers/HandlebarsHelpers.cs b/Source/Quartzmin/Helpers/HandlebarsHelpers.cs index 4e2ae6b..46b3f03 100644 --- a/Source/Quartzmin/Helpers/HandlebarsHelpers.cs +++ b/Source/Quartzmin/Helpers/HandlebarsHelpers.cs @@ -58,6 +58,8 @@ namespace Quartzmin.Helpers h.RegisterHelper(nameof(ToBase64), ToBase64); h.RegisterHelper(nameof(footer), footer); h.RegisterHelper(nameof(QuartzminVersion), QuartzminVersion); + h.RegisterHelper(nameof(Logo), Logo); + h.RegisterHelper(nameof(ProductName), ProductName); } static bool IsTrue(object value) => value?.ToString()?.Equals("true", StringComparison.OrdinalIgnoreCase) == true; @@ -262,5 +264,13 @@ namespace Quartzmin.Helpers output.Write(v.InformationalVersion); } + void Logo(TextWriter output, dynamic context, params object[] arguments) + { + output.Write(_services.Options.Logo); + } + void ProductName(TextWriter output, dynamic context, params object[] arguments) + { + output.Write(_services.Options.ProductName); + } } } diff --git a/Source/Quartzmin/QuartzminOptions.cs b/Source/Quartzmin/QuartzminOptions.cs index cbc137d..a3c8ef9 100644 --- a/Source/Quartzmin/QuartzminOptions.cs +++ b/Source/Quartzmin/QuartzminOptions.cs @@ -9,6 +9,15 @@ namespace Quartzmin { public class QuartzminOptions { + /// + /// Supports any value that is a viable as a img src attribute value: url, or base64 + /// src='data:image/jpeg;base64, LzlqLzRBQ...[end of base64 data]' + /// Defaults to the quartzmin original logo + /// + public string Logo { get; set; } = "Content/Images/logo.png"; + + public string ProductName { get; set; } = ""; + public string VirtualPathRoot { get; set; } = "/"; public IScheduler Scheduler { get; set; } diff --git a/Source/Quartzmin/Views/Layout.hbs b/Source/Quartzmin/Views/Layout.hbs index 09593a0..3100d01 100644 --- a/Source/Quartzmin/Views/Layout.hbs +++ b/Source/Quartzmin/Views/Layout.hbs @@ -35,30 +35,30 @@ + --> + +
{{{body}}}