Skip to content

Commit

Permalink
v0.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Sep 5, 2024
1 parent efd2555 commit 062379c
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 79 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/nationalarchives/tna-frontend-jinja/compare/v0.2.11...HEAD)
## [Unreleased](https://github.com/nationalarchives/tna-frontend-jinja/compare/v0.2.12...HEAD)

### Added
### Changed
Expand All @@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security

## [0.2.12](https://github.com/nationalarchives/tna-frontend-jinja/compare/v0.2.11...v0.2.12) - 2024-09-05

### Changed

- Upgraded TNA Frontend to `v0.2.12`

## [0.2.11](https://github.com/nationalarchives/tna-frontend-jinja/compare/v0.2.10...v0.2.11) - 2024-08-30

### Changed
Expand Down
75 changes: 38 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,48 +54,49 @@ We test each component against its published [component fixtures](https://github

| TNA Frontend Jinja | Compatible TNA Frontend versions |
| ------------------ | -------------------------------- |
| `0.2.11` | `v0.2.11` |
| `0.2.10` | `v0.2.10` |
| `0.2.9` | `v0.2.9` |
| `0.2.8` | `v0.2.8` |
| `0.2.7` | `v0.2.7` |
| `0.2.6` | `v0.2.6` |
| `0.2.5` | `v0.2.5` |
| `0.2.4` | `v0.2.4` |
| `0.2.3` | `v0.2.3` |
| `0.2.2` | `v0.2.2` |
| `0.2.1` | `v0.2.1` |
| `0.2.0` | `v0.2.0` |
| `0.2.12` | `0.2.12` |
| `0.2.11` | `0.2.11` |
| `0.2.10` | `0.2.10` |
| `0.2.9` | `0.2.9` |
| `0.2.8` | `0.2.8` |
| `0.2.7` | `0.2.7` |
| `0.2.6` | `0.2.6` |
| `0.2.5` | `0.2.5` |
| `0.2.4` | `0.2.4` |
| `0.2.3` | `0.2.3` |
| `0.2.2` | `0.2.2` |
| `0.2.1` | `0.2.1` |
| `0.2.0` | `0.2.0` |

### v0.1.x

| TNA Frontend Jinja | Compatible TNA Frontend versions |
| --------------------- | ------------------------------------------ |
| `0.1.34` | `v0.1.65` |
| `0.1.33` | `v0.1.62`, `v0.1.63`, `v0.1.64` |
| `0.1.32` | `v0.1.60`, `v0.1.61` |
| `0.1.31` | `v0.1.59` |
| `0.1.30` | `v0.1.58` |
| `0.1.29` | `v0.1.57` |
| `0.1.28` | `v0.1.55`, `v0.1.56` |
| `0.1.27` | `v0.1.54` |
| `0.1.26` | `v0.1.53` |
| `0.1.25` | `v0.1.51`, `v0.1.52` |
| `0.1.23`, `0.1.24` | `v0.1.50` |
| `0.1.21`, `0.1.22` | `v0.1.49` |
| `0.1.20` | `v0.1.48` |
| `0.1.19` | `v0.1.45`, `v0.1.46`, `v0.1.47` |
| `0.1.18` | `v0.1.44` |
| `0.1.17` | `v0.1.43` |
| `0.1.15`, `0.1.16` | `v0.1.42` |
| `0.1.14` | `v0.1.40`, `v0.1.41` |
| `0.1.13` | `v0.1.39` |
| `0.1.12` | `v0.1.37`, `v0.1.38` |
| `0.1.11` | `v0.1.36` |
| `0.1.10` | `v0.1.34`, `v0.1.35` |
| `0.1.9` | `v0.1.33` |
| `0.1.7`, `0.1.8` | `v0.1.31`, `v0.1.32` |
| `0.1.6` | `v0.1.29-prerelease`, `v0.1.30` |
| `0.1.34` | `0.1.65` |
| `0.1.33` | `0.1.62`, `0.1.63`, `0.1.64` |
| `0.1.32` | `0.1.60`, `0.1.61` |
| `0.1.31` | `0.1.59` |
| `0.1.30` | `0.1.58` |
| `0.1.29` | `0.1.57` |
| `0.1.28` | `0.1.55`, `0.1.56` |
| `0.1.27` | `0.1.54` |
| `0.1.26` | `0.1.53` |
| `0.1.25` | `0.1.51`, `0.1.52` |
| `0.1.23`, `0.1.24` | `0.1.50` |
| `0.1.21`, `0.1.22` | `0.1.49` |
| `0.1.20` | `0.1.48` |
| `0.1.19` | `0.1.45`, `0.1.46`, `0.1.47` |
| `0.1.18` | `0.1.44` |
| `0.1.17` | `0.1.43` |
| `0.1.15`, `0.1.16` | `0.1.42` |
| `0.1.14` | `0.1.40`, `0.1.41` |
| `0.1.13` | `0.1.39` |
| `0.1.12` | `0.1.37`, `0.1.38` |
| `0.1.11` | `0.1.36` |
| `0.1.10` | `0.1.34`, `0.1.35` |
| `0.1.9` | `0.1.33` |
| `0.1.7`, `0.1.8` | `0.1.31`, `0.1.32` |
| `0.1.6` | `0.1.29-prerelease`, `0.1.30` |
| `0.1.0`–`0.1.5` | [latest from `main` branch when published] |

## Test the templates
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 @@ -4,7 +4,7 @@
"test": "node test-fixtures.mjs"
},
"dependencies": {
"@nationalarchives/frontend": "0.2.11",
"@nationalarchives/frontend": "0.2.12",
"diff": "^5.1.0",
"glob": "^10.2.7",
"js-beautify": "^1.14.8",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="tna-frontend-jinja",
version="0.2.11",
version="0.2.12",
author="Andrew Hosgood",
author_email="[email protected]",
description="TNA Frontend Jinja templates",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro tnaAccordion(params) %}
{%- set containerClasses = [params.classes] if params.classes else [] -%}
{%- set classes = containerClasses | join(' ') -%}
<div class="tna-accordion{% if classes %} {{ classes }}{% endif %}" data-multipleitems="{{ 'true' if params.openMultipleItems else 'false' }}" data-module="tna-accordion" {%- if params.attributes %}{% for attribute, value in params.attributes.items() %} {{ attribute }}{% if value != '' %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>
<div class="tna-accordion{% if classes %} {{ classes }}{% endif %}" data-multiselectable="{{ 'true' if params.openMultipleItems else 'false' }}" data-module="tna-accordion" {%- if params.attributes %}{% for attribute, value in params.attributes.items() %} {{ attribute }}{% if value != '' %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>
{%- for item in params['items'] %}
<div class="tna-accordion__item" data-isopen="{{ 'true' if item.open else 'false' }}">
<h{{ params.itemHeadingLevel }} class="tna-accordion__heading tna-heading-s">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2 class="tna-heading-m">{{ params.title or "This website uses cookies" }}</h2>
{% endif %}
<div class="tna-button-group">
{{ tnaButton({
"text": "Close this message",
"text": "Hide cookies message",
"buttonElement": true,
"attributes": {
"value": "close"
Expand All @@ -58,7 +58,7 @@ <h2 class="tna-heading-m">{{ params.title or "This website uses cookies" }}</h2>
{% endif %}
<div class="tna-button-group">
{{ tnaButton({
"text": "Close this message",
"text": "Hide cookies message",
"buttonElement": true,
"attributes": {
"value": "close"
Expand Down
40 changes: 21 additions & 19 deletions tna_frontend_jinja/templates/components/files-list/macro.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@
{%- for item in params['items'] %}
<li class="tna-files-list__item">
<h{{ params.itemHeadingLevel }} class="tna-files-list__item-title tna-heading-s">
<a href="{{ item.href }}" class="tna-files-list__link">{{ item.text }}</a>
<a href="{{ item.href }}" class="tna-files-list__link" aria-describedby="{{ item.id }}">{{ item.text }}</a>
</h{{ params.itemHeadingLevel }}>
<dl class="tna-dl-chips tna-dl-chips--plain tna-files-list__item-meta">
<dt>File type</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileType }}</span>
</dd>
<dt>File size</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileSize }}</span>
</dd>
{% if item.fileExtent %}
<dt>Extent</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileExtent }}</span>
</dd>
<div class="tna-files-list__item-body" id="{{ item.id }}">
<dl class="tna-dl-chips tna-dl-chips--plain tna-files-list__item-meta">
<dt>File type</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileType }}</span>
</dd>
<dt>File size</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileSize }}</span>
</dd>
{% if item.fileExtent %}
<dt>Extent</dt>
<dd>
<span class="tna-dl-chips__item">{{ item.fileExtent }}</span>
</dd>
{% endif %}
</dl>
{% if item.description %}
<p class="tna-files-list__item-description">{{ item.description }}</p>
{% endif %}
</dl>
{% if item.description %}
<p class="tna-files-list__item-description">{{ item.description }}</p>
{% endif %}
</div>
</li>
{%- endfor %}
</ul>
Expand Down
6 changes: 2 additions & 4 deletions tna_frontend_jinja/templates/components/pagination/macro.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
'text': params.previous.text if params.previous.text else "Previous",
'href': params.previous.href,
'title': params.previous.title,
'icon': "arrow-left",
'iconSvg': '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>',
'plain': not params.solid,
'iconOnlyOnMobile': True,
'attributes': {
'rel': "prev"
}
Expand Down Expand Up @@ -51,9 +50,8 @@
'text': params.next.text if params.next.text else "Next",
'href': params.next.href,
'title': params.next.title,
'icon': "arrow-right",
'iconSvg': '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/></svg>',
'plain': not params.solid,
'iconOnlyOnMobile': True,
'classes': "tna-button--icon-right",
'attributes': {
'rel': "next"
Expand Down
16 changes: 7 additions & 9 deletions tna_frontend_jinja/templates/components/tabs/macro.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
{%- set containerClasses = containerClasses + ['tna-tabs--sticky'] -%}
{%- endif -%}
<div class="tna-tabs {{ ' '.join(containerClasses) }}" data-module="tna-tabs" {%- if params.attributes %}{% for attribute, value in params.attributes.items() %} {{ attribute }}{% if value != '' %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>
<ul class="tna-tabs__list" role="tablist" hidden>
<div class="tna-tabs__list" role="tablist" hidden>
{% for item in params['items'] %}
<li class="tna-tabs__list-item">
<button type="button" class="tna-tabs__button" id="{{ item.id }}-tab" aria-controls="{{ item.id }}" role="tab">
<span class="tna-tabs__button-inner">
{{ item.title }}
</span>
</button>
</li>
<button type="button" class="tna-tabs__button" id="{{ item.id }}-tab" aria-controls="{{ item.id }}" role="tab">
<span class="tna-tabs__button-inner">
{{ item.title }}
</span>
</button>
{% endfor %}
</ul>
</div>
<div class="tna-tabs__items">
{% for item in params['items'] %}
<section id="{{ item.id }}" class="tna-tabs__item">
Expand Down

0 comments on commit 062379c

Please sign in to comment.