diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index 873f97d96a..2bc5c64d21 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -16,6 +16,8 @@ using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Authentication.JwtBearer; using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; @@ -46,6 +48,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.Services.GetConfiguration(); var hostingEnvironment = context.Services.GetHostingEnvironment(); + ConfigureBundles(); ConfigureUrls(configuration); ConfigureConventionalControllers(); ConfigureAuthentication(context, configuration); @@ -55,6 +58,20 @@ namespace MyCompanyName.MyProjectName ConfigureSwaggerServices(context); } + private void ConfigureBundles() + { + Configure(options => + { + options.StyleBundles.Configure( + BasicThemeBundles.Styles.Global, + bundle => + { + bundle.AddFiles("/global-styles.css"); + } + ); + }); + } + private void ConfigureUrls(IConfiguration configuration) { Configure(options => @@ -200,4 +217,4 @@ namespace MyCompanyName.MyProjectName app.UseConfiguredEndpoints(); } } -} \ No newline at end of file +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/global-styles.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/global-styles.css new file mode 100644 index 0000000000..e5d20ea346 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/global-styles.css @@ -0,0 +1 @@ +/* Your Global Styles */ diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index ee0d6d7473..e67b25769f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -16,7 +16,9 @@ using Volo.Abp.Account; using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; +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.Serilog; using Volo.Abp.Auditing; @@ -70,6 +72,17 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); }); + Configure(options => + { + options.StyleBundles.Configure( + BasicThemeBundles.Styles.Global, + bundle => + { + bundle.AddFiles("/global-styles.css"); + } + ); + }); + Configure(options => { //options.IsEnabledForGetRequests = true; diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/global-styles.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/global-styles.css new file mode 100644 index 0000000000..e5d20ea346 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/global-styles.css @@ -0,0 +1 @@ +/* Your Global Styles */ diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index 958f39ea0e..bbff4ef4a7 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -18,7 +18,9 @@ using Volo.Abp.AspNetCore.Mvc.Client; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; +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; @@ -76,6 +78,7 @@ namespace MyCompanyName.MyProjectName.Web var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); + ConfigureBundles(); ConfigureCache(configuration); ConfigureRedis(context, configuration, hostingEnvironment); ConfigureUrls(configuration); @@ -87,6 +90,20 @@ namespace MyCompanyName.MyProjectName.Web ConfigureSwaggerServices(context.Services); } + private void ConfigureBundles() + { + Configure(options => + { + options.StyleBundles.Configure( + BasicThemeBundles.Styles.Global, + bundle => + { + bundle.AddFiles("/global-styles.css"); + } + ); + }); + } + private void ConfigureCache(IConfiguration configuration) { Configure(options => diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/global-styles.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/global-styles.css new file mode 100644 index 0000000000..e5d20ea346 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/global-styles.css @@ -0,0 +1 @@ +/* Your Global Styles */ diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 5b7a147345..1483e94a57 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -17,8 +17,10 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; 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.Serilog; using Volo.Abp.Autofac; @@ -73,6 +75,7 @@ namespace MyCompanyName.MyProjectName.Web var configuration = context.Services.GetConfiguration(); ConfigureUrls(configuration); + ConfigureBundles(); ConfigureAuthentication(context, configuration); ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); @@ -90,6 +93,20 @@ namespace MyCompanyName.MyProjectName.Web }); } + private void ConfigureBundles() + { + Configure(options => + { + options.StyleBundles.Configure( + BasicThemeBundles.Styles.Global, + bundle => + { + bundle.AddFiles("/global-styles.css"); + } + ); + }); + } + private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddAuthentication() diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/global-styles.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/global-styles.css new file mode 100644 index 0000000000..e5d20ea346 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/global-styles.css @@ -0,0 +1 @@ +/* Your Global Styles */