diff --git a/BlueWest.Authorization/BlueWest.Authorization.csproj b/BlueWest.Authorization/BlueWest.Authorization.csproj new file mode 100644 index 0000000..6108b7b --- /dev/null +++ b/BlueWest.Authorization/BlueWest.Authorization.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/BlueWest.Authorization/Controllers/WeatherForecastController.cs b/BlueWest.Authorization/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..18749ed --- /dev/null +++ b/BlueWest.Authorization/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Authorization.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/BlueWest.Authorization/Program.cs b/BlueWest.Authorization/Program.cs new file mode 100644 index 0000000..48863a6 --- /dev/null +++ b/BlueWest.Authorization/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/BlueWest.Authorization/Properties/launchSettings.json b/BlueWest.Authorization/Properties/launchSettings.json new file mode 100644 index 0000000..6d1f5d4 --- /dev/null +++ b/BlueWest.Authorization/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:23917", + "sslPort": 44315 + } + }, + "profiles": { + "BlueWest.Authorization": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7246;http://localhost:5269", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/BlueWest.Authorization/WeatherForecast.cs b/BlueWest.Authorization/WeatherForecast.cs new file mode 100644 index 0000000..fb3694a --- /dev/null +++ b/BlueWest.Authorization/WeatherForecast.cs @@ -0,0 +1,12 @@ +namespace BlueWest.Authorization; + +public class WeatherForecast +{ + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } +} diff --git a/BlueWest.Authorization/appsettings.Development.json b/BlueWest.Authorization/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/BlueWest.Authorization/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/BlueWest.Authorization/appsettings.json b/BlueWest.Authorization/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/BlueWest.Authorization/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/BlueWest.Razor.Library/BlueWest.Razor.Library.csproj b/BlueWest.Razor.Library/BlueWest.Razor.Library.csproj new file mode 100644 index 0000000..66942bc --- /dev/null +++ b/BlueWest.Razor.Library/BlueWest.Razor.Library.csproj @@ -0,0 +1,18 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + diff --git a/BlueWest.Razor.Library/Component1.razor b/BlueWest.Razor.Library/Component1.razor new file mode 100644 index 0000000..51d3876 --- /dev/null +++ b/BlueWest.Razor.Library/Component1.razor @@ -0,0 +1,3 @@ +
+ This component is defined in the BlueWest.Razor.Library library. +
\ No newline at end of file diff --git a/BlueWest.Razor.Library/Component1.razor.css b/BlueWest.Razor.Library/Component1.razor.css new file mode 100644 index 0000000..c6afca4 --- /dev/null +++ b/BlueWest.Razor.Library/Component1.razor.css @@ -0,0 +1,6 @@ +.my-component { + border: 2px dashed red; + padding: 1em; + margin: 1em 0; + background-image: url('background.png'); +} diff --git a/BlueWest.Razor.Library/ExampleJsInterop.cs b/BlueWest.Razor.Library/ExampleJsInterop.cs new file mode 100644 index 0000000..d1bac27 --- /dev/null +++ b/BlueWest.Razor.Library/ExampleJsInterop.cs @@ -0,0 +1,36 @@ +using Microsoft.JSInterop; + +namespace BlueWest.Razor.Library; + +// This class provides an example of how JavaScript functionality can be wrapped +// in a .NET class for easy consumption. The associated JavaScript module is +// loaded on demand when first needed. +// +// This class can be registered as scoped DI service and then injected into Blazor +// components for use. + +public class ExampleJsInterop : IAsyncDisposable +{ + private readonly Lazy> moduleTask; + + public ExampleJsInterop(IJSRuntime jsRuntime) + { + moduleTask = new(() => jsRuntime.InvokeAsync( + "import", "./_content/BlueWest.Razor.Library/exampleJsInterop.js").AsTask()); + } + + public async ValueTask Prompt(string message) + { + var module = await moduleTask.Value; + return await module.InvokeAsync("showPrompt", message); + } + + public async ValueTask DisposeAsync() + { + if (moduleTask.IsValueCreated) + { + var module = await moduleTask.Value; + await module.DisposeAsync(); + } + } +} \ No newline at end of file diff --git a/BlueWest.Razor.Library/_Imports.razor b/BlueWest.Razor.Library/_Imports.razor new file mode 100644 index 0000000..c3615ef --- /dev/null +++ b/BlueWest.Razor.Library/_Imports.razor @@ -0,0 +1 @@ +@using Microsoft.AspNetCore.Components.Web \ No newline at end of file diff --git a/BlueWest.Razor.Library/wwwroot/background.png b/BlueWest.Razor.Library/wwwroot/background.png new file mode 100644 index 0000000..e15a3bd Binary files /dev/null and b/BlueWest.Razor.Library/wwwroot/background.png differ diff --git a/BlueWest.Razor.Library/wwwroot/exampleJsInterop.js b/BlueWest.Razor.Library/wwwroot/exampleJsInterop.js new file mode 100644 index 0000000..ea8d76a --- /dev/null +++ b/BlueWest.Razor.Library/wwwroot/exampleJsInterop.js @@ -0,0 +1,6 @@ +// This is a JavaScript module that is loaded on demand. It can export any number of +// functions, and may import other JavaScript modules if required. + +export function showPrompt(message) { + return prompt(message, 'Type anything here'); +} diff --git a/BlueWest.Views/BlueWest.Views.csproj b/BlueWest.Views/BlueWest.Views.csproj index 55d4277..2a7bff8 100644 --- a/BlueWest.Views/BlueWest.Views.csproj +++ b/BlueWest.Views/BlueWest.Views.csproj @@ -8,6 +8,10 @@ BlueWest.Views + + + + @@ -58,6 +62,37 @@ <_ContentIncludedByDefault Remove="wwwroot\lib\bootstrap\dist\js\bootstrap.min.js" /> <_ContentIncludedByDefault Remove="wwwroot\lib\bootstrap\dist\js\bootstrap.min.js.map" /> <_ContentIncludedByDefault Remove="wwwroot\lib\bootstrap\LICENSE" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation-unobtrusive\LICENSE.txt" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation\dist\additional-methods.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation\dist\additional-methods.min.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation\dist\jquery.validate.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation\dist\jquery.validate.min.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery-validation\LICENSE.md" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery\dist\jquery.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery\dist\jquery.min.js" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery\dist\jquery.min.map" /> + <_ContentIncludedByDefault Remove="wwwroot\lib\jquery\LICENSE.txt" /> + <_ContentIncludedByDefault Remove="Views\Data\Roles\Index.cshtml" /> + + + + + + + + + true + PreserveNewest + PreserveNewest + + + + + + + diff --git a/BlueWest.Views/Controllers/AuthController.cs b/BlueWest.Views/Controllers/AuthController.cs new file mode 100644 index 0000000..95c9255 --- /dev/null +++ b/BlueWest.Views/Controllers/AuthController.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers +{ + public class AuthController : Controller + { + + } +} + diff --git a/BlueWest.Views/Controllers/CapitalController.cs b/BlueWest.Views/Controllers/CapitalController.cs deleted file mode 100644 index ca39237..0000000 --- a/BlueWest.Views/Controllers/CapitalController.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Diagnostics; -using BlueWest.Views.Models; -using Microsoft.AspNetCore.Mvc; - -namespace BlueWest.Views.Controllers -{ - public class CapitalController : Controller - { - - public IActionResult Index() - { - return View(); - } - - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier}); - } - } - -} - diff --git a/BlueWest.Views/Controllers/Data/BanksController.cs b/BlueWest.Views/Controllers/Data/BanksController.cs new file mode 100644 index 0000000..b062b04 --- /dev/null +++ b/BlueWest.Views/Controllers/Data/BanksController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers.Data; + +public class BanksController : Controller +{ + // GET + public IActionResult Index() + { + return View(); + } +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/Data/CompaniesController.cs b/BlueWest.Views/Controllers/Data/CompaniesController.cs new file mode 100644 index 0000000..4f71133 --- /dev/null +++ b/BlueWest.Views/Controllers/Data/CompaniesController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class CompaniesController : Controller +{ + // GET + public IActionResult Index() + { + return View("../Data/Companies/Index"); + } +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/Data/CountriesController.cs b/BlueWest.Views/Controllers/Data/CountriesController.cs new file mode 100644 index 0000000..d63b2ff --- /dev/null +++ b/BlueWest.Views/Controllers/Data/CountriesController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class CountriesController : Controller +{ + // GET + public IActionResult Index() + { + return View("../Data/Countries/Index"); + } +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/Data/CurrenciesController.cs b/BlueWest.Views/Controllers/Data/CurrenciesController.cs new file mode 100644 index 0000000..79ba8bd --- /dev/null +++ b/BlueWest.Views/Controllers/Data/CurrenciesController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class CurrenciesController : Controller +{ + +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/Data/DataController.cs b/BlueWest.Views/Controllers/Data/DataController.cs new file mode 100644 index 0000000..b1b2cc3 --- /dev/null +++ b/BlueWest.Views/Controllers/Data/DataController.cs @@ -0,0 +1,17 @@ +using BlueWest.Views.Utils; +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers +{ + + public class DataController : Controller + { + public IActionResult Index() + { + this.HandleGlobalization(); + ViewData[FooterMenuId] = LayoutCache.DataRoute.Children; + return View(); + } + + } +} diff --git a/BlueWest.Views/Controllers/HomeController.cs b/BlueWest.Views/Controllers/HomeController.cs index bd553f0..6c626bb 100644 --- a/BlueWest.Views/Controllers/HomeController.cs +++ b/BlueWest.Views/Controllers/HomeController.cs @@ -1,31 +1,24 @@ -using System.Diagnostics; -using Microsoft.AspNetCore.Mvc; -using BlueWest.Views.Models; +using Microsoft.AspNetCore.Mvc; +using BlueWest.Views.Utils; +using Microsoft.Extensions.Options; +using Controller = Microsoft.AspNetCore.Mvc.Controller; namespace BlueWest.Views.Controllers; +[System.Web.Mvc.Route("/")] public class HomeController : Controller { private readonly ILogger _logger; - public HomeController(ILogger logger) + public HomeController(ILogger logger, IOptions options) { _logger = logger; } - + public IActionResult Index() { + this.HandleGlobalization(); return View(); } - public IActionResult Privacy() - { - return View(); - } - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier}); - } } \ No newline at end of file diff --git a/BlueWest.Views/Controllers/JobsController.cs b/BlueWest.Views/Controllers/JobsController.cs new file mode 100644 index 0000000..f9fae66 --- /dev/null +++ b/BlueWest.Views/Controllers/JobsController.cs @@ -0,0 +1,33 @@ +using System.Diagnostics; +using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; +using BlueWest.Views.Models; +using BlueWest.Views.Utils; +using Controller = Microsoft.AspNetCore.Mvc.Controller; + +namespace BlueWest.Views.Controllers; + +public class JobsController : Controller +{ + private readonly ILogger _logger; + + public JobsController(ILogger logger) + { + _logger = logger; + } + + public IActionResult Index() + { + this.HandleGlobalization(); + ViewData["Title"] = "Home Page"; + + return View(); + } + + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier}); + } +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/System/ApplicationUsersController.cs b/BlueWest.Views/Controllers/System/ApplicationUsersController.cs new file mode 100644 index 0000000..2c8e8d2 --- /dev/null +++ b/BlueWest.Views/Controllers/System/ApplicationUsersController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class ApplicationUsersController : Controller +{ + +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/System/DataUsersController.cs b/BlueWest.Views/Controllers/System/DataUsersController.cs new file mode 100644 index 0000000..4148341 --- /dev/null +++ b/BlueWest.Views/Controllers/System/DataUsersController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class DataUsersController : Controller +{ + +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/System/LogsController.cs b/BlueWest.Views/Controllers/System/LogsController.cs new file mode 100644 index 0000000..cafb210 --- /dev/null +++ b/BlueWest.Views/Controllers/System/LogsController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class LogsController : Controller +{ + +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/System/RolesController.cs b/BlueWest.Views/Controllers/System/RolesController.cs new file mode 100644 index 0000000..b3d3bb9 --- /dev/null +++ b/BlueWest.Views/Controllers/System/RolesController.cs @@ -0,0 +1,14 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +[System.Web.Mvc.Route($"{SystemRouteLocation}/roles")] + +public class RolesController : Controller +{ + // GET + public IActionResult Index() + { + return View("../System/Roles/Index"); + } +} \ No newline at end of file diff --git a/BlueWest.Views/Controllers/SystemController.cs b/BlueWest.Views/Controllers/System/SystemController.cs similarity index 78% rename from BlueWest.Views/Controllers/SystemController.cs rename to BlueWest.Views/Controllers/System/SystemController.cs index e379122..78dfafa 100644 --- a/BlueWest.Views/Controllers/SystemController.cs +++ b/BlueWest.Views/Controllers/System/SystemController.cs @@ -1,3 +1,4 @@ +using BlueWest.Views.Utils; using Microsoft.AspNetCore.Mvc; namespace BlueWest.Views.Controllers @@ -14,6 +15,8 @@ namespace BlueWest.Views.Controllers public IActionResult Index() { + this.HandleGlobalization(); + ViewData[FooterMenuId] = LayoutCache.SystemRoute.Children; return View(); } @@ -21,15 +24,6 @@ namespace BlueWest.Views.Controllers { return View(); } - - public IActionResult Roles() - { - return View(); - } - - - - } } diff --git a/BlueWest.Views/Controllers/UsersController.cs b/BlueWest.Views/Controllers/UsersController.cs new file mode 100644 index 0000000..af5bf4c --- /dev/null +++ b/BlueWest.Views/Controllers/UsersController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Controllers; + +public class UsersController : Controller +{ + +} \ No newline at end of file diff --git a/BlueWest.Views/GlobalUsings.cs b/BlueWest.Views/GlobalUsings.cs new file mode 100644 index 0000000..7105e0b --- /dev/null +++ b/BlueWest.Views/GlobalUsings.cs @@ -0,0 +1,3 @@ +// Global using directives + +global using static BlueWest.Views.Utils.Routes; \ No newline at end of file diff --git a/BlueWest.Views/Languages/CultureSwitch.cs b/BlueWest.Views/Languages/CultureSwitch.cs new file mode 100644 index 0000000..01c7633 --- /dev/null +++ b/BlueWest.Views/Languages/CultureSwitch.cs @@ -0,0 +1,9 @@ +using System.Globalization; + +namespace BlueWest.Localization.Models; + +public class CultureSwitch +{ + public CultureInfo CurrentUICulture { get; set; } + public List SupportedCultures { get; set; } +} \ No newline at end of file diff --git a/BlueWest.Views/Languages/CultureSwitchViewComponent.cs b/BlueWest.Views/Languages/CultureSwitchViewComponent.cs new file mode 100644 index 0000000..cebde1f --- /dev/null +++ b/BlueWest.Views/Languages/CultureSwitchViewComponent.cs @@ -0,0 +1,27 @@ +using BlueWest.Localization.Models; +using Microsoft.AspNetCore.Localization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.Extensions.Options; + +namespace BlueWest.Views.Localization.ViewComponents; + +public class CultureSwitchViewComponent : ViewComponent +{ + private readonly IOptions localizationOptions; + public CultureSwitchViewComponent(IOptions localizationOptions) => + this.localizationOptions = localizationOptions; + + // public IViewComponentResult Invoke() + // { + // var cultureFeature = HttpContext.Features.Get(); + // var model = new CultureSwitch() + // { + // SupportedCultures = localizationOptions.Value.SupportedUICultures.ToList(), + // CurrentUICulture = cultureFeature.RequestCulture.UICulture + // }; + // return View(model); + // } + + +} \ No newline at end of file diff --git a/BlueWest.Views/Models/SystemPageModel.cs b/BlueWest.Views/Models/SystemPageModel.cs deleted file mode 100644 index c25a049..0000000 --- a/BlueWest.Views/Models/SystemPageModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace BlueWest.Views.Models -{ - public class SystemPageModel - { - - } -} - diff --git a/BlueWest.Views/Models/UserPageModel.cs b/BlueWest.Views/Models/UserPageModel.cs deleted file mode 100644 index 226c227..0000000 --- a/BlueWest.Views/Models/UserPageModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace BlueWest.Views.Models -{ - public class UserPageModel : PageModel - { - - } -} - diff --git a/BlueWest.Views/Program.cs b/BlueWest.Views/Program.cs index 5cd7c7e..8e2c1ce 100644 --- a/BlueWest.Views/Program.cs +++ b/BlueWest.Views/Program.cs @@ -1,6 +1,26 @@ +using BlueWest.Views.Utils; +using System.Globalization; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Localization; +using Microsoft.Extensions.Options; + + var builder = WebApplication.CreateBuilder(args); +builder.Services.AddSingleton(); // Add services to the container. + +builder.Services.Configure(options => +{ + // This lambda determines whether user consent for non-essential cookies is needed for a given request. + options.CheckConsentNeeded = context => true; + options.MinimumSameSitePolicy = SameSiteMode.None; +}); +builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) + .AddCookie(cookieOptions => { + cookieOptions.LoginPath = "/"; +}); + builder.Services.AddControllersWithViews(); var app = builder.Build(); @@ -18,6 +38,14 @@ app.UseStaticFiles(); app.UseRouting(); +app.UseRequestLocalization(options => +{ + var supportedCultures = CultureInfo.GetCultures(CultureTypes.AllCultures); + options.DefaultRequestCulture = new RequestCulture("en-GB"); + options.SupportedCultures = supportedCultures; + options.SupportedUICultures = supportedCultures; +}); + app.UseAuthorization(); app.MapControllerRoute( diff --git a/BlueWest.Views/Utils/ControllerExtensions.cs b/BlueWest.Views/Utils/ControllerExtensions.cs new file mode 100644 index 0000000..7ed48f8 --- /dev/null +++ b/BlueWest.Views/Utils/ControllerExtensions.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Localization; +using Microsoft.AspNetCore.Mvc; + +namespace BlueWest.Views.Utils; + +public static class ControllerExtensions +{ + public static void HandleGlobalization(this Controller controller) + { + var context = controller.HttpContext; + var requestCultureFeature = context.Features.Get(); + var currentCultureName = Routes.DefaultCultureName; + if (requestCultureFeature != null) + { + currentCultureName = requestCultureFeature.RequestCulture.Culture.Name; + } + + controller.ViewData[LanguageViewStorage] = currentCultureName; + } + + public static void HandlePageName(this Controller controller, string location) + { + + } + + +} \ No newline at end of file diff --git a/BlueWest.Views/Utils/LayoutCache.cs b/BlueWest.Views/Utils/LayoutCache.cs new file mode 100644 index 0000000..32ad35a --- /dev/null +++ b/BlueWest.Views/Utils/LayoutCache.cs @@ -0,0 +1,180 @@ +using BlueWest.Views.Controllers; +using BlueWest.Views.Controllers.Data; +using Microsoft.AspNetCore.Mvc.ViewFeatures; + +namespace BlueWest.Views.Utils; + +internal class LayoutCache +{ + #region Route Tree + + private static readonly RouteRecord Root = new RouteRecord( + RootKeyName, + RootLocation, + nameof(HomeController), + new List() + { + new RouteRecord( + DataKeyName, + DataLocation, + nameof(DataController), + new List() + { + new RouteRecord( + CompaniesKeyName, + CompaniesLocation, + nameof(CompaniesController), + new List() + ), + new RouteRecord( + CountriesKeyName, + CountriesLocation, + nameof(CountriesController), + new List() + ), + new RouteRecord( + CurrenciesKeyName, + CurrenciesLocation, + nameof(CurrenciesController), + new List() + ), + new RouteRecord( + BanksKeyName, + BanksLocation, + nameof(BanksController), + new List() + ), + new RouteRecord( + DataUsersKeyName, + DataUsersLocation, + nameof(DataUsersController), + new List() + ), + + }, + ViewType.Data + ), + new RouteRecord( + SystemKeyName, + SystemRouteLocation, + nameof(SystemController), + new List() + { + new RouteRecord( + RolesKeyName, + RolesLocation, + nameof(RolesController), + new List() + ), + new RouteRecord( + ApplicationUsersKeyName, + ApplicationUsersLocation, + nameof(ApplicationUsersController), + new List() + ), + new RouteRecord( + LogsKeyName, + LogsLocation, + nameof(LogsController), + new List() + ) + }, + ViewType.System + ), + new RouteRecord( + JobsKeyName, + JobsRouteLocation, + nameof(JobsController), + new List(), + ViewType.Jobs + ), + }, ViewType.Root); + + #endregion Route Tree + + #region Routing Utils + + internal static readonly RouteRecord SystemRoute = + Root.Children.FirstOrDefault(x => x.ViewType == ViewType.System)!; + + internal static readonly RouteRecord DataRoute = + Root.Children.FirstOrDefault(x => x.ViewType == ViewType.Data)!; + + internal static readonly RouteRecord JobRoute = + Root.Children.FirstOrDefault(x => x.ViewType == ViewType.Jobs)!; + + internal static readonly RouteRecord ProfileRoute = + Root.Children.FirstOrDefault(x => x.ViewType == ViewType.Profile)!; + + #endregion Routing Utils + + #region Internal Menus + + internal static List GetDefaultFooterMenu(ViewDataDictionary dictionary) + { + var location = GetLocation(dictionary); + + var menu = LayoutCache + .Root + .Children; + + if (dictionary[FooterMenuId] is List footerMenu) + { + menu = footerMenu; + } + + return menu + .Select(x => + { + if (Translation[x.routeKey].ContainsKey(location)) + { + return new RouteView(Translation[x.routeKey][location], + location); + } + return new RouteView(Translation[x.routeKey][DefaultCultureName], + x.location); + + }) + + .ToList(); + + } + + internal static List GetDefaultHeaderMenu(ViewDataDictionary dictionary) + { + var location = GetLocation(dictionary); + + var menu = LayoutCache + .Root + .Children; + + if (dictionary[HeaderMenuId] is List footerMenu) + { + menu = footerMenu; + } + + return menu + .Select(x => + { + if (Translation[x.routeKey].ContainsKey(location)) + { + return new RouteView(Translation[x.routeKey][location], + x.Location); + } + return new RouteView(Translation[x.routeKey][DefaultCultureName], + x.location); + + }) + + .ToList(); + } + + internal static string GetLocation(ViewDataDictionary dictionary) + { + return (dictionary[LanguageViewStorage] as string)!; + } + + + #endregion Internal Menus + +} \ No newline at end of file diff --git a/BlueWest.Views/Utils/LinkViewInformation.cs b/BlueWest.Views/Utils/LinkViewInformation.cs new file mode 100644 index 0000000..58327f6 --- /dev/null +++ b/BlueWest.Views/Utils/LinkViewInformation.cs @@ -0,0 +1,13 @@ +namespace BlueWest.Views.Utils; + +public record LinkViewInformation +{ + public string Location; + public string Name; + + public LinkViewInformation(LinkViewInformation linkInformation) + { + Location = linkInformation.Location; + Name = linkInformation.Name; + } +} \ No newline at end of file diff --git a/BlueWest.Views/Utils/Menus.cs b/BlueWest.Views/Utils/Menus.cs new file mode 100644 index 0000000..e66bd30 --- /dev/null +++ b/BlueWest.Views/Utils/Menus.cs @@ -0,0 +1,7 @@ +namespace BlueWest.Views.Utils.Static; + +public static class Menus +{ + internal const string FooterMenuId = "m1"; + internal const string HeaderMenuId = "m2"; +} \ No newline at end of file diff --git a/BlueWest.Views/Utils/RouteRecord.cs b/BlueWest.Views/Utils/RouteRecord.cs new file mode 100644 index 0000000..7cf9220 --- /dev/null +++ b/BlueWest.Views/Utils/RouteRecord.cs @@ -0,0 +1,14 @@ +namespace BlueWest.Views.Utils +{ + public record RouteRecord(string routeKey, string location, string controllerName, List children, ViewType viewType = ViewType.Undefined) + { + public string RouteKey = routeKey; + public string Location = location; + public string ControllerName; + public List Children = children; + public ViewType ViewType = viewType; + } + + public record RouteView(string Name, string Location); +} + diff --git a/BlueWest.Views/Utils/Routes.cs b/BlueWest.Views/Utils/Routes.cs new file mode 100644 index 0000000..5bcbe8d --- /dev/null +++ b/BlueWest.Views/Utils/Routes.cs @@ -0,0 +1,190 @@ +using System.Collections.Immutable; + +namespace BlueWest.Views.Utils +{ + internal static class Routes + { + public const string DefaultCultureName = "en-gb"; + + #region Layout Keys + + internal const string FooterMenuId = "m1"; + internal const string HeaderMenuId = "m2"; + internal const string LanguageViewStorage = "i80"; + + #endregion Layout Keys + + #region Route Keys + + internal const string DataKeyName = "data"; + internal const string RootKeyName = "root"; + internal const string RootLocation = "/"; + + internal const string SystemKeyName = "system"; + internal const string RolesKeyName = "roles"; + internal const string CompaniesKeyName = "companies"; + internal const string CountriesKeyName = "countries"; + internal const string CurrenciesKeyName = "currencies"; + internal const string IndustriesKeyName = "industries"; + internal const string DataUsersKeyName = "users"; + internal const string BanksKeyName = "banks"; + internal const string JobsKeyName = "jobs"; + internal const string SettingsKeyName = "settings"; + internal const string LogsKeyName = "logs"; + internal const string ApplicationUsersKeyName = "app_users"; + + #endregion Route Keys + // Translation Database Keys + + #region Routes Data + + // Routes + internal const string RolesLocation = $"{SystemRouteLocation}/roles"; + internal const string ApplicationUsersLocation = $"{SystemRouteLocation}/users"; + internal const string LogsLocation = $"{SystemRouteLocation}/logs"; + internal const string SettingsRouteLocation = $"{SystemRouteLocation}/settings"; + internal const string DataLocation = $"/data"; + + + // Banks + + // Data users + internal const string DataUsersLocation = "/data/users"; + internal const string JobsRouteLocation = "/jobs"; + internal const string SystemRouteLocation = $"/system"; + internal const string BanksLocation = $"{DataLocation}/banks"; + internal const string CountriesLocation = $"{DataLocation}/countries"; + internal const string CurrenciesLocation = $"{DataLocation}/currencies"; + + internal const string CompaniesLocation = $"{DataLocation}/companies"; + internal const string IndustriesLocation = $"{DataLocation}/industries"; + + + #endregion Routes Data + + internal static Dictionary> Translation = + new Dictionary> + { + { + RootKeyName, new Dictionary() + { + {"pt", "Inicio"}, + {"eng", "Home"}, + {"en-gb", "Home"} + } + }, + { + SystemKeyName, new Dictionary() + { + {"pt", "Sistema"}, + {"eng", "System"}, + {"en-gb", "System"}, + } + }, + { + DataKeyName, new Dictionary() + { + {"pt", "Dados"}, + {"eng", "Data"}, + {"en-gb", "Data"} + } + }, + + { + RolesKeyName, new Dictionary() + { + {"pt", "Tipos de Utilizador"}, + {"en-gb", "Roles"}, + {"eng", "Roles"} + } + }, + { + ApplicationUsersKeyName, new Dictionary() + { + {"pt", "Utilizadores da Aplicação"}, + {"en-gb", "Users"}, + {"eng", "Users"} + } + }, + { + LogsKeyName, new Dictionary() + { + {"pt", "Logs"}, + {"en-gb", "logs"}, + {"eng", "logs"} + } + }, + { + SettingsKeyName, new Dictionary() + { + {"pt", "Personalização"}, + {"eng", "Settings"}, + {"en-gb", "Settings"}, + } + }, + { + CompaniesKeyName, new Dictionary() + { + {"pt", "Empresas"}, + {"eng", "Companies"}, + {"en-gb", "Companies"}, + } + }, + + { + IndustriesKeyName, new Dictionary() + { + {"pt", "Indústrias"}, + {"en-gb", "Industries"}, + {"eng", "Industries"}, + } + }, + + { + CurrenciesKeyName, new Dictionary() + { + {"pt", "Moedas"}, + {"en-gb", "Currencies"}, + {"eng", "Currencies"}, + } + }, + { + CountriesKeyName, new Dictionary() + { + {"pt", "Países"}, + {"eng", "Countries"}, + {"en-gb", "Countries"} + } + }, + + { + BanksKeyName, new Dictionary() + { + {"pt", "Bancos"}, + {"eng", "Banks"}, + {"en-gb", "Banks"}, + } + }, + + + { + DataUsersKeyName, new Dictionary() + { + {"pt", "Utilizadores"}, + {"eng", "Users"}, + {"en-gb", "Users"}, + } + }, + + { + JobsKeyName, new Dictionary() + { + {"pt", "Anúncios de trabalho"}, + {"eng", "Jobs"}, + {"en-gb", "Jobs"}, + } + }, + }; + + } +} \ No newline at end of file diff --git a/BlueWest.Views/Utils/ViewType.cs b/BlueWest.Views/Utils/ViewType.cs new file mode 100644 index 0000000..9792d33 --- /dev/null +++ b/BlueWest.Views/Utils/ViewType.cs @@ -0,0 +1,16 @@ +using System.Collections.Immutable; + +namespace BlueWest.Views +{ + public enum ViewType + { + System, + Data, + Jobs, + Profile, + Root, + Undefined + + } +} + diff --git a/BlueWest.Views/Views/Banks/Index.cshtml b/BlueWest.Views/Views/Banks/Index.cshtml new file mode 100644 index 0000000..64fcda5 --- /dev/null +++ b/BlueWest.Views/Views/Banks/Index.cshtml @@ -0,0 +1,18 @@ +@model dynamic + +@{ + Layout = null; +} + + + + + + title + + +
+ +
+ + \ No newline at end of file diff --git a/BlueWest.Views/Views/Capital/Index.cshtml b/BlueWest.Views/Views/Capital/Index.cshtml deleted file mode 100644 index d69d51d..0000000 --- a/BlueWest.Views/Views/Capital/Index.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
-

