Skip to content

Commit 22d7d1b

Browse files
deploy/subhosting -> services (#1679)
1 parent 0000283 commit 22d7d1b

File tree

12 files changed

+441
-91
lines changed

12 files changed

+441
-91
lines changed

_components/Header.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ header {
4444
}
4545
.header-nav-link[data-active] {
4646
color: hsl(var(--primary));
47+
position: relative;
4748
}
4849
}
4950

_components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function (data: Lume.Data) {
1010
{data.navigation.map((nav: NavData) => (
1111
<a
1212
href={nav.href}
13-
className="header-nav-link blocklink"
13+
className={`header-nav-link blocklink ${nav.style}`}
1414
{...(nav.href.includes(data.currentSection)
1515
? { "data-active": true }
1616
: {})}

_components/RefHeader.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
z-index: 5;
99
}
1010

11-
.refheader-link[data-active] {
11+
.refheader-link[data-active="true"] {
1212
color: hsl(var(--primary));
1313
}
1414

_components/SecondaryNav.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@
3737
display: block;
3838
}
3939

40-
.sub-nav-link[data-active] {
40+
.sub-nav-link[data-active="true"] {
4141
background-color: hsl(var(--background-secondary));
42-
border: 1px solid hsl(var(--foreground-tertiary));
42+
&:after {
43+
display: none;
44+
}
4345
}
4446

4547
.sub-nav-toggle {

_components/SubNav.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export default function (
2+
{ data, currentUrl }: {
3+
data: Lume.Data;
4+
currentUrl: string;
5+
},
6+
) {
7+
const navData = data.page?.data?.secondaryNav;
8+
if (!navData || navData.length === 0) {
9+
return null;
10+
}
11+
12+
return (
13+
<nav class="refheader">
14+
<ul class="flex">
15+
{navData.map((nav: any) => (
16+
<li key={nav.href}>
17+
<a
18+
class="blocklink refheader-link"
19+
data-active={currentUrl.includes(nav.href)}
20+
href={nav.href}
21+
>
22+
{nav.title}
23+
</a>
24+
</li>
25+
))}
26+
</ul>
27+
</nav>
28+
);
29+
}
30+
31+
export const css = "@import './_components/RefHeader.css';";

_data.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
"href": "/examples/"
1414
},
1515
{
16-
"name": "Deploy",
17-
"href": "/deploy/manual/"
18-
},
19-
{
20-
"name": "Subhosting",
21-
"href": "/subhosting/manual/"
16+
"name": "Services",
17+
"href": "/deploy/manual/",
18+
"style": "services"
2219
}
2320
],
2421
"sidebar": [

_includes/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ export default function Layout(data: Lume.Data) {
7373
<body>
7474
<data.comp.Header currentSection={section} />
7575
<data.comp.RefHeader currentUrl={data.url} />
76+
<data.comp.SubNav
77+
data={data}
78+
currentUrl={data.url}
79+
/>
7680
<div className="layout">
7781
<data.comp.Navigation
7882
data={data}

0 commit comments

Comments
 (0)