Skip to content

Commit fb8d770

Browse files
Add current page indicators to navigation links
1 parent a355bb6 commit fb8d770

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

apps/docs/install.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#> base title="launch.css" }}
1+
{{#> base title="launch.css" isInstallPage=true }}
22
<main>
33
<section id="getting-started">
44
<h2>Installation</h2>

apps/docs/partials/base.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<nav hx-boost="true" preload="mouseover">
1414
<a href="/">launch.css</a>
1515
<menu>
16-
<li><a href="/install.html">Install</a></li>
17-
<li><a href="/docs.html">Examples</a></li>
16+
<li><a href="/install.html" {{#if isInstallPage}}aria-current="page"{{/if}}>Install</a></li>
17+
<li><a href="/docs.html" {{#if isDocsPage}}aria-current="page"{{/if}}>Examples</a></li>
1818
<li><a role="button" href="https://github.com/torstendittmann/launch-css">GitHub</a></li>
1919
</menu>
2020
</nav>

packages/main/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "launch.css",
33
"type": "module",
4-
"version": "1.0.32",
4+
"version": "1.0.33",
55
"description": "A classless CSS framework built for speed. Style your website later—build it now.",
66
"homepage": "https://launch-css.dev",
77
"main": "dist/index.css",

packages/main/src/_global.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use "sass:map";
2+
@use "./partials/breakpoints";
3+
14
html {
25
background-color: var(--background);
36
color: var(--color);
@@ -9,3 +12,12 @@ html {
912
outline-color: var(--color);
1013
border-color: var(--border);
1114
}
15+
16+
@media (max-width: map.get(
17+
breakpoints.$breakpoints,
18+
"small"
19+
)) {
20+
body {
21+
/* margin: 1rem; */
22+
}
23+
}

packages/main/src/layouts/_website.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
&:not(:hover) {
5353
text-decoration: none;
5454
}
55+
56+
&[aria-current="page"] {
57+
text-decoration: underline;
58+
}
5559
}
5660
}
5761
}

0 commit comments

Comments
 (0)