diff --git a/MP-STATS.sln b/MP-STATS.sln new file mode 100644 index 00000000..266dbaf1 --- /dev/null +++ b/MP-STATS.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31229.75 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP-STATS", "MP-STATS\MP-STATS.csproj", "{D9901B50-E61C-400C-B62C-FA060CF72C29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MpDataLayer", "MpDataLayer\MpDataLayer.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D9901B50-E61C-400C-B62C-FA060CF72C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9901B50-E61C-400C-B62C-FA060CF72C29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9901B50-E61C-400C-B62C-FA060CF72C29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9901B50-E61C-400C-B62C-FA060CF72C29}.Release|Any CPU.Build.0 = Release|Any CPU + {10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {632D11D1-088B-4795-97E5-048534002558} + EndGlobalSection +EndGlobal diff --git a/MP-STATS/Components/CmpFooter.razor b/MP-STATS/Components/CmpFooter.razor new file mode 100644 index 00000000..71530453 --- /dev/null +++ b/MP-STATS/Components/CmpFooter.razor @@ -0,0 +1,18 @@ +
+
+ MP-STATS v.@version +
+
+ @adesso +
+
+ powered by Egalware +
+
+ +@code { + protected DateTime adesso = DateTime.Now; + + Version version = typeof(Program).Assembly.GetName().Version; + +} \ No newline at end of file diff --git a/MP-STATS/Components/CmpTop.razor b/MP-STATS/Components/CmpTop.razor new file mode 100644 index 00000000..4128b284 --- /dev/null +++ b/MP-STATS/Components/CmpTop.razor @@ -0,0 +1,52 @@ +@using MP_STATS.Components +@using System.Security.Claims +@using Microsoft.AspNetCore.Components.Authorization + +@inject AuthenticationStateProvider AuthenticationStateProvider + +
+
+ @userName +
+
+
+
+ @if (ShowSearch) + { + + } +
+
+ +@code { + + [CascadingParameter(Name = "ShowSearch")] + private bool ShowSearch { get; set; } + + private string userName = ""; + + protected override async Task OnInitializedAsync() + { + await forceReload(); + } + + private async Task forceReload() + { + + var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); + var user = authState.User; + + if (user.Identity.IsAuthenticated) + { + userName = $"{user.Identity.Name}"; + } + else + { + userName = "N.A."; + } + } +} + +@* // Vedere anche: + // https://docs.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-5.0#:~:text=Blazor%20uses%20the%20existing%20ASP.NET%20Core%20authentication%20mechanisms,all%20client-side%20code%20can%20be%20modified%20by%20users + // https://docs.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-5.0*@ \ No newline at end of file diff --git a/MP-STATS/Components/DataPager.razor b/MP-STATS/Components/DataPager.razor new file mode 100644 index 00000000..8516e5d9 --- /dev/null +++ b/MP-STATS/Components/DataPager.razor @@ -0,0 +1,21 @@ +
+ +
+ + @*# record*@ +
+
+ +@code { + + [Parameter] + public int numRecord { get; set; } = 10; + + [Parameter] + public EventCallback numRecordChanged { get; set; } + + private async Task reportChange() + { + await numRecordChanged.InvokeAsync(numRecord); + } +} \ No newline at end of file diff --git a/MP-STATS/Components/HomeButton.razor b/MP-STATS/Components/HomeButton.razor new file mode 100644 index 00000000..a95e548a --- /dev/null +++ b/MP-STATS/Components/HomeButton.razor @@ -0,0 +1,16 @@ + + + @Descript + + +@code { + + [Parameter] + public string Icon { get; set; } + + [Parameter] + public string NavLink { get; set; } + + [Parameter] + public string Descript { get; set; } +} \ No newline at end of file diff --git a/MP-STATS/Components/SearchMod.razor b/MP-STATS/Components/SearchMod.razor new file mode 100644 index 00000000..85d0eb95 --- /dev/null +++ b/MP-STATS/Components/SearchMod.razor @@ -0,0 +1,41 @@ +@using MP_STATS.Components +@using MP_STATS.Data +@inject MessageService MessageService + +
+ +
+ +
+
+ +@code { + + [Parameter] + public EventCallback searchUpdated { get; set; } + + [Parameter] + public string searchVal + { + get + { + return MessageService.SearchVal; + } + set + { + MessageService.SearchVal = value; + reportChange(); + } + } + + private void reportChange() + { + searchUpdated.InvokeAsync(searchVal); + } + + private void reset() + { + searchVal = ""; + } + +} \ No newline at end of file diff --git a/MP-STATS/Data/MessageService.cs b/MP-STATS/Data/MessageService.cs new file mode 100644 index 00000000..0ea09851 --- /dev/null +++ b/MP-STATS/Data/MessageService.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace MP_STATS.Data +{ + public class MessageService + { + #region Private Fields + + private string searchVal; + private bool showSearch; + + #endregion Private Fields + + #region Public Events + + public event Action EA_HideSearch; + + public event Action EA_SearchUpdated; + + public event Action EA_ShowSearch; + + #endregion Public Events + + #region Public Properties + + public string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + + if (EA_SearchUpdated != null) + { + EA_SearchUpdated?.Invoke(); + } + } + } + } + + public bool ShowSearch + { + get => showSearch; + set + { + if (showSearch != value) + { + showSearch = value; + if (showSearch) + { + if (EA_ShowSearch != null) + { + EA_ShowSearch?.Invoke(); + } + } + else + { + if (EA_HideSearch != null) + { + EA_HideSearch?.Invoke(); + } + } + } + } + } + + #endregion Public Properties + + #region Protected Methods + + protected void ReportSearch() + { + if (EA_SearchUpdated != null) + { + EA_SearchUpdated?.Invoke(); + } + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-STATS/MP-STATS.csproj b/MP-STATS/MP-STATS.csproj index 911e0580..f16d772f 100644 --- a/MP-STATS/MP-STATS.csproj +++ b/MP-STATS/MP-STATS.csproj @@ -1,8 +1,21 @@ - + - - net5.0 - MP_STATS - + + net5.0 + MP_STATS + - + + + + + + + + + + + PreserveNewest + + + \ No newline at end of file diff --git a/MP-STATS/Pages/Controlli.razor b/MP-STATS/Pages/Controlli.razor new file mode 100644 index 00000000..80019b0d --- /dev/null +++ b/MP-STATS/Pages/Controlli.razor @@ -0,0 +1,5 @@ +

Controlli

+ +@code { + +} diff --git a/MP-STATS/Pages/Index.razor b/MP-STATS/Pages/Index.razor index e54d9143..2762d330 100644 --- a/MP-STATS/Pages/Index.razor +++ b/MP-STATS/Pages/Index.razor @@ -1,7 +1,48 @@ @page "/" -

Hello, world!

+@using MP_STATS.Components +@using MP_STATS.Data -Welcome to your new app. +
+
+
+

MP STATS

+
+ Modulo Statistiche per MoonPro +
+
+
+
+ | | | | | | +
+
+
+
+
+
+
+
+
@Anno
+
+
+
+
+
+
+
+ + + + @**@ + + +
+
+
+
+
- +@code { + + private int Anno { get; set; } = DateTime.Today.Year; +} \ No newline at end of file diff --git a/MP-STATS/Pages/Scarti.razor b/MP-STATS/Pages/Scarti.razor new file mode 100644 index 00000000..31e1f24d --- /dev/null +++ b/MP-STATS/Pages/Scarti.razor @@ -0,0 +1,5 @@ +

Scarti

+ +@code { + +} diff --git a/MP-STATS/Pages/_Host.cshtml b/MP-STATS/Pages/_Host.cshtml index 0b5cdcf0..499c43d3 100644 --- a/MP-STATS/Pages/_Host.cshtml +++ b/MP-STATS/Pages/_Host.cshtml @@ -1,4 +1,6 @@ @page "/" +@using System.Globalization +@using Microsoft.AspNetCore.Localization @namespace MP_STATS.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ diff --git a/MP-STATS/Pages/_Host.cshtml.bak b/MP-STATS/Pages/_Host.cshtml.bak new file mode 100644 index 00000000..0b5cdcf0 --- /dev/null +++ b/MP-STATS/Pages/_Host.cshtml.bak @@ -0,0 +1,35 @@ +@page "/" +@namespace MP_STATS.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@{ + Layout = null; +} + + + + + + + MP-STATS + + + + + + + + +
+ + An error has occurred. This application may no longer respond until reloaded. + + + An unhandled exception has occurred. See browser dev tools for details. + + Reload + 🗙 +
+ + + + diff --git a/MP-STATS/Shared/MainLayout.razor b/MP-STATS/Shared/MainLayout.razor index 2281c4f7..0604e969 100644 --- a/MP-STATS/Shared/MainLayout.razor +++ b/MP-STATS/Shared/MainLayout.razor @@ -1,17 +1,59 @@ @inherits LayoutComponentBase +@using MP_STATS.Data +@using MP_STATS.Components +@inject MessageService MessageService +@implements IDisposable +
-
-
- About + +
+
+ +
+
+ @Body +
+
+ +
- -
- @Body -
-
+
+ +@code { + bool ShowSearch { get; set; } = false; + + protected override void OnInitialized() + { + MessageService.EA_ShowSearch += OnShowSearch; + MessageService.EA_HideSearch += OnHideSearch; + } + public void OnShowSearch() + { + ShowSearch = true; + InvokeAsync(() => + { + StateHasChanged(); + }); + } + public void OnHideSearch() + { + ShowSearch = false; + InvokeAsync(() => + { + StateHasChanged(); + }); + } + + public void Dispose() + { + MessageService.EA_ShowSearch -= OnShowSearch; + MessageService.EA_ShowSearch -= OnHideSearch; + } + +} \ No newline at end of file diff --git a/MP-STATS/Shared/MainLayout.razor.css b/MP-STATS/Shared/MainLayout.razor.css index 43c355a4..83f592d8 100644 --- a/MP-STATS/Shared/MainLayout.razor.css +++ b/MP-STATS/Shared/MainLayout.razor.css @@ -9,15 +9,15 @@ } .sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); + background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%); } .top-row { background-color: #f7f7f7; border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; height: 3.5rem; - display: flex; + /*justify-content: space-evenly; + display: flex;*/ align-items: center; } @@ -31,6 +31,26 @@ text-overflow: ellipsis; } +.bottom-row { + color: #dedede; + background-color: #000000; + /*border-bottom: 1px solid #313131;*/ + /*justify-content: flex-end;*/ + height: 2rem; + /*display: flex;*/ + align-items: center; +} + + .bottom-row ::deep a, .top-row .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + } + + .bottom-row a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + @media (max-width: 640.98px) { .top-row:not(.auth) { display: none; @@ -63,8 +83,14 @@ z-index: 1; } + .bottom-row { + position: fixed; + bottom: 0; + z-index: 1; + } + .main > div { padding-left: 2rem !important; padding-right: 1.5rem !important; } -} +} \ No newline at end of file diff --git a/MP-STATS/Shared/NavMenu.razor b/MP-STATS/Shared/NavMenu.razor index 7c1633b5..c7710983 100644 --- a/MP-STATS/Shared/NavMenu.razor +++ b/MP-STATS/Shared/NavMenu.razor @@ -12,16 +12,36 @@ Home + @**@ + + @* + *@
@@ -34,4 +54,4 @@ { collapseNavMenu = !collapseNavMenu; } -} +} \ No newline at end of file diff --git a/MP-STATS/Shared/SurveyPrompt.razor b/MP-STATS/Shared/SurveyPrompt.razor deleted file mode 100644 index 66edfb87..00000000 --- a/MP-STATS/Shared/SurveyPrompt.razor +++ /dev/null @@ -1,16 +0,0 @@ - - -@code { - // Demonstrates how a parent component can supply parameters - [Parameter] - public string Title { get; set; } -} diff --git a/MP-STATS/Startup.cs b/MP-STATS/Startup.cs index 4a5e50f8..278ea222 100644 --- a/MP-STATS/Startup.cs +++ b/MP-STATS/Startup.cs @@ -11,6 +11,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Localization; +using System.Globalization; + namespace MP_STATS { public class Startup @@ -26,8 +29,15 @@ namespace MP_STATS // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { + + + services.AddLocalization(); + services.AddRazorPages(); services.AddServerSideBlazor(); + //services.AddSingleton(); + //services.AddScoped(); + services.AddScoped(); services.AddSingleton(); } @@ -45,6 +55,17 @@ namespace MP_STATS app.UseHsts(); } + // cultura IT... + var supportedCultures = new[]{ + new CultureInfo("it-IT") + }; + app.UseRequestLocalization(new RequestLocalizationOptions + { + DefaultRequestCulture = new RequestCulture("it-IT"), + SupportedCultures = supportedCultures, + FallBackToParentCultures = false + }); + CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); app.UseHttpsRedirection(); app.UseStaticFiles(); diff --git a/MP-STATS/Startup.cs.bak b/MP-STATS/Startup.cs.bak new file mode 100644 index 00000000..137eb51f --- /dev/null +++ b/MP-STATS/Startup.cs.bak @@ -0,0 +1,74 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using MP_STATS.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +using Microsoft.AspNetCore.Localization; +using System.Globalization; + +namespace MP_STATS +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + services.AddRazorPages(); + services.AddServerSideBlazor(); + services.AddSingleton(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + + // cultura IT... + var supportedCultures = new[]{ + new CultureInfo("it-IT") + }; + app.UseRequestLocalization(new RequestLocalizationOptions + { + DefaultRequestCulture = new RequestCulture("it-IT"), + SupportedCultures = supportedCultures, + FallBackToParentCultures = false + }); + CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); + app.UseHttpsRedirection(); + app.UseStaticFiles(); + + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapBlazorHub(); + endpoints.MapFallbackToPage("/_Host"); + }); + } + } +} diff --git a/MP-STATS/appsettings.Production.json b/MP-STATS/appsettings.Production.json new file mode 100644 index 00000000..298577c1 --- /dev/null +++ b/MP-STATS/appsettings.Production.json @@ -0,0 +1,13 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;", + "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;" +} \ No newline at end of file diff --git a/MP-STATS/appsettings.Staging.json b/MP-STATS/appsettings.Staging.json new file mode 100644 index 00000000..298577c1 --- /dev/null +++ b/MP-STATS/appsettings.Staging.json @@ -0,0 +1,13 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;", + "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;" +} \ No newline at end of file diff --git a/MP-STATS/appsettings.json b/MP-STATS/appsettings.json index d9d9a9bf..93a81b25 100644 --- a/MP-STATS/appsettings.json +++ b/MP-STATS/appsettings.json @@ -1,10 +1,12 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;", + "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;" +} \ No newline at end of file diff --git a/MP-STATS/appsettings.json.bak b/MP-STATS/appsettings.json.bak new file mode 100644 index 00000000..d9d9a9bf --- /dev/null +++ b/MP-STATS/appsettings.json.bak @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/MP-STATS/logs/.placeholder b/MP-STATS/logs/.placeholder new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/MP-STATS/logs/.placeholder @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MP-STATS/post-build.ps1 b/MP-STATS/post-build.ps1 new file mode 100644 index 00000000..625f16ba --- /dev/null +++ b/MP-STATS/post-build.ps1 @@ -0,0 +1,11 @@ +param([string]$ProjectDir, [string]$ProjectPath); + +$MajMin="1.0." +$currentDate = get-date -format yyMM; +$currentTime = get-date -format HHmm; +$find = "(.|\n)*?"; +$replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; +$csproj = Get-Content $ProjectPath +$csprojUpdated = $csproj -replace $find, $replace + +Set-Content -Path $ProjectPath -Value $csprojUpdated \ No newline at end of file diff --git a/MP-STATS/wwwroot/css/fonts.css b/MP-STATS/wwwroot/css/fonts.css new file mode 100644 index 00000000..d4fc1a26 --- /dev/null +++ b/MP-STATS/wwwroot/css/fonts.css @@ -0,0 +1,20 @@ +/* lato-regular - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: url('../fonts/lato-v17-latin-regular.eot'); + /* IE9 Compat Modes */ + src: local(''), url('../fonts/lato-v17-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts/lato-v17-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('../fonts/lato-v17-latin-regular.woff') format('woff'), /* Modern Browsers */ url('../fonts/lato-v17-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts/lato-v17-latin-regular.svg#Lato') format('svg'); + /* Legacy iOS */ +} +/* roboto-regular - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: url('../fonts/roboto-v27-latin-regular.eot'); + /* IE9 Compat Modes */ + src: local(''), url('../fonts/roboto-v27-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('../fonts/roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */ url('../fonts/roboto-v27-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); + /* Legacy iOS */ +} \ No newline at end of file diff --git a/MP-STATS/wwwroot/css/fonts.less b/MP-STATS/wwwroot/css/fonts.less new file mode 100644 index 00000000..3f6c81ba --- /dev/null +++ b/MP-STATS/wwwroot/css/fonts.less @@ -0,0 +1,24 @@ +/* lato-regular - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: url('../fonts/lato-v17-latin-regular.eot'); /* IE9 Compat Modes */ + src: local(''), url('../fonts/lato-v17-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/lato-v17-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/lato-v17-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/lato-v17-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/lato-v17-latin-regular.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* roboto-regular - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: url('../fonts/roboto-v27-latin-regular.eot'); /* IE9 Compat Modes */ + src: local(''), url('../fonts/roboto-v27-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/roboto-v27-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */ +} \ No newline at end of file diff --git a/MP-STATS/wwwroot/css/site.css b/MP-STATS/wwwroot/css/site.css index caebf2a4..d2034e4d 100644 --- a/MP-STATS/wwwroot/css/site.css +++ b/MP-STATS/wwwroot/css/site.css @@ -1,50 +1,156 @@ -@import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); - -html, body { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +@import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); +@import url('fonts.min.css'); +h1, +h2, +h3, +h4, +h5, +h6, +b { + font-family: 'Roboto', sans-serif; } - -a, .btn-link { - color: #0366d6; +html, +body { + font-family: 'Lato', sans-serif; +} +a, +.btn-link { + color: #0366d6; } - .btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; } - .content { - padding-top: 1.1rem; + padding-top: 1.1rem; } - .valid.modified:not([type=checkbox]) { - outline: 1px solid #26b050; + outline: 1px solid #26b050; } - .invalid { - outline: 1px solid red; + outline: 1px solid red; } - .validation-message { - color: red; + color: red; } - #blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; } - - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; +} +/*------------------------------------------------------------------ +[ Shortcuts / .shortcuts ] +*/ +.shortcuts { + text-align: center; +} +.shortcuts .shortcut-icon { + font-size: 2rem; +} +.shortcuts .shortcut { + min-width: 9rem; + min-height: 5rem; + display: inline-block; + padding: 0.66666667rem 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: 0.5rem; +} +.shortcuts .shortcut-sm { + min-width: 4.5rem; + min-height: 3rem; + display: inline-block; + padding: 0.25rem 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: 0.5rem; +} +.shortcuts .shortcut .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: 2rem; + color: #333; +} +.shortcuts .shortcut-sm .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: 2rem; + color: #333; +} +.shortcuts .shortcut:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); +} +.shortcuts .shortcut-sm:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); +} +.shortcuts .shortcut:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.shortcuts .shortcut-sm:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.shortcuts .shortcut:hover .shortcut-icon { + color: #C93; +} +.shortcuts .shortcut-sm:hover .shortcut-icon { + color: #666; +} +.shortcuts .shortcut-label { + display: block; + margin-top: 0.75em; + font-weight: 400; + color: #666; +} +@media (max-width: 992px) { + .shortcuts .shortcut { + min-width: 8rem; + min-height: 4rem; + } +} \ No newline at end of file diff --git a/MP-STATS/wwwroot/css/site.less b/MP-STATS/wwwroot/css/site.less new file mode 100644 index 00000000..218dff25 --- /dev/null +++ b/MP-STATS/wwwroot/css/site.less @@ -0,0 +1,175 @@ +@import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); +@import url('fonts.min.css'); + +h1, h2, h3, h4, h5, h6, b { + font-family: 'Roboto', sans-serif; +} + +html, body { + font-family: 'Lato', sans-serif; +} + +a, .btn-link { + color: #0366d6; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.content { + padding-top: 1.1rem; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid red; +} + +.validation-message { + color: red; +} + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; +} + +/*------------------------------------------------------------------ +[ Shortcuts / .shortcuts ] +*/ + +@blSCut: 1rem; + +.shortcuts { + text-align: center; +} + +.shortcuts .shortcut-icon { + font-size: 2*@blSCut; +} + +.shortcuts .shortcut { + min-width: @blSCut * 9; + min-height: @blSCut * 5; + display: inline-block; + padding: @blSCut*2/3 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: @blSCut/2; +} + +.shortcuts .shortcut-sm { + min-width: @blSCut * 4.5; + min-height: @blSCut * 3; + display: inline-block; + padding: @blSCut/4 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: @blSCut/2; +} + +.shortcuts .shortcut .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: @blSCut*2; + color: #333; +} + +.shortcuts .shortcut-sm .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: @blSCut*2; + color: #333; +} + +.shortcuts .shortcut:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); +} + +.shortcuts .shortcut-sm:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); +} + +.shortcuts .shortcut:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +.shortcuts .shortcut-sm:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +.shortcuts .shortcut:hover .shortcut-icon { + color: #C93; +} + +.shortcuts .shortcut-sm:hover .shortcut-icon { + color: #666; +} + +.shortcuts .shortcut-label { + display: block; + margin-top: .75em; + font-weight: 400; + color: #666; +} + +@media (max-width: 992px) { + .shortcuts .shortcut { + min-width: @blSCut * 8; + min-height: @blSCut * 4; + } +} \ No newline at end of file diff --git a/MP-STATS/wwwroot/favicon.ico b/MP-STATS/wwwroot/favicon.ico index 63e859b4..70ccadaf 100644 Binary files a/MP-STATS/wwwroot/favicon.ico and b/MP-STATS/wwwroot/favicon.ico differ diff --git a/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.eot b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.eot new file mode 100644 index 00000000..c6413069 Binary files /dev/null and b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.eot differ diff --git a/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.svg b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.svg new file mode 100644 index 00000000..55b43fb8 --- /dev/null +++ b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.ttf b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.ttf new file mode 100644 index 00000000..3c2d417e Binary files /dev/null and b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.ttf differ diff --git a/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff new file mode 100644 index 00000000..189a0feb Binary files /dev/null and b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff differ diff --git a/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff2 b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff2 new file mode 100644 index 00000000..6904b664 Binary files /dev/null and b/MP-STATS/wwwroot/fonts/lato-v17-latin-regular.woff2 differ diff --git a/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.eot b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.eot new file mode 100644 index 00000000..6dd5e3a0 Binary files /dev/null and b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.eot differ diff --git a/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.svg b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.svg new file mode 100644 index 00000000..627f5a36 --- /dev/null +++ b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.ttf b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.ttf new file mode 100644 index 00000000..637971a1 Binary files /dev/null and b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.ttf differ diff --git a/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff new file mode 100644 index 00000000..86b38637 Binary files /dev/null and b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff differ diff --git a/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff2 b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff2 new file mode 100644 index 00000000..ebe1795f Binary files /dev/null and b/MP-STATS/wwwroot/fonts/roboto-v27-latin-regular.woff2 differ diff --git a/MP-STATS/wwwroot/img/LogoBlu.svg b/MP-STATS/wwwroot/img/LogoBlu.svg new file mode 100644 index 00000000..20a55c39 --- /dev/null +++ b/MP-STATS/wwwroot/img/LogoBlu.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MP-STATS/wwwroot/js/debounce.js b/MP-STATS/wwwroot/js/debounce.js new file mode 100644 index 00000000..36556c3a --- /dev/null +++ b/MP-STATS/wwwroot/js/debounce.js @@ -0,0 +1,5 @@ +import _ from 'https://cdn.skypack.dev/lodash'; + +export function helloWorld() { + prompt(_.VERSION); +} \ No newline at end of file diff --git a/MP-STATS/wwwroot/js/external.js b/MP-STATS/wwwroot/js/external.js new file mode 100644 index 00000000..e6e3102a --- /dev/null +++ b/MP-STATS/wwwroot/js/external.js @@ -0,0 +1,10 @@ +window.global = { + openModal: function (modalId) { + modalId = '#' + modalId; + $(modalId).modal('show'); + }, + closeModal: function (modalId) { + modalId = '#' + modalId; + $(modalId).modal('hide'); + }, +} \ No newline at end of file diff --git a/MpDataLayer/Class1.cs b/MpDataLayer/Class1.cs new file mode 100644 index 00000000..ef37b930 --- /dev/null +++ b/MpDataLayer/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace MpDataLayer +{ + public class Class1 + { + } +} diff --git a/MpDataLayer/MpDataLayer.csproj b/MpDataLayer/MpDataLayer.csproj new file mode 100644 index 00000000..f208d303 --- /dev/null +++ b/MpDataLayer/MpDataLayer.csproj @@ -0,0 +1,7 @@ + + + + net5.0 + + +