Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

Commit 60aa9eb

Browse files
chore: various link fixes
Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
1 parent d0a32c3 commit 60aa9eb

6 files changed

Lines changed: 162 additions & 27 deletions

File tree

assets/scss/common/_header-custom.scss

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
padding: 0.5rem 0; // Larger hit area on mobile
107107
font-size: var(--nav-link-size);
108108
font-weight: var(--fw-nav);
109-
color: var(--lp-c-text-2) !important;
109+
color: var(--lp-c-text-1) !important;
110110
text-decoration: none;
111111
transition: color 0.15s ease;
112112
background: transparent;
@@ -142,48 +142,120 @@
142142
@include media-breakpoint-up(lg) {
143143
margin-left: auto;
144144
margin-top: 0;
145+
height: var(--nav-height); // Full height for container centering
146+
}
147+
148+
// Standardize all utility buttons/links in the right section
149+
.btn-link,
150+
.nav-link,
151+
.header-github-pill,
152+
.mode-toggle,
153+
.btn-dropdown,
154+
.dropdown {
155+
display: inline-flex !important;
156+
align-items: center !important;
157+
justify-content: center !important;
158+
height: 32px !important;
159+
margin: 0 !important;
160+
padding: 0 !important;
161+
line-height: 1 !important;
162+
vertical-align: middle !important;
145163
}
146164
}
147165

148166
/* GitHub Pill Style */
149167
.header-github-pill {
150-
display: inline-flex;
151-
align-items: center;
152168
gap: 6px;
153-
color: var(--lp-c-text-2);
169+
color: var(--lp-c-text-1);
154170
font-size: var(--nav-link-size);
155171
font-weight: var(--fw-nav);
156172
text-decoration: none;
157173
transition: color 0.15s ease;
158-
line-height: 1;
159174

160175
span {
161176
display: inline-flex;
162177
align-items: center;
163178
}
164179

165180
&:hover {
166-
color: var(--lp-c-text-1);
181+
color: var(--c-accent);
167182
}
168183

169184
.icon {
170185
width: 20px;
171186
height: 20px;
172-
display: block; // Ensure no weird inline spacing
187+
display: inline-flex;
188+
align-items: center;
189+
justify-content: center;
173190
}
174191
}
175192

176193
/* Theme Toggle */
177194
.mode-toggle {
178-
display: flex;
179-
align-items: center;
180-
justify-content: center;
181195
width: 32px;
182-
height: 32px;
183-
color: var(--lp-c-text-2);
196+
color: var(--lp-c-text-1);
184197

185198
&:hover {
186-
color: var(--lp-c-text-1);
199+
color: var(--c-accent);
200+
}
201+
}
202+
203+
/* Button & Dropdown Reset */
204+
.btn-link.nav-link,
205+
.btn-dropdown {
206+
font-size: var(--nav-link-size);
207+
font-weight: var(--fw-nav);
208+
color: var(--lp-c-text-1) !important;
209+
text-decoration: none !important;
210+
border: none;
211+
background: transparent;
212+
213+
&:hover {
214+
color: var(--c-accent) !important;
215+
}
216+
217+
svg {
218+
stroke: currentColor;
219+
}
220+
221+
&.me-3 {
222+
margin-right: 1rem !important; // Restore spacing for search button
223+
}
224+
}
225+
226+
.dropdown-toggle::after {
227+
display: none; // Hide Bootstrap default caret if needed, though we use our own SVG
228+
}
229+
230+
/* Dropdown Menu Styles */
231+
.dropdown-menu {
232+
background-color: var(--lp-c-bg-elv) !important;
233+
border: 1px solid var(--lp-c-border) !important;
234+
padding: 8px 0;
235+
236+
.dropdown-item {
237+
color: var(--lp-c-text-1) !important;
238+
font-size: 0.875rem;
239+
padding: 8px 16px;
240+
transition: background-color 0.2s ease, color 0.2s ease;
241+
242+
&:hover,
243+
&:focus {
244+
background-color: var(--lp-c-bg-soft) !important;
245+
color: var(--c-accent) !important;
246+
}
247+
248+
&.current,
249+
&[aria-current="true"] {
250+
color: var(--c-accent) !important;
251+
font-weight: 600;
252+
}
253+
254+
.version-flag {
255+
font-size: 0.75rem;
256+
opacity: 0.7;
257+
margin-left: 4px;
258+
}
187259
}
188260
}
189261

