-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refs #318] Tidy up of code and outputted markup of components
Removing any whitespace to tidy up resultant markup and refactor nunjucks templates to make them more readable. Templates amended: - action link - back link - breadcrumb - button - care card - contents list - date input - hint More to come...
- Loading branch information
1 parent
a5927cb
commit 8a40a7d
Showing
8 changed files
with
54 additions
and
29 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
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,16 +1,18 @@ | ||
<nav class="nhsuk-contents-list{% if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} role="navigation" aria-label="Pages in this guide"> | ||
<nav class="nhsuk-contents-list | ||
{%- if params.classes %} {{ params.classes }}{% endif %}" | ||
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} role="navigation" aria-label="Pages in this guide"> | ||
<h2 class="nhsuk-u-visually-hidden">Contents</h2> | ||
<ol class="nhsuk-contents-list__list"> | ||
{% for item in params.items %} | ||
{% if item.current %} | ||
{%- for item in params.items %} | ||
{%- if item.current %} | ||
<li class="nhsuk-contents-list__item" aria-current="page"> | ||
<span class="nhsuk-contents-list__current">{{ item.text }}</span> | ||
</li> | ||
{% else %} | ||
{%- else %} | ||
<li class="nhsuk-contents-list__item"> | ||
<a class="nhsuk-contents-list__link" href="{{ item.href }}">{{ item.text }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{%- endif %} | ||
{%- endfor %} | ||
</ol> | ||
</nav> |
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,4 +1,6 @@ | ||
<span class="nhsuk-hint {%- if params.classes %} {{ params.classes }}{% endif %}" {%- if params.id %} id="{{ params.id }}"{% endif %} | ||
<span class="nhsuk-hint | ||
{%- if params.classes %} {{ params.classes }}{% endif %}" | ||
{%- if params.id %} id="{{ params.id }}"{% endif %} | ||
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}> | ||
{{ params.html | safe if params.html else params.text }} | ||
</span> |