-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refs #384] Create summary list component from GOV.UK
Summary list component styles, markup, macro and documentation taken from the GOV.UK Frontend.
- Loading branch information
1 parent
bc23d52
commit 16855b4
Showing
12 changed files
with
753 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Summary list' %} | ||
{% from "components/summary-list/macro.njk" import summaryList %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-full"> | ||
|
||
{{ summaryList({ | ||
rows: [ | ||
{ | ||
key: { | ||
text: "Name" | ||
}, | ||
value: { | ||
text: "Sarah Philips" | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: "#", | ||
text: "Change", | ||
visuallyHiddenText: "name" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Date of birth" | ||
}, | ||
value: { | ||
text: "5 January 1978" | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: "#", | ||
text: "Change", | ||
visuallyHiddenText: "date of birth" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact information" | ||
}, | ||
value: { | ||
html: "72 Guild Street<br>London<br>SE23 6FH" | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: "#", | ||
text: "Change", | ||
visuallyHiddenText: "contact information" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact details" | ||
}, | ||
value: { | ||
html: '<p>07700 900457</p><p>sarah.phillips@example.com</p>' | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: "#", | ||
text: "Change", | ||
visuallyHiddenText: "contact details" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Summary list without actions' %} | ||
{% from "components/summary-list/macro.njk" import summaryList %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-full"> | ||
|
||
{{ summaryList({ | ||
rows: [ | ||
{ | ||
key: { | ||
text: "Name" | ||
}, | ||
value: { | ||
text: "Sarah Philips" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Date of birth" | ||
}, | ||
value: { | ||
text: "5 January 1978" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact information" | ||
}, | ||
value: { | ||
html: "72 Guild Street<br>London<br>SE23 6FH" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact details" | ||
}, | ||
value: { | ||
html: '<p>07700 900457</p><p>sarah.phillips@example.com</p>' | ||
} | ||
} | ||
] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Summary list without border' %} | ||
{% from "components/summary-list/macro.njk" import summaryList %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-full"> | ||
|
||
{{ summaryList({ | ||
classes: 'nhsuk-summary-list--no-border', | ||
rows: [ | ||
{ | ||
key: { | ||
text: "Name" | ||
}, | ||
value: { | ||
text: "Sarah Philips" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Date of birth" | ||
}, | ||
value: { | ||
text: "5 January 1978" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact information" | ||
}, | ||
value: { | ||
html: "72 Guild Street<br>London<br>SE23 6FH" | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Contact details" | ||
}, | ||
value: { | ||
html: '<p>07700 900457</p><p>sarah.phillips@example.com</p>' | ||
} | ||
} | ||
] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% 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
Oops, something went wrong.