Capital

-

Learn about building Web apps with ASP.NET Core.

-
\ No newline at end of file diff --git a/BlueWest.Views/Views/Data/Companies/Index.cshtml b/BlueWest.Views/Views/Data/Companies/Index.cshtml new file mode 100644 index 0000000..7ab5168 --- /dev/null +++ b/BlueWest.Views/Views/Data/Companies/Index.cshtml @@ -0,0 +1,11 @@ +@using BlueWest.Views.Utils +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Companies Module

+
+ + +@Html.Partial("_FooterMenu"); \ No newline at end of file diff --git a/BlueWest.Views/Views/Data/Countries/Index.cshtml b/BlueWest.Views/Views/Data/Countries/Index.cshtml new file mode 100644 index 0000000..9cadfef --- /dev/null +++ b/BlueWest.Views/Views/Data/Countries/Index.cshtml @@ -0,0 +1,11 @@ +@using BlueWest.Views.Utils +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Data Module

+
+ + +@Html.Partial("_FooterMenu"); \ No newline at end of file diff --git a/BlueWest.Views/Views/Data/Index.cshtml b/BlueWest.Views/Views/Data/Index.cshtml new file mode 100644 index 0000000..9cadfef --- /dev/null +++ b/BlueWest.Views/Views/Data/Index.cshtml @@ -0,0 +1,11 @@ +@using BlueWest.Views.Utils +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Data Module

