diff --git a/Template.Maui/wwwroot/index.html b/Template.Maui/wwwroot/index.html index dbdc694..9c832fe 100644 --- a/Template.Maui/wwwroot/index.html +++ b/Template.Maui/wwwroot/index.html @@ -51,6 +51,7 @@ + diff --git a/Template.Shared/Components/Layout/HeaderLayout.razor b/Template.Shared/Components/Layout/HeaderLayout.razor index b447692..afde371 100644 --- a/Template.Shared/Components/Layout/HeaderLayout.razor +++ b/Template.Shared/Components/Layout/HeaderLayout.razor @@ -1,6 +1,6 @@ @inject IJSRuntime JS -
+
@if (Back) { @@ -22,11 +22,17 @@ { @if (ShowFilter) { - + } - @if (ShowCalendarToggle) + + @* @if (ShowCalendarToggle) { + } *@ + + @if (ShowProfile) + { + } } else @@ -45,8 +51,9 @@ @code{ [Parameter] public string? Title { get; set; } [Parameter] public bool ShowFilter { get; set; } - [Parameter] public bool ShowNotifications { get; set; } = true; + [Parameter] public bool ShowProfile { get; set; } = true; [Parameter] public bool Back { get; set; } + [Parameter] public bool BackOnTop { get; set; } [Parameter] public string BackTo { get; set; } = ""; [Parameter] public EventCallback OnFilterToggle { get; set; } @@ -74,7 +81,9 @@ } await JS.InvokeVoidAsync("goBack"); - } + private void OpenPersonalInfo() => + NavigationManager.NavigateTo("/PersonalInfo"); + } \ No newline at end of file diff --git a/Template.Shared/Components/Layout/HeaderLayout.razor.css b/Template.Shared/Components/Layout/HeaderLayout.razor.css index 77750ce..5d06b34 100644 --- a/Template.Shared/Components/Layout/HeaderLayout.razor.css +++ b/Template.Shared/Components/Layout/HeaderLayout.razor.css @@ -6,8 +6,6 @@ position: relative; } -.header-content.with-back { margin: .6rem 0 0 0; } - .header-content.with-back .page-title { position: absolute; left: 50%; @@ -16,14 +14,10 @@ font-size: larger; } -.left-section ::deep button, .right-section ::deep button { - font-size: 1.1rem; -} +.right-section { min-height: 45px; } -.left-section ::deep .mud-button-icon-start { - margin-right: 3px !important; -} +.left-section ::deep button, .right-section ::deep button { font-size: 1.1rem; } -.header-content.no-back .page-title { - margin: 0; -} \ No newline at end of file +.left-section ::deep .mud-button-icon-start { margin-right: 3px !important; } + +.header-content.no-back .page-title { margin: 0; } \ No newline at end of file diff --git a/Template.Shared/Components/Layout/NavMenu.razor b/Template.Shared/Components/Layout/NavMenu.razor index 0756627..f06e737 100644 --- a/Template.Shared/Components/Layout/NavMenu.razor +++ b/Template.Shared/Components/Layout/NavMenu.razor @@ -1,16 +1,14 @@ @inject IDialogService Dialog -@if (IsVisible) -{ -
- +
- +
Login + @if (_attemptFailed) + { + @ErrorMessage + }
- - @if (_attemptFailed) - { - @ErrorMessage - }
} diff --git a/Template.Shared/Components/Pages/Login.razor.css b/Template.Shared/Components/Pages/Login.razor.css index f7c0617..f452028 100644 --- a/Template.Shared/Components/Pages/Login.razor.css +++ b/Template.Shared/Components/Pages/Login.razor.css @@ -2,7 +2,7 @@ height: 100%; display: flex; flex-direction: column; - background: hsl(from var(--mud-palette-primary) h s 96%); + background: var(--mud-palette-surface); } .container-top-logo > span { @@ -22,6 +22,7 @@ display: flex; align-items: center; justify-content: center; + z-index: 10; } .login-form-container { @@ -31,20 +32,17 @@ } .container-login { - background: var(--mud-palette-surface); - border-top-left-radius: 16px; - border-top-right-radius: 16px; height: 100%; display: flex; flex-direction: column; padding: 4px 16px 16px; - box-shadow: 0 -2px 10px rgba(165, 165, 165, 0.5); + justify-content: space-between; } .login-footer { + width: 100%; display: flex; - align-items: center; - justify-content: flex-end; + justify-content: center; } .login-footer span { diff --git a/Template.Shared/Components/Pages/PersonalInfo.razor b/Template.Shared/Components/Pages/PersonalInfo.razor index 8100d5e..5235ea6 100644 --- a/Template.Shared/Components/Pages/PersonalInfo.razor +++ b/Template.Shared/Components/Pages/PersonalInfo.razor @@ -8,7 +8,7 @@ @inject INetworkService NetworkService @inject IFormFactor FormFactor - +
diff --git a/Template.Shared/Components/Pages/Settings.razor b/Template.Shared/Components/Pages/Settings.razor index 61eab28..f1b5455 100644 --- a/Template.Shared/Components/Pages/Settings.razor +++ b/Template.Shared/Components/Pages/Settings.razor @@ -2,7 +2,7 @@ @page "/settings/{BackTo}" @using Template.Shared.Components.Layout - +
diff --git a/Template.Shared/Components/SingleElements/Modal/ActivityForm.razor b/Template.Shared/Components/SingleElements/Modal/ActivityForm.razor index da4038d..e4ebb96 100644 --- a/Template.Shared/Components/SingleElements/Modal/ActivityForm.razor +++ b/Template.Shared/Components/SingleElements/Modal/ActivityForm.razor @@ -9,7 +9,7 @@ - +
diff --git a/Template.Shared/wwwroot/css/app.css b/Template.Shared/wwwroot/css/app.css index c443f8c..57219df 100644 --- a/Template.Shared/wwwroot/css/app.css +++ b/Template.Shared/wwwroot/css/app.css @@ -183,6 +183,16 @@ h1:focus { outline: none; } font-size: .9rem; } +.container { + padding-right: var(--m-page-x) !important; + padding-left: var(--m-page-x) !important; +} + +.lm-container { + padding-right: calc(var(--m-page-x) * 0.5) !important; + padding-left: calc(var(--m-page-x) * 0.5) !important; +} + @supports (-webkit-touch-callout: none) { .status-bar-safe-area { display: flex; diff --git a/Template.Shared/wwwroot/css/default-theme.css b/Template.Shared/wwwroot/css/default-theme.css index 2b48cfb..bd04eff 100644 --- a/Template.Shared/wwwroot/css/default-theme.css +++ b/Template.Shared/wwwroot/css/default-theme.css @@ -6,4 +6,5 @@ --card-shadow: 5px 5px 10px 0 var(--gray-for-shadow); --custom-box-shadow: 1px 2px 5px rgba(165, 165, 165, 0.5); --mud-default-borderradius: 12px !important; + --m-page-x: 1.25rem; } diff --git a/Template.Shared/wwwroot/js/header.js b/Template.Shared/wwwroot/js/header.js new file mode 100644 index 0000000..7977944 --- /dev/null +++ b/Template.Shared/wwwroot/js/header.js @@ -0,0 +1,26 @@ +window.blazorIosHeader = { + init: function () { + const largeTitleSection = document.querySelector('.large-title-section'); + const largeTitle = document.querySelector('.large-title'); + const centerTitle = document.querySelector('.center-title'); + + if (!largeTitleSection || !largeTitle || !centerTitle) return; + + window.addEventListener('scroll', function () { + // Soglia simile a iOS: metà della sezione large title + const threshold = largeTitleSection.offsetHeight / 2; + if (window.scrollY > threshold) { + largeTitle.classList.add('hide'); + centerTitle.classList.add('visible'); + } else { + largeTitle.classList.remove('hide'); + centerTitle.classList.remove('visible'); + } + }); + } +}; + +// Per compatibilità con il tuo GoBack Blazor +window.goBack = function () { + window.history.back(); +} \ No newline at end of file