Fixes save menu issues
This commit is contained in:
@ -78,6 +78,8 @@ html,body {
|
||||
font-weight: 400;
|
||||
line-height:1.5;
|
||||
color:var(--color-primary-dark);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
html {
|
||||
@ -237,12 +239,23 @@ h2 {
|
||||
/* Hero */
|
||||
|
||||
#hero {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
flex: 1 0 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#hero .section {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#hero .content-wrapper, #hero .section {
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.hero-background {
|
||||
height: 66%;
|
||||
width: 100%;
|
||||
@ -303,7 +316,6 @@ h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
|
||||
.gallery {
|
||||
padding-top: 15px;
|
||||
}
|
||||
@ -341,6 +353,11 @@ h2 {
|
||||
|
||||
/* Footer */
|
||||
|
||||
#footer {
|
||||
margin: auto 0 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
text-align: center;
|
||||
padding-top: 40px;
|
||||
@ -470,8 +487,7 @@ h2 {
|
||||
|
||||
#legals.content-wrapper {
|
||||
max-width: 90%;
|
||||
margin: auto;
|
||||
margin-top: 50px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
.legals-content {
|
||||
|
@ -463,6 +463,12 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
function isSectionSaved(section) {
|
||||
const values = getSectionValues(section);
|
||||
const config = loadedConfig[section] || {};
|
||||
function normalizeMenuItems(items) {
|
||||
return (items || []).map(item => ({
|
||||
label: item.label || "",
|
||||
href: item.href || ""
|
||||
}));
|
||||
}
|
||||
switch (section) {
|
||||
case "info":
|
||||
return Object.keys(values).every(
|
||||
@ -477,8 +483,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
values.instagram_url === (config.instagram_url || "") &&
|
||||
values.thumbnail === (config.thumbnail || "");
|
||||
case "menu":
|
||||
return JSON.stringify(values.items) === JSON.stringify(config.items || []);
|
||||
case "footer":
|
||||
return JSON.stringify(normalizeMenuItems(values.items)) === JSON.stringify(normalizeMenuItems(config.items));
|
||||
case "footer":
|
||||
return values.copyright && values.legal_label &&
|
||||
values.copyright === (config.copyright || "") &&
|
||||
values.legal_label === (config.legal_label || "");
|
||||
|
Reference in New Issue
Block a user