+
+ + +@Html.Partial("_FooterMenu"); \ No newline at end of file diff --git a/BlueWest.Views/Views/Home/Index.cshtml b/BlueWest.Views/Views/Home/Index.cshtml index 378bcad..9ff16ec 100644 --- a/BlueWest.Views/Views/Home/Index.cshtml +++ b/BlueWest.Views/Views/Home/Index.cshtml @@ -1,8 +1,32 @@ -@{ +@using Microsoft.AspNetCore.Localization +@{ ViewData["Title"] = "Home Page"; + } +

Welcome

Learn about building Web apps with ASP.NET Core.

-
\ No newline at end of file + + + + + + + + + + + + + + +
Date@DateTime.Now.ToLongDateString()
Currency + @(12345.00.ToString("c")) +
Number + @(123.45m.ToString("F2")) +
+ + + diff --git a/BlueWest.Views/Views/Jobs/Index.cshtml b/BlueWest.Views/Views/Jobs/Index.cshtml new file mode 100644 index 0000000..15108b4 --- /dev/null +++ b/BlueWest.Views/Views/Jobs/Index.cshtml @@ -0,0 +1,10 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Data Module

+
+ + +@Html.Partial("_FooterMenu"); \ No newline at end of file diff --git a/BlueWest.Views/Views/Shared/UsersMenu.cshtml b/BlueWest.Views/Views/Shared/UsersMenu.cshtml new file mode 100644 index 0000000..d223537 --- /dev/null +++ b/BlueWest.Views/Views/Shared/UsersMenu.cshtml @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/BlueWest.Views/Views/Shared/_FooterMenu.cshtml b/BlueWest.Views/Views/Shared/_FooterMenu.cshtml new file mode 100644 index 0000000..38340e1 --- /dev/null +++ b/BlueWest.Views/Views/Shared/_FooterMenu.cshtml @@ -0,0 +1,31 @@ +@using BlueWest.Views.Utils +@{ + Layout = null; + var menu = LayoutCache.GetDefaultFooterMenu(ViewData); +} + + \ No newline at end of file diff --git a/BlueWest.Views/Views/Shared/_HeaderMenu.cshtml b/BlueWest.Views/Views/Shared/_HeaderMenu.cshtml index 4c181fe..e3da6c8 100644 --- a/BlueWest.Views/Views/Shared/_HeaderMenu.cshtml +++ b/BlueWest.Views/Views/Shared/_HeaderMenu.cshtml @@ -1 +1,23 @@ -BlueWest.Views +@using BlueWest.Views.Utils +@{ + Layout = null; + var menu = LayoutCache.GetDefaultHeaderMenu(ViewData); +} + +
+
+ @if (menu is {Count: > 0 }) + { + @foreach (var record in menu) + { + +
+
@record.Name
+
+
+
+ } + } + +
+
\ No newline at end of file diff --git a/BlueWest.Views/Views/Shared/_Layout.cshtml b/BlueWest.Views/Views/Shared/_Layout.cshtml index a12d29d..11d3916 100644 --- a/BlueWest.Views/Views/Shared/_Layout.cshtml +++ b/BlueWest.Views/Views/Shared/_Layout.cshtml @@ -5,70 +5,39 @@ @ViewData["Title"] - BlueWest.Views + @* - + *@ + + -
+ @RenderBody() +
-
    -
-
-
-
- -
+
+ @await Html.PartialAsync("_HeaderMenu") +
-
- @RenderBody() - -
+
+
+ @RenderBody() +
+
- - @await RenderSectionAsync("Scripts", required: false) \ No newline at end of file diff --git a/BlueWest.Views/Views/Shared/_Layout.cshtml.css b/BlueWest.Views/Views/Shared/_Layout.cshtml.css index 8233901..5f28270 100644 --- a/BlueWest.Views/Views/Shared/_Layout.cshtml.css +++ b/BlueWest.Views/Views/Shared/_Layout.cshtml.css @@ -1,24 +1 @@ - -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - display: inline-block; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - direction: ltr; - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} \ No newline at end of file + \ No newline at end of file diff --git a/BlueWest.Views/Views/System/Index.cshtml b/BlueWest.Views/Views/System/Index.cshtml index 866d0e0..bf4c02d 100644 --- a/BlueWest.Views/Views/System/Index.cshtml +++ b/BlueWest.Views/Views/System/Index.cshtml @@ -1,8 +1,12 @@ +@using BlueWest.Views.Utils @{ ViewData["Title"] = "Home Page"; }
-