assets/scss/common/_header.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
header.navbar {
4040
background-color: #1d1e22 !important;
4141
/* Dark background (almost black) */
42-
color: #dee2e6 !important;
42+
color: var(--lp-c-text-1) !important;
4343
/* Light text color */
4444
padding-top: 1rem;
4545
/* Top spacing */
@@ -71,7 +71,7 @@ header.navbar {
7171
header.navbar .nav-link,
7272
header.navbar .btn-link,
7373
header.navbar .btn-dropdown {
74-
color: #dee2e6 !important;
74+
color: var(--lp-c-text-1) !important;
7575
/* Light text color for all elements */
7676
}
7777

@@ -83,7 +83,7 @@ header.navbar .btn-dropdown {
8383
header.navbar .btn-link svg,
8484
header.navbar .btn-dropdown svg,
8585
header.navbar .nav-link[aria-label="Search website"] svg {
86-
stroke: #dee2e6;
86+
stroke: var(--lp-c-text-1);
8787
/* Light stroke color */
8888
fill: none;
8989
/* No fill */

content/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ intro3: "for packaging, signing, transporting and deploying your artifacts – p
1010

1111
actions:
1212
- label: "Pack"
13-
link: "/docs/getting-started/create-component-version/"
13+
link: "docs/getting-started/create-component-version/"
1414
- label: "Sign"
15-
link: "/docs/getting-started/sign-component-version/"
15+
link: "docs/getting-started/sign-component-version/"
1616
- label: "Transport"
17-
link: "/docs/tutorials/complex-component-structure-deployment/"
17+
link: "docs/tutorials/complex-component-structure-deployment/"
1818
- label: "Deploy"
19-
link: "/docs/getting-started/setup/"
19+
link: "docs/getting-started/setup/"
2020

2121
hero_image: "images/base.svg"
2222

layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1 class="heading">
2121
<div class="actions">
2222
{{ range .Params.actions }}
2323
<div class="action medium {{ .type | default " alt" }}">
24-
<a href="{{ .link }}">{{ .label }}</a>
24+
<a href="{{ .link | relURL }}">{{ .label }}</a>
2525
</div>
2626
{{ end }}
2727
</div>

layouts/partials/header/custom-header.html

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@
1919
</svg>
2020
</button>
2121

22+
<!-- Search Toggle Mobile -->
23+
{{ if site.Params.doks.flexSearch }}
24+
<button type="button" id="searchToggleMobile" class="btn btn-link nav-link p-0 d-lg-none ms-auto me-3"
25+
aria-label="Search">
26+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24"
27+
height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
28+
stroke-linecap="round" stroke-linejoin="round">
29+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
30+
<path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path>
31+
<path d="M21 21l-6 -6"></path>
32+
</svg>
33+
</button>
34+
{{ end }}
35+
2236
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar"
2337
aria-labelledby="offcanvasNavbarLabel">
2438
<div class="offcanvas-header">
@@ -40,8 +54,8 @@ <h5 class="offcanvas-title" id="offcanvasNavbarLabel">{{ site.Title }}</h5>
4054
<div class="navbar-right">
4155
<!-- Search Placeholder or Partial -->
4256
{{ if site.Params.doks.flexSearch }}
43-
<button type="button" class="btn btn-link nav-link p-0 me-3 d-none d-lg-flex"
44-
aria-label="Search" data-bs-toggle="modal" data-bs-target="#searchModal">
57+
<button type="button" id="searchToggleDesktop"
58+
class="btn btn-link nav-link p-0 me-3 d-none d-lg-flex" aria-label="Search">
4559
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search"
4660
width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
4761
fill="none" stroke-linecap="round" stroke-linejoin="round">
@@ -61,6 +75,44 @@ <h5 class="offcanvas-title" id="offcanvasNavbarLabel">{{ site.Title }}</h5>
6175
</a>
6276
{{ end }}
6377

78+
<!-- Version switches always navigate to the Root page of the selected version -->
79+
{{ if site.Params.doks.docsVersioning -}}
80+
{{ $versionsData := site.Data.versions -}}
81+
{{ if $versionsData.versions -}}
82+
{{ $currentVer := site.Params.doks.docsVersion -}}
83+
<div class="dropdown me-3 d-none d-lg-flex">
84+
<button class="btn btn-link nav-link p-0 dropdown-toggle btn-dropdown" id="doks-versions"
85+
data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static"
86+
aria-label="Toggle version menu">
87+
Versions
88+
<span class="dropdown-caret">
89+
<svg xmlns="http://www.w3.org/2000/svg"
90+
class="icon icon-tabler icon-tabler-chevron-down" width="20" height="20"
91+
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
92+
stroke-linecap="round" stroke-linejoin="round">
93+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
94+
<path d="M6 9l6 6l6 -6" />
95+
</svg>
96+
</span>
97+
</button>
98+
<ul class="dropdown-menu dropdown-menu-lg-end shadow rounded border-0"
99+
aria-labelledby="doks-versions">
100+
{{ range $versionsData.versions -}}
101+
{{ $isDefault := eq . $versionsData.defaultVersion -}}
102+
{{ $isCurrent := eq . $currentVer -}}
103+
<li>
104+
<a class="dropdown-item{{ if $isCurrent }} current{{ end }}" {{ if $isCurrent
105+
}}aria-current="true" {{ end }}
106+
href="{{ if $isDefault }}/{{ else }}/{{ . }}/{{ end }}">
107+
{{ . }}{{ if $isDefault }} <span class="version-flag">(default)</span>{{ end }}
108+
</a>
109+
</li>
110+
{{ end -}}
111+
</ul>
112+
</div>
113+
{{ end -}}
114+
{{ end -}}
115+
64116
<!-- Theme Toggle -->
65117
{{ if and (eq site.Params.doks.colorMode "auto") site.Params.doks.colorModeToggler -}}
66118
<button id="buttonColorMode" class="btn btn-link nav-link p-0 mode-toggle" type="button"
@@ -91,8 +143,9 @@ <h5 class="offcanvas-title" id="offcanvasNavbarLabel">{{ site.Title }}</h5>
91143
</div>
92144
</div>
93145
</nav>
146+
</header>
94147

95-
{{ if site.Params.doks.flexSearch }}
96-
{{ partial "header/search-modal" . }}
97-
{{ end }}
98-
</header>
148+
{{ if site.Params.doks.flexSearch }}
149+
{{ partial "header/search-modal" . }}
150+
{{ end }}
151+
{{ partial "header/version-warning.html" . }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ $currentVer := site.Params.doks.docsVersion }}
2+
{{ $defaultVer := site.Data.versions.defaultVersion }}
3+
{{ if eq $currentVer "dev" }}
4+
<aside class="version-warning-banner" role="status" aria-live="polite" style="margin:0;">
5+
<span>
6+
You are currently viewing documentation for the <strong>dev</strong> version of OCM.<br>
7+
This version is under development and contains our next major release with lots of breaking changes.
8+
</span>
9+
</aside>
10+
{{ end }}

0 commit comments

Comments
 (0)