-
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.
Adding new responsive table component and renaming original table con…
…tainer
- Loading branch information
Showing
12 changed files
with
470 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Tables' %} | ||
{% from 'components/tables/macro.njk' import table %} | ||
{% 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-two-thirds"> | ||
{{ table({ | ||
responsive: true, | ||
panel: false, | ||
caption: "Ibuprofen syrup dosages for children", | ||
firstCellIsHeader: false, | ||
head: [ | ||
{ | ||
text: "Age" | ||
}, | ||
{ | ||
text: "How much?" | ||
}, | ||
{ | ||
text: "How often?" | ||
} | ||
], | ||
rows: [ | ||
[ | ||
{ | ||
header: "Age", | ||
text: "3 to 5 months (weighing more than 5kg)" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "2.5ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "6 to 11 months" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "2.5l" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 to 4 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "1 to 3 years" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "5ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "4 to 6 years" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "7.5ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "7 to 9 years" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "10ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "10 to 11 years" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "15ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 times in 24 hours" | ||
} | ||
], | ||
[ | ||
{ | ||
header: "Age", | ||
text: "12 to 17 years" | ||
}, | ||
{ | ||
header: "How much?", | ||
text: "15ml to 20ml" | ||
}, | ||
{ | ||
header: "How often?", | ||
text: "Max 3 to 4 times in 24 hours" | ||
} | ||
] | ||
] | ||
}) }} | ||
</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
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
Oops, something went wrong.