System

-

Learn about building Web apps with ASP.NET Core.

-
\ No newline at end of file +

System Module

+
+ + +@await Html.PartialAsync("_FooterMenu"); + diff --git a/BlueWest.Views/Views/System/Roles.cshtml b/BlueWest.Views/Views/System/Roles.cshtml deleted file mode 100644 index 7c7ab12..0000000 --- a/BlueWest.Views/Views/System/Roles.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
-

Roles

-

Learn about building Web apps with ASP.NET Core.

-
\ No newline at end of file diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt b/BlueWest.Views/Views/System/Roles/Index.cshtml similarity index 100% rename from BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt rename to BlueWest.Views/Views/System/Roles/Index.cshtml diff --git a/BlueWest.Views/Views/System/Users.cshtml b/BlueWest.Views/Views/System/Users.cshtml index 4eb867e..3ddff00 100644 --- a/BlueWest.Views/Views/System/Users.cshtml +++ b/BlueWest.Views/Views/System/Users.cshtml @@ -5,4 +5,6 @@ \ No newline at end of file + + +@Html.Partial("~/Views/Shared/UsersMenu.cshtml"); diff --git a/BlueWest.Views/Views/_ViewImports.cshtml b/BlueWest.Views/Views/_ViewImports.cshtml index bd5e964..4235cfe 100644 --- a/BlueWest.Views/Views/_ViewImports.cshtml +++ b/BlueWest.Views/Views/_ViewImports.cshtml @@ -1,3 +1,8 @@ -@using BlueWest.Views +@using System.Globalization +@using BlueWest.Views @using BlueWest.Views.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@using BlueWest.Localization +@using BlueWest.Localization.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Localisation \ No newline at end of file diff --git a/BlueWest.Views/Web.config b/BlueWest.Views/Web.config new file mode 100644 index 0000000..70bad99 --- /dev/null +++ b/BlueWest.Views/Web.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/BlueWest.Views/wwwroot/css/site.css b/BlueWest.Views/wwwroot/css/site.css deleted file mode 100644 index f27e5ad..0000000 --- a/BlueWest.Views/wwwroot/css/site.css +++ /dev/null @@ -1,18 +0,0 @@ -html { - font-size: 14px; -} - -@media (min-width: 768px) { - html { - font-size: 16px; - } -} - -html { - position: relative; - min-height: 100%; -} - -body { - margin-bottom: 60px; -} \ No newline at end of file diff --git a/BlueWest.Views/wwwroot/js/site.js b/BlueWest.Views/wwwroot/js/site.js deleted file mode 100644 index ac49c18..0000000 --- a/BlueWest.Views/wwwroot/js/site.js +++ /dev/null @@ -1,4 +0,0 @@ -// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification -// for details on configuring this project to bundle and minify static web assets. - -// Write your JavaScript code. diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/BlueWest.Views/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation/LICENSE.md b/BlueWest.Views/wwwroot/lib/jquery-validation/LICENSE.md deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation/dist/additional-methods.js b/BlueWest.Views/wwwroot/lib/jquery-validation/dist/additional-methods.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/BlueWest.Views/wwwroot/lib/jquery-validation/dist/additional-methods.min.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/BlueWest.Views/wwwroot/lib/jquery-validation/dist/jquery.validate.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/BlueWest.Views/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery/LICENSE.txt b/BlueWest.Views/wwwroot/lib/jquery/LICENSE.txt deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.js b/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.min.js b/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.min.js deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.min.map b/BlueWest.Views/wwwroot/lib/jquery/dist/jquery.min.map deleted file mode 100644 index e69de29..0000000 diff --git a/BlueWest.Views/wwwroot/static/main.css b/BlueWest.Views/wwwroot/static/main.css index 0466284..67d0ed8 100644 --- a/BlueWest.Views/wwwroot/static/main.css +++ b/BlueWest.Views/wwwroot/static/main.css @@ -1,4 +1,29 @@ +.router-link-active { + text-decoration: none !important; +} +.material-icons { + font-family: 'Material Icons', "Roboto", "-apple-system", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: normal; + font-style: normal; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} /* * Normalizing -- forked from Normalize.css v8 * */ *, *:before, *:after { @@ -2928,7 +2953,7 @@ body.mobile .q-textarea .q-field__native, .q-layout { width: 100%; - height: 99.8%; + height: 100%; } .q-layout-container { diff --git a/BlueWest.sln b/BlueWest.sln index 3720d68..7ed2058 100644 --- a/BlueWest.sln +++ b/BlueWest.sln @@ -41,6 +41,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Views", "BlueWest. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Domain", "BlueWest.Domain\BlueWest.Domain.csproj", "{1085FF6E-E568-441E-9A2D-23F50AB613AF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Razor.Library", "BlueWest.Razor.Library\BlueWest.Razor.Library.csproj", "{CA6DF60F-B33E-4688-A4ED-4427B446E852}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +93,10 @@ Global {1085FF6E-E568-441E-9A2D-23F50AB613AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {1085FF6E-E568-441E-9A2D-23F50AB613AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {1085FF6E-E568-441E-9A2D-23F50AB613AF}.Release|Any CPU.Build.0 = Release|Any CPU + {CA6DF60F-B33E-4688-A4ED-4427B446E852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA6DF60F-B33E-4688-A4ED-4427B446E852}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA6DF60F-B33E-4688-A4ED-4427B446E852}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA6DF60F-B33E-4688-A4ED-4427B446E852}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE