update code and styles
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { ScrollReveal } from "@/animations/Reveal";
|
||||
|
||||
export default function Footer() {
|
||||
@@ -79,7 +80,7 @@ export default function Footer() {
|
||||
<div className="elementor-element elementor-element-9990148 e-con-full e-flex cut-corner-no sticky-container-off e-con e-child" data-id="9990148" data-element_type="container" data-e-type="container">
|
||||
<div className="elementor-element elementor-element-8899bdf elementor-absolute elementor-widget elementor-widget-image" data-id="8899bdf" data-element_type="widget" data-e-type="widget" data-settings="{"_position":"absolute"}" data-widget_type="image.default">
|
||||
<div className="elementor-widget-container">
|
||||
<img width="965" height="474" src="/images/bg-map.png" className="attachment-full size-full wp-image-1148" alt="" />
|
||||
<Image width={965} height={474} src="/images/bg-map.png" className="attachment-full size-full wp-image-1148" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="elementor-element elementor-element-a0e7516 elementor-widget elementor-widget-logico_heading" data-id="a0e7516" data-element_type="widget" data-e-type="widget" data-widget_type="logico_heading.default">
|
||||
@@ -327,7 +328,7 @@ export default function Footer() {
|
||||
<div className="elementor-element elementor-element-b5c897d elementor-widget elementor-widget-image" data-id="b5c897d" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
|
||||
<div className="elementor-widget-container">
|
||||
<Link href="/">
|
||||
<img width="300" height="57" src="/images/logo-slogan.png" style={{ width: "280px", height: "auto" }} className="attachment-full size-full wp-image-5851" alt="Doormile Tagline" />
|
||||
<Image width={300} height={57} src="/images/logo-slogan.png" style={{ width: "280px", height: "auto" }} className="attachment-full size-full wp-image-5851" alt="Doormile Tagline" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
@@ -468,6 +469,11 @@ export default function Footer() {
|
||||
.elementor-6585 .elementor-element.elementor-element-3f1ba7a .logico-custom-menu-widget {
|
||||
font-family: var(--font-manrope), system-ui, -apple-system, "Segoe UI", sans-serif;
|
||||
}
|
||||
/* Prevent footer custom navigation menu items from wrapping on hover,
|
||||
which causes layout shifts, height changes, and cursor flickering loops. */
|
||||
.elementor-6585 .logico-custom-menu-widget li a {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
/* The divider widget is a flex child that should grow via Elementor's
|
||||
--container-widget-flex-grow variable, but the base rule wiring that
|
||||
variable to flex-grow lives in elementor-frontend.css (not loaded). */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Menu open/close + sidebar state is read from HeaderUIProvider so BodyOverlay (sibling at body level) can react.
|
||||
*/
|
||||
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { usePathname } from "next/navigation";
|
||||
@@ -48,7 +48,7 @@ export default function Header() {
|
||||
// - on doc.ready: $('.header-hide-until-scroll').addClass('header-visible-scrolled')
|
||||
// - on scroll: toggleClass('dm-header-scrolled', scrollTop > 50)
|
||||
const [visibleScrolled, setVisibleScrolled] = useState(false);
|
||||
const isScrolledRef = useRef(false);
|
||||
const [isScrolled, setIsScrolled] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const handle = requestAnimationFrame(() => {
|
||||
@@ -63,17 +63,7 @@ export default function Header() {
|
||||
if (rafId !== null) return;
|
||||
rafId = requestAnimationFrame(() => {
|
||||
const scrolled = window.scrollY > 50;
|
||||
if (isScrolledRef.current !== scrolled) {
|
||||
isScrolledRef.current = scrolled;
|
||||
const headerEl = document.querySelector(".header-hide-until-scroll");
|
||||
if (headerEl) {
|
||||
if (scrolled) {
|
||||
headerEl.classList.add("dm-header-scrolled");
|
||||
} else {
|
||||
headerEl.classList.remove("dm-header-scrolled");
|
||||
}
|
||||
}
|
||||
}
|
||||
setIsScrolled(scrolled);
|
||||
rafId = null;
|
||||
});
|
||||
};
|
||||
@@ -99,7 +89,7 @@ export default function Header() {
|
||||
"e-parent",
|
||||
"header-hide-until-scroll",
|
||||
visibleScrolled ? "header-visible-scrolled" : "",
|
||||
isScrolledRef.current ? "dm-header-scrolled" : "",
|
||||
isScrolled ? "dm-header-scrolled" : "",
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
|
||||
Reference in New Issue
Block a user