From 1bc91042c09d3acb66c58ca5dbad8e3f74525170 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:01:42 -0800 Subject: [PATCH] General Docs Improvements (#542) --- next.config.mjs | 5 + src/components/ImageZoom.jsx | 4 +- src/components/Layout.jsx | 43 ++++++-- src/pages/_app.jsx | 1 - src/pages/about-netbird/faq.mdx | 2 +- src/pages/about-netbird/how-netbird-works.mdx | 13 +-- src/pages/get-started/index.mdx | 2 +- src/pages/how-to/huntress-edr.mdx | 98 ----------------- src/pages/use-cases/examples.mdx | 2 +- src/styles/global.css | 3 - src/styles/tailwind.css | 28 ++++- typography.js | 102 +++++++++++++----- 12 files changed, 153 insertions(+), 150 deletions(-) delete mode 100644 src/pages/how-to/huntress-edr.mdx delete mode 100644 src/styles/global.css 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 }) {