Skip to content

Commit 3e15332

Browse files
committed
update paths
1 parent 456acd3 commit 3e15332

10 files changed

Lines changed: 237 additions & 190 deletions

File tree

public/manifest.webmanifest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "Networks of Cardiovascular Digital Twins (CVD-Net)",
44
"icons": [],
55
"display": "minimal-ui",
6-
"id": "/",
7-
"start_url": "/"
8-
}
6+
"id": "/cvd-net-website/",
7+
"start_url": "/cvd-net-website/"
8+
}

src/components/common/HeroContent.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const title = "Networks of Cardiovascular Digital Twins";
55
const subTitle =
66
"Pioneering personalised cardiovascular care through interconnected digital twins";
77
// TODO: Add Hero Image placeholder (_being developed_)
8-
const primaryCTA = { text: "Find Out More", href: "/about/project-overview" }; // Changed from secondary
9-
const secondaryCTA = { text: "Contact Us", href: "/about/contact" }; // Changed from primary
8+
const primaryCTA = { text: "Find Out More", href: "/about/project-overview" }; // Astro's Button component will handle base URL prefix
9+
const secondaryCTA = { text: "Contact Us", href: "/about/contact" }; // Astro's Button component will handle base URL prefix
1010
---
1111

1212
{/* Hero Content */}

src/components/sections/Navbar.astro

Lines changed: 138 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -8,132 +8,149 @@ import { navigationLinks } from "@utils/navigation";
88
const currentPath = Astro.url.pathname;
99
1010
// Call-to-action configuration for the primary button
11-
const primaryCTA = { text: "Contact", href: "/about/contact" };
11+
const primaryCTA = {
12+
text: "Contact",
13+
href: `${import.meta.env.BASE_URL}/about/contact`,
14+
};
1215
---
1316

1417
<header
15-
class="fixed start-1/2 top-5 z-50 mx-auto flex w-full max-w-sm -translate-x-1/2 transform flex-wrap rounded-2xl border-b border-slate-100 bg-white bg-linear-to-t/oklch from-teal-100 via-transparent to-white p-4 shadow-xs sm:max-w-xl md:max-w-4xl md:flex-nowrap md:justify-start lg:max-w-5xl xl:max-w-6xl xl:shadow-none xl:ring-teal-950/5 2xl:max-w-[81rem] 2xl:via-0%"
18+
class="fixed start-1/2 top-5 z-50 mx-auto flex w-full max-w-sm -translate-x-1/2 transform flex-wrap rounded-2xl border-b border-slate-100 bg-white bg-linear-to-t/oklch from-teal-100 via-transparent to-white p-4 shadow-xs sm:max-w-xl md:max-w-4xl md:flex-nowrap md:justify-start lg:max-w-5xl xl:max-w-6xl xl:shadow-none xl:ring-teal-950/5 2xl:max-w-[81rem] 2xl:via-0%"
1619
>
17-
<nav
18-
class="relative mx-auto w-full px-4 py-2 sm:px-6 lg:px-8 xl:flex xl:max-w-7xl xl:items-center xl:justify-between xl:gap-3 2xl:max-w-[85rem]"
19-
>
20-
<div class="flex items-center justify-between gap-x-1">
21-
<a
22-
class="dm-sans flex-none text-2xl font-semibold text-teal-700 focus:opacity-80 focus:outline-hidden"
23-
href="/"
24-
aria-label="CVD-Net Logo"
25-
translate="no"
26-
>CVD-Net</a
27-
>
20+
<nav
21+
class="relative mx-auto w-full px-4 py-2 sm:px-6 lg:px-8 xl:flex xl:max-w-7xl xl:items-center xl:justify-between xl:gap-3 2xl:max-w-[85rem]"
22+
>
23+
<div class="flex items-center justify-between gap-x-1">
24+
<a
25+
class="dm-sans flex-none text-2xl font-semibold text-teal-700 focus:opacity-80 focus:outline-hidden"
26+
href={import.meta.env.BASE_URL}
27+
aria-label="CVD-Net Logo"
28+
translate="no">CVD-Net</a
29+
>
2830

