Skip to content

Commit

Permalink
feat: navigation (resolves #14) (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Jul 26, 2023
1 parent 314f1f8 commit d0d8d63
Show file tree
Hide file tree
Showing 16 changed files with 549 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/_includes/components/color/color.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
context: {
colors: [
"blue-100",
"blue-300",
"blue-600",
"blue-700",
"green-100",
Expand Down
1 change: 1 addition & 0 deletions src/_includes/components/navigation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Navigation
101 changes: 101 additions & 0 deletions src/_includes/components/navigation/navigation.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
module.exports = {
title: "Navigation",
context: {
items: [
{
title: "Insights"
},
{
title: "Practices"
},
{
title: "Techniques"
},
{
title: "Activities"
}
]
},
variants: [
{
title: "Current Page - Insights",
context: {
items: [
{
title: "Insights",
current: true
},
{
title: "Practices"
},
{
title: "Techniques"
},
{
title: "Activities"
}
]
}
},
{
title: "Current Page - Practices",
context: {
items: [
{
title: "Insights"
},
{
title: "Practices",
current: true
},
{
title: "Techniques"
},
{
title: "Activities"
}
]
}
},
{
title: "Current Page - Techniques",
context: {
items: [
{
title: "Insights"
},
{
title: "Practices"
},
{
title: "Techniques",
current: true
},
{
title: "Activities"
}
]
}
},
{
title: "Current Page - Activities",
context: {
items: [
{
title: "Insights"
},
{
title: "Practices"
},
{
title: "Techniques"
},
{
title: "Activities",
current: true
}
]
}
}
]
};
17 changes: 17 additions & 0 deletions src/_includes/components/navigation/navigation.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<nav aria-labelledby="navigation" x-data="{open: false}">
<a rel="home" href="/">
{% include "../../../static/svg/idrc.svg" %}
<span>Inclusive Design Guide</span>
</a>
<button aria-expanded="false" x-bind:aria-expanded="open" @click="open = !open">{% include "../../../static/svg/close.svg" %}{% include "../../../static/svg/menu.svg" %}<span class="label">menu</span></button>
<div class="inner flow">
<h2 id="navigation">Menu</h2>
<ul role="list">
{% for item in params.items %}
<li>
<a class="--{{ item.title | slugify }}" href="#{{ item.title | slugify }}"{% if item.current %} aria-current="page"{% endif %}>{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</div>
</nav>
4 changes: 2 additions & 2 deletions src/static/css/_color.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
background-color: var(--fl-bgColor, var(--color-blue-100));
}

.bg-blue-200 {
background-color: var(--fl-bgColor, var(--color-blue-200));
.bg-blue-300 {
background-color: var(--fl-bgColor, var(--color-blue-300));
}

.bg-blue-600 {
Expand Down
18 changes: 18 additions & 0 deletions src/static/css/_font.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@
src: url("../fonts/mulish-v12-latin-italic.woff2") format("woff2");
}

/* mulish-500 - latin */
@font-face {
font-display: swap;
font-family: Mulish;
font-style: normal;
font-weight: 500;
src: url("../fonts/mulish-v12-latin-500.woff2") format("woff2");
}

/* mulish-700 - latin */
@font-face {
font-display: swap;
font-family: Mulish;
font-style: normal;
font-weight: 700;
src: url("../fonts/mulish-v12-latin-700.woff2") format("woff2");
}

/* mulish-800 - latin */
@font-face {
font-display: swap;
Expand Down
1 change: 1 addition & 0 deletions src/static/css/_link.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
a {
color: var(--fl-linkColor, var(--link-color));
font-weight: 800;
text-decoration: underline;
}

Expand Down
Loading

0 comments on commit d0d8d63

Please sign in to comment.