Skip to content

Commit

Permalink
Update Node version and tna-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 6, 2023
1 parent 5b46b34 commit f859d4e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .metalsmith/markdownRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ markdownRenderer.paragraph = function (text) {
</p>`;
};

markdownRenderer.link = function (href, title, text) {
return `<a href="${href}" class="tna-link--no-visited-state"${
title ? ` title="${title}"` : ""
}>${text}</a>`;
};

markdownRenderer.table = function (head, body) {
const formatRows = (row) =>
row
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
1 change: 1 addition & 0 deletions layouts/_design-system-base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

{% block stylesheets %}
<link rel="stylesheet" href="/design-system/css/index.css">
<link rel="stylesheet" href="https://use.typekit.net/hkj3kuz.css">
{% endblock %}

{% block cookies %}
Expand Down
14 changes: 7 additions & 7 deletions layouts/collection-page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<ol class="tna-ol tna-ol--plain- tna-!--hide-on-large tna-!--hide-on-medium">
{%- for heading in headings %}
<li>
<a href="#{{ heading.href }}">
<a href="#{{ heading.href }}" class="tna-link--no-visited-state">
{{ heading.title }}
</a>
</li>
Expand All @@ -51,33 +51,33 @@
<ol class="tna-ds-sidebar">
{% if not topLevel %}
<li class="tna-ds-sidebar__item">
<a href="/design-system/{{ group }}" class="tna-ds-sidebar__link">{{ groupTitle }} overview</a>
<a href="/design-system/{{ group }}" class="tna-ds-sidebar__link tna-link--no-visited-state">{{ groupTitle }} overview</a>
</li>
{% endif %}
{% for item in collections[group] %}
{% if item.path == path %}
<li class="tna-ds-sidebar__item tna-ds-sidebar__item--current">
<a href="/design-system/{{ item.path }}" class="tna-ds-sidebar__link">{{ item.title }}</a>
<a href="/design-system/{{ item.path }}" class="tna-ds-sidebar__link tna-link--no-visited-state">{{ item.title }}</a>
{% if headings %}
{# TODO: Make a marco for this recursion #}
<ol class="tna-ds-sidebar__sections tna-!--hide-on-small tna-!--hide-on-tiny">
{%- for heading in headings %}
<li class="tna-ds-sidebar__section">
<a href="#{{ heading.href }}" class="tna-ds-sidebar__section-link">
<a href="#{{ heading.href }}" class="tna-ds-sidebar__section-link tna-link--no-visited-state">
{{ heading.title }}
</a>
{# {%- if heading.children %}
<ol class="tna-ds-sidebar__sections">
{%- for child in heading.children %}
<li class="tna-ds-sidebar__section">
<a href="#{{ child.href }}" class="tna-ds-sidebar__section-link">
<a href="#{{ child.href }}" class="tna-ds-sidebar__section-link tna-link--no-visited-state">
{{ child.title }}
</a>
{%- if child.children %}
<ol class="tna-ds-sidebar__sections">
{%- for childChild in child.children %}
<li class="tna-ds-sidebar__section">
<a href="#{{ childChild.href }}" class="tna-ds-sidebar__section-link">
<a href="#{{ childChild.href }}" class="tna-ds-sidebar__section-link tna-link--no-visited-state">
{{ childChild.title }}
</a>
</li>
Expand All @@ -95,7 +95,7 @@
</li>
{% else %}
<li class="tna-ds-sidebar__item">
<a href="/design-system/{{ item.path }}" class="tna-ds-sidebar__link">{{ item.title }}</a>
<a href="/design-system/{{ item.path }}" class="tna-ds-sidebar__link tna-link--no-visited-state">{{ item.title }}</a>
</li>
{% endif %}
{% endfor %}
Expand Down
7 changes: 7 additions & 0 deletions lib/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ table {
line-height: 1.5rem;
text-align: center;

&,
&:link,
&:visited,
&:active {
@include colour.colour-font("link");
}

&::after {
display: none;
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@metalsmith/markdown": "^1.10.0",
"@metalsmith/permalinks": "^2.5.1",
"@metalsmith/sass": "^1.6.0",
"@nationalarchives/frontend": "^0.1.23-prerelease",
"@nationalarchives/frontend": "0.1.24-prerelease",
"glob": "^10.3.4",
"gray-matter": "^4.0.3",
"js-beautify": "^1.14.8",
Expand Down

0 comments on commit f859d4e

Please sign in to comment.