-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TNA Frontend, refactor section index pages
- Loading branch information
Showing
62 changed files
with
241 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% extends "./_design-system-base.njk" %} | ||
|
||
{%- from "nationalarchives/components/card/macro.njk" import tnaCard -%} | ||
|
||
{% block cookies %} | ||
<a id="top"></a> | ||
{{ super() }} | ||
{% endblock %} | ||
|
||
{% block skipLink %} | ||
{{ super() }} | ||
{{ tnaSkipLink({ | ||
href: group + '-list', | ||
text: 'Skip to list of ' + group | ||
}) }} | ||
{% endblock %} | ||
|
||
{% block main %} | ||
{% set headings = contents | headingsList %} | ||
{% set groupTitle = group | kebabToSpace | capitalize %} | ||
{% set topLevel = groupTitle == title | capitalize %} | ||
<div class="tna-background-accent"> | ||
{% include "partials/breadcrumbs.njk" %} | ||
</div> | ||
<main class="tna-main {{ mainClasses }}" id="main-content"> | ||
<div class="tna-background-accent"> | ||
<div class="tna-container tna-section tna-!--padding-bottom-xl"> | ||
<div class="tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny"> | ||
<h1 class="tna-heading-xl"> | ||
{{ title }} | ||
</h1> | ||
<p class="tna-large-paragraph">{{ description }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
{%- if contents %} | ||
<div class="tna-section tna-container"> | ||
<div class="tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny"> | ||
{{ contents | safe }} | ||
</div> | ||
</div> | ||
{%- endif %} | ||
<nav id="{{ group }}-list" class="tna-section tna-!--no-padding-bottom" aria-label="{{ groupTitle }} pages"> | ||
<ul class="tna-container tna-ul tna-ul--plain"> | ||
{% for item in collections[group] %} | ||
<li class="tna-column tna-column--width-1-4 tna-column--width-1-3-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-bottom-l"> | ||
{{ tnaCard({ | ||
title: item.title, | ||
href: "/design-system/" + item.path, | ||
text: item.description | ||
}) }} | ||
</li> | ||
{%- endfor %} | ||
</div> | ||
</nav> | ||
</main> | ||
{% endblock %} | ||
|
||
{% block bodyEnd %} | ||
{{ super() }} | ||
<script src="/design-system/collection.js"></script> | ||
<script src="/design-system/sidebar.js"></script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
--- | ||
layout: collection-page.njk | ||
title: Details | ||
description: Make a page easier to scan by letting users reveal more detailed information only if they need it. | ||
group: components | ||
--- | ||
|
||
{% from "partials/example.njk" import example %} | ||
{% from "partials/component-status.njk" import status %} | ||
|
||
Make a page easier to scan by letting users reveal more detailed information only if they need it. | ||
|
||
{{ example({ group: "components", item: "details", example: "default", html: true, nunjucks: true, size: "s" }) }} | ||
|
||
{{ status(false, 1, 1, 2, 2, false) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
--- | ||
layout: collection-page.njk | ||
title: Featured records | ||
description: The featured records component can be used to show a list of related or interesting records. | ||
group: components | ||
--- | ||
|
||
{% from "partials/example.njk" import example %} | ||
{% from "partials/component-status.njk" import status %} | ||
|
||
The featured records component can be used to show a list of related or interesting records. | ||
|
||
{{ example({ group: "components", item: "featured-records", example: "default", html: true, nunjucks: true, size: "l" }) }} | ||
|
||
{{ status(false, 0, 1, 2, 2, false) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.