Skip to content

Commit

Permalink
feat: homepage update (#1699)
Browse files Browse the repository at this point in the history
Co-authored-by: Ned Zimmerman <ned@bight.dev>
  • Loading branch information
chosww and greatislander authored Feb 26, 2024
1 parent c2e7408 commit 8576393
Show file tree
Hide file tree
Showing 39 changed files with 946 additions and 407 deletions.
4 changes: 2 additions & 2 deletions src/_includes/components/nav-menu.njk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<nav class="primary-nav" aria-label="Primary Navigation">
{% set navItems = collections.pages | eleventyNavigation %}
{%- for item in navItems %}
{%- if (item.order > 0) and (item.locale === locale) %}
<a {% if page.url === item.url %}aria-current="page" {% endif %}href="{{ item.url }}">{{ item.key }}</a>
{%- if (item.order > 0) %}
<a {% if page.url === item.url %}aria-current="page" {% endif %}href="{{ item.url }}" {% if item.locale and item.locale !== "en-CA" %}hreflang="{{ item.locale }}" lang="{{ item.locale }}"{% endif %}>{{ item.key }}</a>
{%- endif %}
{%- endfor %}
</nav>
46 changes: 33 additions & 13 deletions src/_includes/layouts/page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,38 @@
</div>
</article>
<div class="homepage-cards">
<a href="/initiatives/" class="blue card">
<h2>Read current views in inclusive data science</h2>
</a>
<a href="/events/" class="yellow card">
<h2>Participate in our inclusion challenge initiatives</h2>
</a>
<a href="/badges/" class="azure card">
<h2>Earn We Count Badges</h2>
</a>
<a href="/resources/" class="green card">
<h2>Search the We Count Library</h2>
</a>
<div class="card blue">
<h2>
<a href="/resources/">
Resource Library
</a>
</h2>
<p>Search IDRC's library of AI and data analytics resources</p>
</div>
<div class="card green">
<h2>
<a href="/events/">
Events
</a>
</h2>
<p>Find out about IDRC events and how you can participate</p>
</div>
<div class="card azure">
<h2>
<a href="/initiatives/">
Events
</a>
</h2>
<p>Explore IDRC project activities</p>
</div>
<div class="card yellow">
<h2>
<a href="/rtdd/">
Regulating the Digital / <span lang="fr-CA">Réguler le numérique</span>
</a>
</h2>
<p>Addressing digital exclusion / <span lang="fr-CA">Lutter contre l’exclusion numérique</span></p>
</div>
</div>
</div>

Expand All @@ -52,7 +72,7 @@
</article>

{% else %}
<article class="page {{ title | slugify }}">
<article {% if locale and locale !== "en-CA" %}lang="{{ locale }}" {% endif %}class="page {{ title | slugify }}">
<h1>{{ pageTitle }}</h1>
<div class="api-content">
{{ content | safe }}
Expand Down
16 changes: 16 additions & 0 deletions src/_includes/svg/azure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions src/_includes/svg/blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/_includes/svg/green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/_includes/svg/yellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,23 @@ collections:
name: excerpt
widget: text
hint: The excerpt is shown in search results.
- label: Locale
name: locale
widget: string
required: false
hint: The locale of the page. If you do not specify a locale, default will be set to en-CA.
- label: Navigation Order
name: menu_order
widget: number
default: 0
required: true
hint: |-
This determines where the page should appear in the primary navigation. To hide the page from the primary navigation, set the value to zero.
- label: Navigation Key
name: key
widget: string
required: false
hint: The title appears in the primary navigation. If you do not specify a navigation key, title will be used.
- label: Permanent Link
name: permalink
widget: string
Expand Down
Binary file added src/assets/fonts/Montserrat-Bold.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-BoldItalic.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-Italic.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-Medium.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-MediumItalic.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-Regular.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-SemiBold.woff2
Binary file not shown.
Binary file added src/assets/fonts/Montserrat-SemiBoldItalic.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8576393

Please sign in to comment.