Skip to content

Commit

Permalink
Update pattern to use variables for statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Dec 14, 2023
1 parent d24f595 commit d0cb3b7
Showing 1 changed file with 16 additions and 33 deletions.
49 changes: 16 additions & 33 deletions templates/task-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ <h1 class="govuk-heading-l">{{ serviceName }}</h1>

<h2 class="govuk-heading-m">[ Heading for first set of tasks ]</h2>

{% set completedStatus = {
text: "Completed"
} %}

{% set incompleteStatus = {
text: "Incomplete",
classes: "govuk-tag--blue"
} %}

{{ govukTaskList({
idPrefix: "first-section",
items: [
Expand All @@ -24,22 +33,15 @@ <h2 class="govuk-heading-m">[ Heading for first set of tasks ]</h2>
text: "Name of first task"
},
href: "#",
status: {
text: "Completed"
}
status: completedStatus
},
{
title:
{
text: "Name of second task"
},
href: "#",
status: {
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
status: incompleteStatus
}
]
})
Expand All @@ -56,58 +58,39 @@ <h2 class="govuk-heading-m govuk-!-margin-top-5">[ Heading for second set of tas
text: "Name of third task"
},
href: "#",
status: {
text: "Completed"
}
status: completedStatus
},
{
title:
{
text: "Name of fifth task"
},
href: "#",
status: {
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
status: incompleteStatus
},
{
title:
{
text: "Name of sixth task"
},
href: "#",
status: {
text: "Completed"
}
status: completedStatus
},
{
title:
{
text: "Name of seventh task"
},
href: "#",
status: {
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
status: incompleteStatus
},
{
title:
{
text: "Name of eighth task"
},
href: "#",
status: {
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
status: incompleteStatus
}
]
})
Expand Down

0 comments on commit d0cb3b7

Please sign in to comment.