diff --git a/next.config.mjs b/next.config.mjs index 47ac55d1..8d47c918 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -130,6 +130,11 @@ const nextConfig = { destination: '/manage/access-control/endpoint-detection-and-response/sentinelone-edr', permanent: true, }, + { + source: '/how-to/huntress-edr', + destination: '/manage/access-control/endpoint-detection-and-response/huntress-edr', + permanent: true, + }, { source: '/how-to/intune-mdm', destination: '/manage/access-control/endpoint-detection-and-response/intune-mdm', diff --git a/src/components/ImageZoom.jsx b/src/components/ImageZoom.jsx index 2746c003..6822306d 100644 --- a/src/components/ImageZoom.jsx +++ b/src/components/ImageZoom.jsx @@ -20,8 +20,10 @@ export function ImageZoom() { target.tagName === 'IMG' && (target.classList.contains('imagewrapper') || target.classList.contains('imagewrapper-big') || + target.classList.contains('imagewrapper-medium') || target.closest('.imagewrapper') || - target.closest('.imagewrapper-big')) + target.closest('.imagewrapper-big') || + target.closest('.imagewrapper-medium')) ) { e.preventDefault() setZoomedImage(target.src) diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 87579fd3..1936b865 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -85,6 +85,7 @@ function GitHubIcon(props) { function useTableOfContents(tableOfContents) { let [currentSection, setCurrentSection] = useState(tableOfContents[0]?.id) + let [showJumpToTop, setShowJumpToTop] = useState(false) let getHeadings = useCallback((tableOfContents) => { return tableOfContents @@ -105,7 +106,10 @@ function useTableOfContents(tableOfContents) { if (tableOfContents.length === 0) return let headings = getHeadings(tableOfContents) function onScroll() { - let top = window.scrollY + 10; + let scrollTop = window.scrollY + setShowJumpToTop(scrollTop > 400) + + let top = scrollTop + 10; let current = headings[0]?.id for (let heading of headings) { if (top >= heading?.top) { @@ -123,7 +127,7 @@ function useTableOfContents(tableOfContents) { } }, [getHeadings, tableOfContents]) - return currentSection + return { currentSection, showJumpToTop } } export function Layout({ children, title, tableOfContents }) { @@ -156,7 +160,12 @@ export function Layout({ children, title, tableOfContents }) { position: toast.POSITION.BOTTOM_RIGHT, }); }; - let currentSection = useTableOfContents(tableOfContents) + + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }) + } + + let { currentSection, showJumpToTop } = useTableOfContents(tableOfContents) function isActive(section) { if (section.id === currentSection) { @@ -183,7 +192,7 @@ export function Layout({ children, title, tableOfContents }) { className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex" style={{ top: bannerHeight }} > -
+
@@ -228,12 +237,26 @@ export function Layout({ children, title, tableOfContents }) {