Skip to content

Commit 1d56b71

Browse files
author
Erik Gassler
committed
Setup copyright to allow setting starting year and display span of years when before the current year.
1 parent b18c965 commit 1d56b71

File tree

9 files changed

+25
-14
lines changed

9 files changed

+25
-14
lines changed

Docs/LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Stoic Dreams
3+
Copyright (c) 2022-2023 Stoic Dreams
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Docs/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
UI Framework and component library for Blazor based Websites and Maui projects.
77

8+
> ## **Notice:** This project is on hold indefinitely!
9+
> I do not expect much continuing work, if any, to be done on Blazor UI at this point, as we have switched our interests to Rust-language projects, including our new [WebUI](https://webui.stoicdreams.com) framework built in Rust that we are using to convert our Blazor-built websites to Rust-built websites.
10+
811
> ## **Notice:** This project is very early in development!
912
> This project should technically have all the functionality to build a complete website, but at this stage there is a lot of experimental work being done and breaking changes could be introduced with each update.
1013

StoicDreams.BlazorUI/Components/Displays/BUIFooter.razor

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<MudSpacer />
55
<span>
66
<MudIcon Icon="@Icons.Material.Rounded.Copyright" Color="Color.Inherit" Class="" />
7-
<span> @(DateTime.UtcNow.Year) by </span>
7+
<span> @CopyrightYears by </span>
88
@if (string.IsNullOrWhiteSpace(AppOptions.CompanyHomeUrl))
99
{
1010
@AppOptions.CompanyName
@@ -25,5 +25,6 @@
2525
</BUIPaper>
2626

2727
@code {
28-
28+
private short CurrentYear => Convert.ToInt16(DateTime.UtcNow.Year);
29+
private MarkupString CopyrightYears => new MarkupString($"{(AppOptions.CopyrightStart < CurrentYear ? $"{AppOptions.CopyrightStart}-{CurrentYear}" : AppOptions.CopyrightStart.ToString())}");
2930
}

StoicDreams.BlazorUI/Data/AppOptions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public sealed class AppOptions : IAppOptions
66
public string CompanyName { get; set; } = string.Empty;
77
public string CompanyHomeUrl { get; set; } = string.Empty;
88
public string Domain { get; set; } = string.Empty;
9+
public short CopyrightStart { get; set; } = Convert.ToInt16(DateTime.UtcNow.Year);
910
public AppTypes AppType { get; set; }
1011

1112
#region Startup Options

StoicDreams.BlazorUI/Interfaces/Data/IAppOptions.cs

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public interface IAppOptions
2828
/// </summary>
2929
string Domain { get; set; }
3030

31+
/// <summary>
32+
/// Start of copyright year for user displays.
33+
/// </summary>
34+
short CopyrightStart { get; set; }
35+
3136
/// <summary>
3237
/// Set if this app is a website or application (mobile, desktop, etc).
3338
/// </summary>

StoicDreams.BlazorUI/StoicDreams.BlazorUI.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<Description>
1313
UI Framework and component library for Blazor based Websites and Maui projects.
1414
</Description>
15-
<Version>1.12.5</Version>
16-
<Copyright>2022 Stoic Dreams</Copyright>
15+
<Version>1.12.6</Version>
16+
<Copyright>2022-2023 Stoic Dreams</Copyright>
1717
<PackageProjectUrl>https://www.stoicdreams.com</PackageProjectUrl>
1818
<PackageLicenseExpression></PackageLicenseExpression>
1919
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>

StoicDreams.SampleWebsite/AppSettings.cs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static void ApplyAppSettings(IAppOptions options)
1515
options.CompanyHomeUrl = "https://www.stoicdreams.com";
1616
options.Domain = "StoicDreams.com";
1717
options.AppType = AppTypes.Website;
18+
options.CopyrightStart = 2022;
1819
options.TitleBarPosition = TitleBarPosition.Top;
1920
options.LeftDrawerVariant = DrawerVariant.Mini;
2021
options.ApplyOnStartup<AppStartup>();

StoicDreams.SampleWebsite/StoicDreams.SampleWebsite.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</When>
3131
<Otherwise>
3232
<ItemGroup>
33-
<PackageReference Include="StoicDreams.BlazorUI" Version="1.12.5" />
33+
<PackageReference Include="StoicDreams.BlazorUI" Version="1.12.6" />
3434
</ItemGroup>
3535
</Otherwise>
3636
</Choose>

StoicDreams.SampleWebsite/wwwroot/sitemap.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://blazorui.stoicdreams.com/</loc>
5-
<lastmod>2023-03-04</lastmod>
5+
<lastmod>2023-03-19</lastmod>
66
</url>
77
<url>
88
<loc>https://blazorui.stoicdreams.com/getting-started</loc>
9-
<lastmod>2023-03-04</lastmod>
9+
<lastmod>2023-03-19</lastmod>
1010
</url>
1111
<url>
1212
<loc>https://blazorui.stoicdreams.com/content/pagesections</loc>
13-
<lastmod>2023-03-04</lastmod>
13+
<lastmod>2023-03-19</lastmod>
1414
</url>
1515
<url>
1616
<loc>https://blazorui.stoicdreams.com/markdown</loc>
17-
<lastmod>2023-03-04</lastmod>
17+
<lastmod>2023-03-19</lastmod>
1818
</url>
1919
<url>
2020
<loc>https://blazorui.stoicdreams.com/markdown/emojis</loc>
21-
<lastmod>2023-03-04</lastmod>
21+
<lastmod>2023-03-19</lastmod>
2222
</url>
2323
<url>
2424
<loc>https://blazorui.stoicdreams.com/userinput/inputchips</loc>
25-
<lastmod>2023-03-04</lastmod>
25+
<lastmod>2023-03-19</lastmod>
2626
</url>
2727
<url>
2828
<loc>https://blazorui.stoicdreams.com/terms</loc>
29-
<lastmod>2023-03-04</lastmod>
29+
<lastmod>2023-03-19</lastmod>
3030
</url>
3131
<url>
3232
<loc>https://blazorui.stoicdreams.com/privacy</loc>
33-
<lastmod>2023-03-04</lastmod>
33+
<lastmod>2023-03-19</lastmod>
3434
</url>
3535
</urlset>

0 commit comments

Comments
 (0)