From 158f06b3ad7790cdade7f4133d7c0cd7c03e51ba Mon Sep 17 00:00:00 2001 From: the1mason Date: Tue, 8 Apr 2025 00:30:27 +0500 Subject: [PATCH] Added left-right menu, removed list --- FastBlog.sln | 16 ++++++++++++++++ .../FastBlog.PluginBase.csproj | 9 +++++++++ src/FastBlog.PluginLoader/Class1.cs | 6 ++++++ .../FastBlog.PluginLoader.csproj | 9 +++++++++ src/FastBlog.Web/DisplayOptions.cs | 3 ++- src/FastBlog.Web/Views/Shared/_Layout.cshtml | 7 +++++-- src/FastBlog.Web/appsettings.json | 6 +++++- 7 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 lib/FastBlog.PluginBase/FastBlog.PluginBase.csproj create mode 100644 src/FastBlog.PluginLoader/Class1.cs create mode 100644 src/FastBlog.PluginLoader/FastBlog.PluginLoader.csproj diff --git a/FastBlog.sln b/FastBlog.sln index e52fb21..6774758 100644 --- a/FastBlog.sln +++ b/FastBlog.sln @@ -9,6 +9,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastBlog.Web", "src\FastBlo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastBlog.Core", "src\FastBlog.Core\FastBlog.Core.csproj", "{B8CDA182-8097-4EF5-8EE2-CB73AF4B58AC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{240F51ED-532D-4980-8091-D9250EC7E7BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastBlog.PluginBase", "lib\FastBlog.PluginBase\FastBlog.PluginBase.csproj", "{79C5D3D1-2ACB-4640-B8B0-A2B67514D041}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastBlog.PluginLoader", "src\FastBlog.PluginLoader\FastBlog.PluginLoader.csproj", "{55384AAF-FCC5-4014-BABE-855575436217}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,9 +32,19 @@ Global {B8CDA182-8097-4EF5-8EE2-CB73AF4B58AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {B8CDA182-8097-4EF5-8EE2-CB73AF4B58AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8CDA182-8097-4EF5-8EE2-CB73AF4B58AC}.Release|Any CPU.Build.0 = Release|Any CPU + {79C5D3D1-2ACB-4640-B8B0-A2B67514D041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79C5D3D1-2ACB-4640-B8B0-A2B67514D041}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79C5D3D1-2ACB-4640-B8B0-A2B67514D041}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79C5D3D1-2ACB-4640-B8B0-A2B67514D041}.Release|Any CPU.Build.0 = Release|Any CPU + {55384AAF-FCC5-4014-BABE-855575436217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55384AAF-FCC5-4014-BABE-855575436217}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55384AAF-FCC5-4014-BABE-855575436217}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55384AAF-FCC5-4014-BABE-855575436217}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {C9A19395-1E93-488F-AD10-2C7D2DB78EB0} = {D7A1C18D-CC03-4704-B5B7-2F8B1A04E279} {B8CDA182-8097-4EF5-8EE2-CB73AF4B58AC} = {D7A1C18D-CC03-4704-B5B7-2F8B1A04E279} + {79C5D3D1-2ACB-4640-B8B0-A2B67514D041} = {240F51ED-532D-4980-8091-D9250EC7E7BD} + {55384AAF-FCC5-4014-BABE-855575436217} = {D7A1C18D-CC03-4704-B5B7-2F8B1A04E279} EndGlobalSection EndGlobal diff --git a/lib/FastBlog.PluginBase/FastBlog.PluginBase.csproj b/lib/FastBlog.PluginBase/FastBlog.PluginBase.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/lib/FastBlog.PluginBase/FastBlog.PluginBase.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/FastBlog.PluginLoader/Class1.cs b/src/FastBlog.PluginLoader/Class1.cs new file mode 100644 index 0000000..3baa111 --- /dev/null +++ b/src/FastBlog.PluginLoader/Class1.cs @@ -0,0 +1,6 @@ +namespace FastBlog.PluginLoader; + +public class Class1 +{ + +} diff --git a/src/FastBlog.PluginLoader/FastBlog.PluginLoader.csproj b/src/FastBlog.PluginLoader/FastBlog.PluginLoader.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/FastBlog.PluginLoader/FastBlog.PluginLoader.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/FastBlog.Web/DisplayOptions.cs b/src/FastBlog.Web/DisplayOptions.cs index 9d42c31..4ef0b50 100644 --- a/src/FastBlog.Web/DisplayOptions.cs +++ b/src/FastBlog.Web/DisplayOptions.cs @@ -4,5 +4,6 @@ public class DisplayOptions { public string Title { get; init; } = "FastBlog"; - public Dictionary Links { get; init; } = []; + public Dictionary LeftLinks { get; init; } = []; + public Dictionary RightLinks { get; init; } = []; } \ No newline at end of file diff --git a/src/FastBlog.Web/Views/Shared/_Layout.cshtml b/src/FastBlog.Web/Views/Shared/_Layout.cshtml index 5a989b4..2840094 100644 --- a/src/FastBlog.Web/Views/Shared/_Layout.cshtml +++ b/src/FastBlog.Web/Views/Shared/_Layout.cshtml @@ -58,12 +58,15 @@

@options.Value.Title

+ @foreach (var link in options.Value.LeftLinks) + {
  • - Blog + @link.Key
  • + }
      - @foreach (var link in options.Value.Links) + @foreach (var link in options.Value.RightLinks) {
    • @link.Key diff --git a/src/FastBlog.Web/appsettings.json b/src/FastBlog.Web/appsettings.json index 2a21ce4..6c390c7 100644 --- a/src/FastBlog.Web/appsettings.json +++ b/src/FastBlog.Web/appsettings.json @@ -15,7 +15,11 @@ }, "Display": { "Title": "FastBlog", - "Links": { + "LeftLinks": { + "GitHub": "https://github.com", + "Mail": "mailto:mail@example.com" + }, + "RightLinks": { "GitHub": "https://github.com", "Mail": "mailto:mail@example.com" }