29-
<button
30-
type="button"
31-
class="hs-collapse-toggle relative flex size-9 items-center justify-center rounded-lg border border-slate-200 text-[12px] font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden xl:hidden"
32-
id="hs-header-base-collapse"
33-
aria-expanded="false"
34-
aria-controls="hs-header-base"
35-
aria-label="Toggle navigation"
36-
data-hs-collapse="#hs-header-base"
37-
>
38-
<svg
39-
class="size-4 hs-collapse-open:hidden"
40-
xmlns="http://www.w3.org/2000/svg"
41-
width="24"
42-
height="24"
43-
viewBox="0 0 24 24"
44-
fill="none"
45-
stroke="currentColor"
46-
stroke-width="2"
47-
stroke-linecap="round"
48-
stroke-linejoin="round"
49-
><line x1="3" x2="21" y1="6" y2="6"></line><line
50-
x1="3"
51-
x2="21"
52-
y1="12"
53-
y2="12"></line><line x1="3" x2="21" y1="18" y2="18"></line></svg
54-
>
55-
<svg
56-
class="hidden size-4 shrink-0 hs-collapse-open:block"
57-
xmlns="http://www.w3.org/2000/svg"
58-
width="24"
59-
height="24"
60-
viewBox="0 0 24 24"
61-
fill="none"
62-
stroke="currentColor"
63-
stroke-width="2"
64-
stroke-linecap="round"
65-
stroke-linejoin="round"
66-
><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg
67-
>
68-
<span class="sr-only">Toggle navigation</span>
69-
</button>
70-
</div>
31+
<button
32+
type="button"
33+
class="hs-collapse-toggle relative flex size-9 items-center justify-center rounded-lg border border-slate-200 text-[12px] font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden xl:hidden"
34+
id="hs-header-base-collapse"
35+
aria-expanded="false"
36+
aria-controls="hs-header-base"
37+
aria-label="Toggle navigation"
38+
data-hs-collapse="#hs-header-base"
39+
>
40+
<svg
41+
class="hs-collapse-open:hidden size-4"
42+
xmlns="http://www.w3.org/2000/svg"
43+
width="24"
44+
height="24"
45+
viewBox="0 0 24 24"
46+
fill="none"
47+
stroke="currentColor"
48+
stroke-width="2"
49+
stroke-linecap="round"
50+
stroke-linejoin="round"
51+
><line x1="3" x2="21" y1="6" y2="6"></line><line
52+
x1="3"
53+
x2="21"
54+
y1="12"
55+
y2="12"></line><line x1="3" x2="21" y1="18" y2="18"
56+
></line></svg
57+
>
58+
<svg
59+
class="hs-collapse-open:block hidden size-4 shrink-0"
60+
xmlns="http://www.w3.org/2000/svg"
61+
width="24"
62+
height="24"
63+
viewBox="0 0 24 24"
64+
fill="none"
65+
stroke="currentColor"
66+
stroke-width="2"
67+
stroke-linecap="round"
68+
stroke-linejoin="round"
69+
><path d="M18 6 6 18"></path><path d="m6 6 12 12"
70+
></path></svg
71+
>
72+
<span class="sr-only">Toggle navigation</span>
73+
</button>
74+
</div>
7175

