From d21a006d57d1b85ce70d3b35bba40a04adb84827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 21 Mar 2021 21:32:15 +0300 Subject: [PATCH] Added EventHub.Web.Theme as the in-solution theme. --- EventHub.sln | 7 ++ .../Bundling/EventHubThemeBundles.cs | 15 +++ .../EventHubThemeGlobalScriptContributor.cs | 12 ++ .../EventHubThemeGlobalStyleContributor.cs | 12 ++ .../EventHub.Web.Theme.csproj | 34 ++++++ src/EventHub.Web.Theme/EventHubTheme.cs | 26 +++++ .../EventHubWebThemeModule.cs | 69 ++++++++++++ .../Pages/_ViewImports.cshtml | 3 + .../EventHub/Components/Brand/Default.cshtml | 9 ++ .../Brand/MainNavbarBrandViewComponent.cs | 13 +++ .../Components/MainNavbar/Default.cshtml | 21 ++++ .../MainNavbar/MainNavbarViewComponent.cs | 13 +++ .../EventHub/Components/Menu/Default.cshtml | 50 +++++++++ .../Menu/MainNavbarMenuViewComponent.cs | 23 ++++ .../EventHub/Components/Menu/_MenuItem.cshtml | 44 ++++++++ .../Components/PageAlerts/Default.cshtml | 16 +++ .../PageAlerts/PageAlertsViewComponent.cs | 21 ++++ .../Components/Toolbar/Default.cshtml | 6 + .../Toolbar/LanguageSwitch/Default.cshtml | 18 +++ .../LanguageSwitchViewComponent.cs | 58 ++++++++++ .../LanguageSwitchViewComponentModel.cs | 12 ++ .../Toolbar/MainNavbarToolsViewComponent.cs | 23 ++++ .../Toolbar/UserMenu/Default.cshtml | 45 ++++++++ .../Toolbar/UserMenu/UserMenuViewComponent.cs | 23 ++++ .../Themes/EventHub/Layouts/Account.cshtml | 106 ++++++++++++++++++ .../EventHub/Layouts/Application.cshtml | 80 +++++++++++++ .../Themes/EventHub/Layouts/Empty.cshtml | 75 +++++++++++++ .../Themes/EventHub/_ViewImports.cshtml | 4 + .../EventHubThemeMainTopToolbarContributor.cs | 39 +++++++ .../Views/_ViewImports.cshtml | 3 + .../wwwroot/themes/eventhub/layout.css | 90 +++++++++++++++ .../wwwroot/themes/eventhub/layout.js | 16 +++ src/EventHub.Web/EventHub.Web.csproj | 3 +- src/EventHub.Web/EventHubWebModule.cs | 9 +- 34 files changed, 992 insertions(+), 6 deletions(-) create mode 100644 src/EventHub.Web.Theme/Bundling/EventHubThemeBundles.cs create mode 100644 src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalScriptContributor.cs create mode 100644 src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalStyleContributor.cs create mode 100644 src/EventHub.Web.Theme/EventHub.Web.Theme.csproj create mode 100644 src/EventHub.Web.Theme/EventHubTheme.cs create mode 100644 src/EventHub.Web.Theme/EventHubWebThemeModule.cs create mode 100644 src/EventHub.Web.Theme/Pages/_ViewImports.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/MainNavbarBrandViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/MainNavbarViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/MainNavbarMenuViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/_MenuItem.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/PageAlertsViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/MainNavbarToolsViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/Default.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/UserMenuViewComponent.cs create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml create mode 100644 src/EventHub.Web.Theme/Themes/EventHub/_ViewImports.cshtml create mode 100644 src/EventHub.Web.Theme/Toolbars/EventHubThemeMainTopToolbarContributor.cs create mode 100644 src/EventHub.Web.Theme/Views/_ViewImports.cshtml create mode 100644 src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.css create mode 100644 src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.js diff --git a/EventHub.sln b/EventHub.sln index 4060a48..10aba77 100644 --- a/EventHub.sln +++ b/EventHub.sln @@ -65,6 +65,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventHub.Admin.HttpApi", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventHub.Admin.HttpApi.Client", "src\EventHub.Admin.HttpApi.Client\EventHub.Admin.HttpApi.Client.csproj", "{C6E4194E-229D-49C9-BDC0-A3E79FD0F50E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventHub.Web.Theme", "src\EventHub.Web.Theme\EventHub.Web.Theme.csproj", "{69BC428E-5C49-4391-9985-0D15523D6922}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -159,6 +161,10 @@ Global {C6E4194E-229D-49C9-BDC0-A3E79FD0F50E}.Debug|Any CPU.Build.0 = Debug|Any CPU {C6E4194E-229D-49C9-BDC0-A3E79FD0F50E}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6E4194E-229D-49C9-BDC0-A3E79FD0F50E}.Release|Any CPU.Build.0 = Release|Any CPU + {69BC428E-5C49-4391-9985-0D15523D6922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69BC428E-5C49-4391-9985-0D15523D6922}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69BC428E-5C49-4391-9985-0D15523D6922}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69BC428E-5C49-4391-9985-0D15523D6922}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -193,6 +199,7 @@ Global {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {F8CF0FE2-9F75-4940-92EC-3D021416DEBF} {72F85686-311E-4411-8A71-103F4A226DDD} = {7016C0D2-D0D5-498B-9FA7-8ABA8F5C39EF} {C6E4194E-229D-49C9-BDC0-A3E79FD0F50E} = {7016C0D2-D0D5-498B-9FA7-8ABA8F5C39EF} + {69BC428E-5C49-4391-9985-0D15523D6922} = {F8CF0FE2-9F75-4940-92EC-3D021416DEBF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D} diff --git a/src/EventHub.Web.Theme/Bundling/EventHubThemeBundles.cs b/src/EventHub.Web.Theme/Bundling/EventHubThemeBundles.cs new file mode 100644 index 0000000..8aa2dea --- /dev/null +++ b/src/EventHub.Web.Theme/Bundling/EventHubThemeBundles.cs @@ -0,0 +1,15 @@ +namespace EventHub.Web.Theme.Bundling +{ + public static class EventHubThemeBundles + { + public static class Styles + { + public const string Global = "EventHub.Global"; + } + + public static class Scripts + { + public const string Global = "EventHub.Global"; + } + } +} \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalScriptContributor.cs b/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalScriptContributor.cs new file mode 100644 index 0000000..bb9d1b1 --- /dev/null +++ b/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalScriptContributor.cs @@ -0,0 +1,12 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace EventHub.Web.Theme.Bundling +{ + public class EventHubThemeGlobalScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.Add("/themes/eventhub/layout.js"); + } + } +} \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalStyleContributor.cs b/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalStyleContributor.cs new file mode 100644 index 0000000..9dcbf1a --- /dev/null +++ b/src/EventHub.Web.Theme/Bundling/EventHubThemeGlobalStyleContributor.cs @@ -0,0 +1,12 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace EventHub.Web.Theme.Bundling +{ + public class EventHubThemeGlobalStyleContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.Add("/themes/eventhub/layout.css"); + } + } +} diff --git a/src/EventHub.Web.Theme/EventHub.Web.Theme.csproj b/src/EventHub.Web.Theme/EventHub.Web.Theme.csproj new file mode 100644 index 0000000..9c7389f --- /dev/null +++ b/src/EventHub.Web.Theme/EventHub.Web.Theme.csproj @@ -0,0 +1,34 @@ + + + + + + net5.0 + true + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + true + Library + true + + + + + + + + + + + + + + + + + + + + diff --git a/src/EventHub.Web.Theme/EventHubTheme.cs b/src/EventHub.Web.Theme/EventHubTheme.cs new file mode 100644 index 0000000..5519143 --- /dev/null +++ b/src/EventHub.Web.Theme/EventHubTheme.cs @@ -0,0 +1,26 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Theming; +using Volo.Abp.DependencyInjection; + +namespace EventHub.Web.Theme +{ + [ThemeName(Name)] + public class EventHubTheme : ITheme, ITransientDependency + { + public const string Name = "EventHub"; + + public virtual string GetLayout(string name, bool fallbackToDefault = true) + { + switch (name) + { + case StandardLayouts.Application: + return "~/Themes/EventHub/Layouts/Application.cshtml"; + case StandardLayouts.Account: + return "~/Themes/EventHub/Layouts/Account.cshtml"; + case StandardLayouts.Empty: + return "~/Themes/EventHub/Layouts/Empty.cshtml"; + default: + return fallbackToDefault ? "~/Themes/EventHub/Layouts/Application.cshtml" : null; + } + } + } +} diff --git a/src/EventHub.Web.Theme/EventHubWebThemeModule.cs b/src/EventHub.Web.Theme/EventHubWebThemeModule.cs new file mode 100644 index 0000000..c6a97a0 --- /dev/null +++ b/src/EventHub.Web.Theme/EventHubWebThemeModule.cs @@ -0,0 +1,69 @@ +using EventHub.Web.Theme.Bundling; +using EventHub.Web.Theme.Toolbars; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; +using Volo.Abp.AspNetCore.Mvc.UI.Theming; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace EventHub.Web.Theme +{ + [DependsOn( + typeof(AbpAspNetCoreMvcUiThemeSharedModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule) + )] + public class EventHubWebThemeModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(EventHubWebThemeModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Themes.Add(); + options.DefaultThemeName = EventHubTheme.Name; + }); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Contributors.Add(new EventHubThemeMainTopToolbarContributor()); + }); + + Configure(options => + { + options + .StyleBundles + .Add(EventHubThemeBundles.Styles.Global, bundle => + { + bundle + .AddBaseBundles(StandardBundles.Styles.Global) + .AddContributors(typeof(EventHubThemeGlobalStyleContributor)); + }); + + options + .ScriptBundles + .Add(EventHubThemeBundles.Scripts.Global, bundle => + { + bundle + .AddBaseBundles(StandardBundles.Scripts.Global) + .AddContributors(typeof(EventHubThemeGlobalScriptContributor)); + }); + }); + } + } +} diff --git a/src/EventHub.Web.Theme/Pages/_ViewImports.cshtml b/src/EventHub.Web.Theme/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..225780c --- /dev/null +++ b/src/EventHub.Web.Theme/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/Default.cshtml new file mode 100644 index 0000000..04a4f81 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/Default.cshtml @@ -0,0 +1,9 @@ +@using Volo.Abp.Ui.Branding +@inject IBrandingProvider BrandingProvider + + @if (!BrandingProvider.LogoUrl.IsNullOrWhiteSpace()) + { + @BrandingProvider.AppName + } + @BrandingProvider.AppName + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/MainNavbarBrandViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/MainNavbarBrandViewComponent.cs new file mode 100644 index 0000000..591e9aa --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Brand/MainNavbarBrandViewComponent.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Brand +{ + public class MainNavbarBrandViewComponent : AbpViewComponent + { + public IViewComponentResult Invoke() + { + return View("~/Themes/EventHub/Components/Brand/Default.cshtml"); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml new file mode 100644 index 0000000..ac2cce1 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml @@ -0,0 +1,21 @@ +@using EventHub.Web.Theme.Themes.EventHub.Components.Brand +@using EventHub.Web.Theme.Themes.EventHub.Components.Menu +@using EventHub.Web.Theme.Themes.EventHub.Components.Toolbar + \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/MainNavbarViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/MainNavbarViewComponent.cs new file mode 100644 index 0000000..97ebb54 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/MainNavbarViewComponent.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.MainNavbar +{ + public class MainNavbarViewComponent : AbpViewComponent + { + public IViewComponentResult Invoke() + { + return View("~/Themes/EventHub/Components/MainNavbar/Default.cshtml"); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/Default.cshtml new file mode 100644 index 0000000..6a7c16d --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/Default.cshtml @@ -0,0 +1,50 @@ +@using Volo.Abp.UI.Navigation +@model ApplicationMenu +@foreach (var menuItem in Model.Items) +{ + var elementId = string.IsNullOrEmpty(menuItem.ElementId) ? string.Empty : $"id=\"{menuItem.ElementId}\""; + var cssClass = string.IsNullOrEmpty(menuItem.CssClass) ? string.Empty : menuItem.CssClass; + var disabled = menuItem.IsDisabled ? "disabled" : string.Empty; + var url = string.IsNullOrEmpty(menuItem.Url) ? "#" : Url.Content(menuItem.Url); + if (menuItem.IsLeaf) + { + if (menuItem.Url != null) + { + + } + } + else + { + + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/MainNavbarMenuViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/MainNavbarMenuViewComponent.cs new file mode 100644 index 0000000..6180e63 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/MainNavbarMenuViewComponent.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.UI.Navigation; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Menu +{ + public class MainNavbarMenuViewComponent : AbpViewComponent + { + private readonly IMenuManager _menuManager; + + public MainNavbarMenuViewComponent(IMenuManager menuManager) + { + _menuManager = menuManager; + } + + public async Task InvokeAsync() + { + var menu = await _menuManager.GetAsync(StandardMenus.Main); + return View("~/Themes/EventHub/Components/Menu/Default.cshtml", menu); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/_MenuItem.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/_MenuItem.cshtml new file mode 100644 index 0000000..b226366 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Menu/_MenuItem.cshtml @@ -0,0 +1,44 @@ +@using Volo.Abp.UI.Navigation +@model ApplicationMenuItem +@{ + var elementId = string.IsNullOrEmpty(Model.ElementId) ? string.Empty : $"id=\"{Model.ElementId}\""; + var cssClass = string.IsNullOrEmpty(Model.CssClass) ? string.Empty : Model.CssClass; + var disabled = Model.IsDisabled ? "disabled" : string.Empty; + var url = string.IsNullOrEmpty(Model.Url) ? "#" : Url.Content(Model.Url); +} +@if (Model.IsLeaf) +{ + if (Model.Url != null) + { + + @if (Model.Icon != null) + { + if (Model.Icon.StartsWith("fa")) + { + + } + } + @Model.DisplayName + + } +} +else +{ + +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/Default.cshtml new file mode 100644 index 0000000..5bbc5b1 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/Default.cshtml @@ -0,0 +1,16 @@ +@model Volo.Abp.AspNetCore.Mvc.UI.Alerts.AlertList +@if (Model.Any()) +{ +
+ @foreach (var alertMessage in Model) + { + + @if (alertMessage.Title != null) + { +

@alertMessage.Title

+ } + @alertMessage.Text +
+ } +
+} \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/PageAlertsViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/PageAlertsViewComponent.cs new file mode 100644 index 0000000..542bceb --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/PageAlerts/PageAlertsViewComponent.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Alerts; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.PageAlerts +{ + public class PageAlertsViewComponent : AbpViewComponent + { + private readonly IAlertManager _alertManager; + + public PageAlertsViewComponent(IAlertManager alertManager) + { + _alertManager = alertManager; + } + + public IViewComponentResult Invoke(string name) + { + return View("~/Themes/EventHub/Components/PageAlerts/Default.cshtml", _alertManager.Alerts); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/Default.cshtml new file mode 100644 index 0000000..f23bd11 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/Default.cshtml @@ -0,0 +1,6 @@ +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars +@model Toolbar +@foreach (var toolbarItem in Model.Items.OrderBy(i => i.Order)) +{ + +} \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/Default.cshtml new file mode 100644 index 0000000..2697ee6 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/Default.cshtml @@ -0,0 +1,18 @@ +@using System.Linq +@using Microsoft.AspNetCore.Http.Extensions +@model EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.LanguageSwitch.LanguageSwitchViewComponentModel +@if (Model.OtherLanguages.Any()) +{ + +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs new file mode 100644 index 0000000..69e2db9 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs @@ -0,0 +1,58 @@ +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.RequestLocalization; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.LanguageSwitch +{ + public class LanguageSwitchViewComponent : AbpViewComponent + { + private readonly ILanguageProvider _languageProvider; + + public LanguageSwitchViewComponent(ILanguageProvider languageProvider) + { + _languageProvider = languageProvider; + } + + public async Task InvokeAsync() + { + var languages = await _languageProvider.GetLanguagesAsync(); + var currentLanguage = languages.FindByCulture( + CultureInfo.CurrentCulture.Name, + CultureInfo.CurrentUICulture.Name + ); + + if (currentLanguage == null) + { + var abpRequestLocalizationOptionsProvider = HttpContext.RequestServices.GetRequiredService(); + var localizationOptions = await abpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync(); + if (localizationOptions.DefaultRequestCulture != null) + { + currentLanguage = new LanguageInfo( + localizationOptions.DefaultRequestCulture.Culture.Name, + localizationOptions.DefaultRequestCulture.UICulture.Name, + localizationOptions.DefaultRequestCulture.UICulture.DisplayName); + } + else + { + currentLanguage = new LanguageInfo( + CultureInfo.CurrentCulture.Name, + CultureInfo.CurrentUICulture.Name, + CultureInfo.CurrentUICulture.DisplayName); + } + } + + var model = new LanguageSwitchViewComponentModel + { + CurrentLanguage = currentLanguage, + OtherLanguages = languages.Where(l => l != currentLanguage).ToList() + }; + + return View("~/Themes/EventHub/Components/Toolbar/LanguageSwitch/Default.cshtml", model); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs new file mode 100644 index 0000000..dbb4ebc --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using Volo.Abp.Localization; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.LanguageSwitch +{ + public class LanguageSwitchViewComponentModel + { + public LanguageInfo CurrentLanguage { get; set; } + + public List OtherLanguages { get; set; } + } +} \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/MainNavbarToolsViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/MainNavbarToolsViewComponent.cs new file mode 100644 index 0000000..240a076 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/MainNavbarToolsViewComponent.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Toolbar +{ + public class MainNavbarToolbarViewComponent : AbpViewComponent + { + private readonly IToolbarManager _toolbarManager; + + public MainNavbarToolbarViewComponent(IToolbarManager toolbarManager) + { + _toolbarManager = toolbarManager; + } + + public async Task InvokeAsync() + { + var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main); + return View("~/Themes/EventHub/Components/Toolbar/Default.cshtml", toolbar); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/Default.cshtml new file mode 100644 index 0000000..06a96ed --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/Default.cshtml @@ -0,0 +1,45 @@ +@using Localization.Resources.AbpUi +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.MultiTenancy +@using Volo.Abp.UI.Navigation +@using Volo.Abp.Users +@inject ICurrentUser CurrentUser +@inject ICurrentTenant CurrentTenant +@inject IHtmlLocalizer L +@model ApplicationMenu + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/UserMenuViewComponent.cs b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/UserMenuViewComponent.cs new file mode 100644 index 0000000..9b77e93 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Toolbar/UserMenu/UserMenuViewComponent.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.UI.Navigation; + +namespace EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.UserMenu +{ + public class UserMenuViewComponent : AbpViewComponent + { + private readonly IMenuManager _menuManager; + + public UserMenuViewComponent(IMenuManager menuManager) + { + _menuManager = menuManager; + } + + public async Task InvokeAsync() + { + var menu = await _menuManager.GetAsync(StandardMenus.User); + return View("~/Themes/EventHub/Components/Toolbar/UserMenu/Default.cshtml", menu); + } + } +} diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml new file mode 100644 index 0000000..16e762a --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml @@ -0,0 +1,106 @@ +@using Microsoft.Extensions.Localization +@using Microsoft.Extensions.Options +@using Volo.Abp.AspNetCore.MultiTenancy +@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook +@using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles +@using Volo.Abp.MultiTenancy +@using Volo.Abp.Localization +@using Volo.Abp.Ui.Branding +@using EventHub.Web.Theme.Bundling +@using EventHub.Web.Theme.Themes.EventHub.Components.MainNavbar +@using EventHub.Web.Theme.Themes.EventHub.Components.PageAlerts +@inject IBrandingProvider BrandingProvider +@inject IOptions MultiTenancyOptions +@inject ICurrentTenant CurrentTenant +@inject IStringLocalizer MultiTenancyStringLocalizer +@inject ITenantResolveResultAccessor TenantResolveResultAccessor + +@{ + Layout = null; + var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options + var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty; +} + + + + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Account) + + + + + + @(ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title) + + @if (ViewBag.Description != null) + { + + } + + + @await RenderSectionAsync("styles", false) + + @await Component.InvokeAsync(typeof(WidgetStylesViewComponent)) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Account) + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Account) + + @(await Component.InvokeAsync()) + +
+ + + @if (MultiTenancyOptions.Value.IsEnabled && + (TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(CookieTenantResolveContributor.ContributorName) == true)) + { +
+
+
+
+ @MultiTenancyStringLocalizer["Tenant"]
+
+ @if (CurrentTenant.Id == null) + { + + @MultiTenancyStringLocalizer["NotSelected"] + + } + else + { + @(CurrentTenant.Name ?? CurrentTenant.Id.Value.ToString()) + } +
+
+ +
+
+
+ } + @(await Component.InvokeAsync()) + @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Account) + @RenderBody() + @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Account) +
+
+
+ + + + + + + @await RenderSectionAsync("scripts", false) + + @await Component.InvokeAsync(typeof(WidgetScriptsViewComponent)) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Account) + + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml new file mode 100644 index 0000000..28476b9 --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml @@ -0,0 +1,80 @@ +@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles +@using Volo.Abp.Localization +@using Volo.Abp.Ui.Branding +@using EventHub.Web.Theme.Bundling +@using EventHub.Web.Theme.Themes.EventHub.Components.MainNavbar +@using EventHub.Web.Theme.Themes.EventHub.Components.PageAlerts +@inject IBrandingProvider BrandingProvider +@inject IPageLayout PageLayout +@{ + Layout = null; + var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options + + var pageTitle = ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title; //TODO: Discard to get from Title + + if (PageLayout.Content.Title != null) + { + if (!string.IsNullOrWhiteSpace(pageTitle)) + { + pageTitle = " | " + pageTitle; + } + + pageTitle = PageLayout.Content.Title + pageTitle; + } + + var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty; +} + + + + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Application) + + + + + + @pageTitle + + + + @await Component.InvokeAsync(typeof(WidgetStylesViewComponent)) + + @await RenderSectionAsync("styles", false) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Application) + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Application) + + @(await Component.InvokeAsync()) + +
+ @(await Component.InvokeAsync()) +
+
+ @RenderSection("content_toolbar", false) +
+
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Application) + @RenderBody() + @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Application) +
+ + + + + + + @await Component.InvokeAsync(typeof(WidgetScriptsViewComponent)) + + @await RenderSectionAsync("scripts", false) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application) + + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml new file mode 100644 index 0000000..fc5d2cf --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml @@ -0,0 +1,75 @@ +@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts +@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles +@using Volo.Abp.Localization +@using Volo.Abp.Ui.Branding +@using EventHub.Web.Theme.Bundling +@using EventHub.Web.Theme.Themes.EventHub.Components.PageAlerts +@inject IBrandingProvider BrandingProvider +@inject IPageLayout PageLayout +@{ + Layout = null; + var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options + + var pageTitle = ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title; //TODO: Discard to get from Title + + if (PageLayout.Content.Title != null) + { + if (!string.IsNullOrWhiteSpace(pageTitle)) + { + pageTitle = " | " + pageTitle; + } + + pageTitle = PageLayout.Content.Title + pageTitle; + } + + var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty; +} + + + + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Empty) + + + + + + @pageTitle + @if (ViewBag.Description != null) + { + + } + + + @await Component.InvokeAsync(typeof(WidgetStylesViewComponent)) + + @await RenderSectionAsync("styles", false) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Empty) + + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Empty) + +
+ @(await Component.InvokeAsync()) + @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Empty) + @RenderBody() + @await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Empty) +
+ + + + + + + @await RenderSectionAsync("scripts", false) + + @await Component.InvokeAsync(typeof(WidgetScriptsViewComponent)) + + @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Empty) + + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/_ViewImports.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/_ViewImports.cshtml new file mode 100644 index 0000000..229004a --- /dev/null +++ b/src/EventHub.Web.Theme/Themes/EventHub/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using System.Globalization +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/src/EventHub.Web.Theme/Toolbars/EventHubThemeMainTopToolbarContributor.cs b/src/EventHub.Web.Theme/Toolbars/EventHubThemeMainTopToolbarContributor.cs new file mode 100644 index 0000000..5f151ab --- /dev/null +++ b/src/EventHub.Web.Theme/Toolbars/EventHubThemeMainTopToolbarContributor.cs @@ -0,0 +1,39 @@ +using System.Threading.Tasks; +using EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.LanguageSwitch; +using EventHub.Web.Theme.Themes.EventHub.Components.Toolbar.UserMenu; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; +using Volo.Abp.Localization; +using Volo.Abp.Users; + +namespace EventHub.Web.Theme.Toolbars +{ + public class EventHubThemeMainTopToolbarContributor : IToolbarContributor + { + public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context) + { + if (context.Toolbar.Name != StandardToolbars.Main) + { + return; + } + + if (!(context.Theme is EventHubTheme)) + { + return; + } + + var languageProvider = context.ServiceProvider.GetRequiredService(); + + var languages = await languageProvider.GetLanguagesAsync(); + if (languages.Count > 1) + { + context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent))); + } + + if (context.ServiceProvider.GetRequiredService().IsAuthenticated) + { + context.Toolbar.Items.Add(new ToolbarItem(typeof(UserMenuViewComponent))); + } + } + } +} diff --git a/src/EventHub.Web.Theme/Views/_ViewImports.cshtml b/src/EventHub.Web.Theme/Views/_ViewImports.cshtml new file mode 100644 index 0000000..225780c --- /dev/null +++ b/src/EventHub.Web.Theme/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.css b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.css new file mode 100644 index 0000000..20c75cf --- /dev/null +++ b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.css @@ -0,0 +1,90 @@ + +#main-navbar-tools a.dropdown-toggle { + text-decoration: none; + color: #fff; +} + +.navbar .dropdown-submenu { + position: relative; +} +.navbar .dropdown-menu { + margin: 0; + padding: 0; +} + .navbar .dropdown-menu a { + font-size: .9em; + padding: 10px 15px; + display: block; + min-width: 210px; + text-align: left; + border-radius: 0.25rem; + min-height: 44px; + } +.navbar .dropdown-submenu a::after { + transform: rotate(-90deg); + position: absolute; + right: 16px; + top: 18px; +} +.navbar .dropdown-submenu .dropdown-menu { + top: 0; + left: 100%; +} + +.card-header .btn { + padding: 2px 6px; +} +.card-header h5 { + margin: 0; +} +.container > .card { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +@media screen and (min-width: 768px) { + .navbar .dropdown:hover > .dropdown-menu { + display: block; + } + + .navbar .dropdown-submenu:hover > .dropdown-menu { + display: block; + } +} +.input-validation-error { + border-color: #dc3545; +} +.field-validation-error { + font-size: 0.8em; +} + +.dataTables_scrollBody { + min-height: 248px; +} + +div.dataTables_wrapper div.dataTables_info { + padding-top: 11px; + white-space: nowrap; +} + +div.dataTables_wrapper div.dataTables_length label { + padding-top: 10px; + margin-bottom: 0; +} + +.rtl .dropdown-menu-right { + right: auto; + left: 0; +} + + .rtl .dropdown-menu-right a { + text-align: right; + } + +.rtl .navbar .dropdown-menu a { + text-align: right; +} +.rtl .navbar .dropdown-submenu .dropdown-menu { + top: 0; + left: auto; + right: 100%; +} diff --git a/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.js b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.js new file mode 100644 index 0000000..8a5b94c --- /dev/null +++ b/src/EventHub.Web.Theme/wwwroot/themes/eventhub/layout.js @@ -0,0 +1,16 @@ +$(function () { + $('.dropdown-menu a.dropdown-toggle').on('click', function (e) { + if (!$(this).next().hasClass('show')) { + $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); + } + + var $subMenu = $(this).next(".dropdown-menu"); + $subMenu.toggleClass('show'); + + $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) { + $('.dropdown-submenu .show').removeClass("show"); + }); + + return false; + }); +}); \ No newline at end of file diff --git a/src/EventHub.Web/EventHub.Web.csproj b/src/EventHub.Web/EventHub.Web.csproj index b38e842..2a3f16c 100644 --- a/src/EventHub.Web/EventHub.Web.csproj +++ b/src/EventHub.Web/EventHub.Web.csproj @@ -17,6 +17,7 @@ + @@ -32,10 +33,8 @@ - - diff --git a/src/EventHub.Web/EventHubWebModule.cs b/src/EventHub.Web/EventHubWebModule.cs index 530c844..aa84655 100644 --- a/src/EventHub.Web/EventHubWebModule.cs +++ b/src/EventHub.Web/EventHubWebModule.cs @@ -9,6 +9,8 @@ using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Protocols.OpenIdConnect; using EventHub.Localization; using EventHub.Web.Menus; +using EventHub.Web.Theme; +using EventHub.Web.Theme.Bundling; using StackExchange.Redis; using Microsoft.OpenApi.Models; using Volo.Abp; @@ -17,8 +19,6 @@ using Volo.Abp.AspNetCore.Authentication.OpenIdConnect; using Volo.Abp.AspNetCore.Mvc.Client; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.AspNetCore.Serilog; @@ -40,7 +40,7 @@ namespace EventHub.Web typeof(EventHubHttpApiClientModule), typeof(AbpAspNetCoreAuthenticationOpenIdConnectModule), typeof(AbpAspNetCoreMvcClientModule), - typeof(AbpAspNetCoreMvcUiBasicThemeModule), + typeof(EventHubWebThemeModule), typeof(AbpAutofacModule), typeof(AbpAutoMapperModule), typeof(AbpCachingStackExchangeRedisModule), @@ -85,7 +85,7 @@ namespace EventHub.Web Configure(options => { options.StyleBundles.Configure( - BasicThemeBundles.Styles.Global, + EventHubThemeBundles.Styles.Global, bundle => { bundle.AddFiles("/global-styles.css"); @@ -156,6 +156,7 @@ namespace EventHub.Web { options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Domain")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Web.Theme")); options.FileSets.ReplaceEmbeddedByPhysical(hostingEnvironment.ContentRootPath); }); }