Miglioramenti UI
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
26
Template.Shared/wwwroot/js/header.js
Normal file
26
Template.Shared/wwwroot/js/header.js
Normal file
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user