diff --git a/lib/components/navigation/breadcrumbs.jsx b/lib/components/navigation/breadcrumbs.jsx index 8938147..11f3503 100644 --- a/lib/components/navigation/breadcrumbs.jsx +++ b/lib/components/navigation/breadcrumbs.jsx @@ -4,8 +4,6 @@ import { MdHome } from "react-icons/md"; import { VscChevronRight } from "react-icons/vsc"; import Link from "./link"; -const BASE_URL = import.meta.env.BASE_URL; - function BreadcrumbItem({ className, href, text }) { const breadcrumbItemClass = useMemo(() => { return gwMerge( @@ -44,7 +42,7 @@ function Breadcrumbs({ className, children, baseUrl }) {
  • diff --git a/lib/composite/header/index.jsx b/lib/composite/header/index.jsx index b3917e5..d195666 100644 --- a/lib/composite/header/index.jsx +++ b/lib/composite/header/index.jsx @@ -7,8 +7,6 @@ import { useState } from "react"; import gwMerge from "../../gw-merge"; import Link from "../../components/navigation/link"; -const BASE_URL = import.meta.env.BASE_URL; - function Title({ title = "", subtitle = "" }) { return (
    - +
    - + {navRight ? navRight : null} diff --git a/lib/composite/site-wrapper/index.jsx b/lib/composite/site-wrapper/index.jsx index 23a53d6..21cd1ff 100644 --- a/lib/composite/site-wrapper/index.jsx +++ b/lib/composite/site-wrapper/index.jsx @@ -12,6 +12,7 @@ function SiteWrapper({ msgBanner = undefined, msgBannerPosition = "top", title = "US Army Corps of Engineers", + homeUrl = "#", fluidNav = false, subtitle = "", missionText = "", @@ -51,6 +52,7 @@ function SiteWrapper({ subtitle={subtitle} navRight={navRight} fluidNav={fluidNav} + homeUrl={homeUrl} /> {msgBanner && msgBannerPosition === "bottom" ? msgBanner : null} diff --git a/src/App.jsx b/src/App.jsx index a0a408c..762d28e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -39,13 +39,14 @@ function App() {
    { // Remove BASE_URL# before it is added again by the navhelper so it can be included in the hrefs for copy url purposes - if (url.includes(`${BASE_URL}#`)) url = url.replace(`${BASE_URL}#`, ""); + url = url.replace(`${BASE_URL}#`, ""); doUpdateHash(url); })} > - + {breadcrumbs.map((breadcrumb) => ( ))} diff --git a/src/app-pages/documentation/app-shell/site-wrapper.jsx b/src/app-pages/documentation/app-shell/site-wrapper.jsx index c600f26..ad3d9a1 100644 --- a/src/app-pages/documentation/app-shell/site-wrapper.jsx +++ b/src/app-pages/documentation/app-shell/site-wrapper.jsx @@ -57,6 +57,12 @@ const siteWrapperProps = [ default: "true", desc: "If true, the footer will be displayed at the bottom of the page. Set to false to hide the footer in case you need the screen space for something like a map viewer.", }, + { + name: "homeUrl", + type: "string", + default: "#", + desc: "Sets the href on the Corps Castle in the header.", + }, { name: "title", type: "string", diff --git a/vite.config.js b/vite.config.js index a16cba7..48c2c2c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -43,7 +43,7 @@ export default defineConfig(({ mode }) => { const base = mode === "production" ? "https://usace.github.io/groundwork/" - : "http://localhost:5173/"; + : "http://localhost:5173/groundwork/"; return { plugins: [react()], base: base,