Browse Source

Add tasklist css as it's not included in gov uk frontend yet

pull/21/head
baarkerlounger 3 years ago
parent
commit
91d1345c3e
  1. 82
      app/javascript/styles/_task-list.scss
  2. 2
      app/javascript/styles/application.scss
  3. 26
      app/views/case_logs/show.html.erb

82
app/javascript/styles/_task-list.scss

@ -0,0 +1,82 @@
// Task list pattern
.app-task-list {
list-style-type: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
@include govuk-media-query($from: tablet) {
min-width: 550px;
}
}
.app-task-list__section {
display: table;
@include govuk-font($size:24, $weight: bold);
}
.app-task-list__section-number {
display: table-cell;
@include govuk-media-query($from: tablet) {
min-width: govuk-spacing(6);
padding-right: 0;
}
}
.app-task-list__items {
@include govuk-font($size: 19);
@include govuk-responsive-margin(9, "bottom");
list-style: none;
padding-left: 0;
@include govuk-media-query($from: tablet) {
padding-left: govuk-spacing(6);
}
}
.app-task-list__item {
border-bottom: 1px solid $govuk-border-colour;
margin-bottom: 0 !important;
padding-top: govuk-spacing(2);
padding-bottom: govuk-spacing(2);
@include govuk-clearfix;
}
.app-task-list__item:first-child {
border-top: 1px solid $govuk-border-colour;
}
.app-task-list__task-name {
display: block;
@include govuk-media-query($from: 450px) {
float: left;
}
}
// The `app-task-list__task-completed` class was previously used on the task
// list for the completed tag (changed in 86c90ec) it's still included here to
// avoid breaking task lists in existing prototypes.
.app-task-list__tag,
.app-task-list__task-completed {
margin-top: govuk-spacing(2);
margin-bottom: govuk-spacing(1);
@include govuk-media-query($from: 450px) {
float: right;
margin-top: 0;
margin-bottom: 0;
}
}
//custom
.app-task-list {
&__item:target {
}
&--no-numbers &__items {
@include govuk-media-query($from: tablet) {
padding-left: 0;
}
}
}

2
app/javascript/styles/application.scss

@ -10,3 +10,5 @@ $govuk-font-url-function: frontend-font-url;
$govuk-image-url-function: frontend-image-url;
@import "~govuk-frontend/govuk/all";
@import '_task-list'

26
app/views/case_logs/show.html.erb

@ -1,3 +1,29 @@
<h1 class="govuk-heading-xl">Tasklist for log <%= @case_log.id %></h1>
<h2 class="govuk-heading-s govuk-!-margin-bottom-2">This submission is <%= @case_log.status %></h2>
<br />
<ol class="app-task-list app-task-list--no-numbers">
<li>
<h2 class="app-task-list__section">
<span class="app-task-list__section-number">About the household</span>
</h2>
<ul class="app-task-list__items">
<li class="app-task-list__item">
<a class="task-name" href="">Household characteristics</a>
<strong class="govuk-tag govuk-tag--grey app-task-list__tag">Not started</strong>
</li>
<li class="app-task-list__item">
<a class="task-name" href="">Household situation</a>
<strong class="govuk-tag govuk-tag--grey app-task-list__tag">Not started</strong>
</li>
<li class="app-task-list__item">
<a class="task-name" href="">Household needs</a>
<strong class="govuk-tag govuk-tag--grey app-task-list__tag">Not started</strong>
</li>
</ul>
</li>
</ol>

Loading…
Cancel
Save