diff --git a/src/LinkDotNet.Blog.Web/Shared/Footer.razor b/src/LinkDotNet.Blog.Web/Shared/Footer.razor new file mode 100644 index 00000000..c5ee6d16 --- /dev/null +++ b/src/LinkDotNet.Blog.Web/Shared/Footer.razor @@ -0,0 +1,12 @@ +@inject AppConfiguration appConfiguration + +
+ +
+@code { + private string CopyrightName => appConfiguration.IsAboutMeEnabled + ? appConfiguration.ProfileInformation.Name + : string.Empty; +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/MainLayout.razor b/src/LinkDotNet.Blog.Web/Shared/MainLayout.razor index d1487a58..8bb33233 100644 --- a/src/LinkDotNet.Blog.Web/Shared/MainLayout.razor +++ b/src/LinkDotNet.Blog.Web/Shared/MainLayout.razor @@ -4,8 +4,11 @@
- -
- @Body -
-
\ No newline at end of file + +
+
+ @Body +
+
+ + \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/wwwroot/css/basic.css b/src/LinkDotNet.Blog.Web/wwwroot/css/basic.css index ef9b3301..437476f8 100644 --- a/src/LinkDotNet.Blog.Web/wwwroot/css/basic.css +++ b/src/LinkDotNet.Blog.Web/wwwroot/css/basic.css @@ -10,7 +10,7 @@ --big-stone: #193441; --white: #ffffff; - --wild-sand: #f4f4f4; + --wild-sand: #f4f4f4; /* Usages - this colors have to be defined in every theme */ --active-link: var(--big-stone); diff --git a/tests/LinkDotNet.Blog.UnitTests/Web/Shared/FooterTests.cs b/tests/LinkDotNet.Blog.UnitTests/Web/Shared/FooterTests.cs new file mode 100644 index 00000000..1bea7edb --- /dev/null +++ b/tests/LinkDotNet.Blog.UnitTests/Web/Shared/FooterTests.cs @@ -0,0 +1,40 @@ +using Bunit; +using FluentAssertions; +using LinkDotNet.Blog.Domain; +using LinkDotNet.Blog.Web; +using LinkDotNet.Blog.Web.Shared; +using Microsoft.Extensions.DependencyInjection; +using Xunit; + +namespace LinkDotNet.Blog.UnitTests.Web.Shared; + +public class FooterTests : TestContext +{ + [Fact] + public void ShouldSetCopyrightInformation() + { + var appConfig = new AppConfiguration + { + ProfileInformation = new ProfileInformation() + { + Name = "Steven", + }, + }; + Services.AddScoped(_ => appConfig); + + var cut = RenderComponent