72-
<div
73-
id="hs-header-base"
74-
class="hs-collapse hidden grow basis-full overflow-hidden transition-all duration-300 xl:ml-12 xl:block 2xl:ml-20"
75-
aria-labelledby="hs-header-base-collapse"
76-
>
77-
<div
78-
class="max-h-[75vh] overflow-hidden overflow-y-auto [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-slate-300 [&::-webkit-scrollbar-track]:bg-slate-100 [&::-webkit-scrollbar]:w-2"
79-
>
80-
<div
81-
class="flex flex-col gap-0.5 py-2 xl:flex-row xl:items-center xl:gap-1 xl:py-0"
82-
>
83-
<div class="grow">
84-
<div
85-
class="flex flex-col gap-0.5 xl:flex-row xl:items-center xl:justify-evenly xl:gap-1"
86-
>
87-
{navigationLinks.map((link) => {
88-
if (link.label === "Home") {
89-
return (
90-
<a
91-
href={link.href}
92-
class={`flex items-center rounded-lg p-2 font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden ${
93-
currentPath === link.href ? "underline underline-offset-4" : ""
94-
}`}
95-
aria-current={currentPath === link.href ? "page" : undefined}
96-
>
97-
{link.label}
98-
</a>
99-
);
100-
} else if (link.label === "About") {
101-
return <About />;
102-
} else if (link.label === "Resources") {
103-
return <Resources />;
104-
} else if (link.label === "Blog") {
105-
return <Blog />;
106-
} else {
107-
// Render other simple links directly
108-
return (
109-
<a
110-
href={link.href}
111-
class={`flex items-center rounded-lg p-2 font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden ${
112-
currentPath === link.href ? "underline underline-offset-4" : ""
113-
}`}
114-
aria-current={currentPath === link.href ? "page" : undefined}
115-
>
116-
{link.label}
117-
</a>
118-
);
119-
}
120-
})}
121-
</div>
122-
</div>
76+
<div
77+
id="hs-header-base"
78+
class="hs-collapse hidden grow basis-full overflow-hidden transition-all duration-300 xl:ml-12 xl:block 2xl:ml-20"
79+
aria-labelledby="hs-header-base-collapse"
80+
>
81+
<div
82+
class="max-h-[75vh] overflow-hidden overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-slate-300 [&::-webkit-scrollbar-track]:bg-slate-100"
83+
>
84+
<div
85+
class="flex flex-col gap-0.5 py-2 xl:flex-row xl:items-center xl:gap-1 xl:py-0"
86+
>
87+
<div class="grow">
88+
<div
89+
class="flex flex-col gap-0.5 xl:flex-row xl:items-center xl:justify-evenly xl:gap-1"
90+
>
91+
{
92+
navigationLinks.map((link) => {
93+
if (link.label === "Home") {
94+
return (
95+
<a
96+
href={link.href}
97+
class={`flex items-center rounded-lg p-2 font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden ${
98+
currentPath === link.href
99+
? "underline underline-offset-4"
100+
: ""
101+
}`}
102+
aria-current={
103+
currentPath === link.href
104+
? "page"
105+
: undefined
106+
}
107+
>
108+
{link.label}
109+
</a>
110+
);
111+
} else if (link.label === "About") {
112+
return <About />;
113+
} else if (link.label === "Resources") {
114+
return <Resources />;
115+
} else if (link.label === "Blog") {
116+
return <Blog />;
117+
} else {
118+
// Render other simple links directly
119+
return (
120+
<a
121+
href={link.href}
122+
class={`flex items-center rounded-lg p-2 font-medium text-slate-800 hover:bg-slate-100 focus:bg-slate-100 focus:outline-hidden ${
123+
currentPath === link.href
124+
? "underline underline-offset-4"
125+
: ""
126+
}`}
127+
aria-current={
128+
currentPath === link.href
129+
? "page"
130+
: undefined
131+
}
132+
>
133+
{link.label}
134+
</a>
135+
);
136+
}
137+
})
138+
}
139+
</div>
140+
</div>
123141

124-
<div
125-
class="mt-5 flex flex-wrap items-center gap-x-1.5 xl:ml-6 xl:mt-0"
126-
>
127-
<Button
128-
href={primaryCTA.href}
129-
variant="primary"
130-
className="inline-flex text-nowrap border-none py-2!"
131-
>{primaryCTA.text}</Button
132-
>
133-
</div>
134-
</div>
135-
</div>
136-
</div>
137-
</nav>
142+
<div
143+
class="mt-5 flex flex-wrap items-center gap-x-1.5 xl:mt-0 xl:ml-6"
144+
>
145+
<Button
146+
href={primaryCTA.href}
147+
variant="primary"
148+
className="inline-flex border-none py-2! text-nowrap"
149+
>{primaryCTA.text}</Button
150+
>
151+
</div>
152+
</div>
153+
</div>
154+
</div>
155+
</nav>
138156
</header>
139-

0 commit comments

Comments
 (0)