Browse Source

Fix heading sizes

pull/102/head
Kat 4 years ago
parent
commit
eea756527e
  1. 1
      app/javascript/styles/_task-list.scss
  2. 2
      app/views/case_logs/_tasklist.html.erb
  3. 4
      app/views/case_logs/edit.html.erb
  4. 2
      app/views/case_logs/index.html.erb
  5. 2
      app/views/form/_checkbox_question.html.erb
  6. 2
      app/views/form/_date_question.html.erb
  7. 2
      app/views/form/_numeric_question.html.erb
  8. 2
      app/views/form/_radio_question.html.erb
  9. 2
      app/views/form/_select_question.html.erb
  10. 2
      app/views/form/_text_question.html.erb
  11. 4
      app/views/form/page.html.erb

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

@ -13,7 +13,6 @@
.app-task-list__section { .app-task-list__section {
display: table; display: table;
@include govuk-font($size:24, $weight: bold);
} }
.app-task-list__section-number { .app-task-list__section-number {

2
app/views/case_logs/_tasklist.html.erb

@ -1,7 +1,7 @@
<ol class="app-task-list app-task-list--no-numbers"> <ol class="app-task-list app-task-list--no-numbers">
<% @form.sections.map do |section| %> <% @form.sections.map do |section| %>
<li> <li>
<h2 class="app-task-list__section"> <h2 class="app-task-list__section govuk-heading-m">
<span class="app-task-list__section-number"> <span class="app-task-list__section-number">
<%= section.label %> <%= section.label %>
</span> </span>

4
app/views/case_logs/edit.html.erb

@ -1,10 +1,10 @@
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop"> <div class="govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-xl">Tasklist for log <h1 class="govuk-heading-l">Tasklist for log
<%= @case_log.id %></h1> <%= @case_log.id %></h1>
<h2 class="govuk-heading-s govuk-!-margin-bottom-2">This submission is <h2 class="govuk-heading-m govuk-!-margin-bottom-2">This submission is
<%= @case_log.status.to_s.humanize.downcase %></h2> <%= @case_log.status.to_s.humanize.downcase %></h2>
<p class="govuk-body govuk-!-margin-bottom-7">You've completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.</p> <p class="govuk-body govuk-!-margin-bottom-7">You've completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.</p>
<p class="govuk-body govuk-!-margin-bottom-7"> <p class="govuk-body govuk-!-margin-bottom-7">

2
app/views/case_logs/index.html.erb

@ -1,6 +1,6 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-full"> <div class="govuk-grid-column-full">
<h1 class="govuk-heading-xl">Your logs</h1> <h1 class="govuk-heading-l">Your logs</h1>
</div> </div>
<div class="govuk-grid-column-two-thirds-from-desktop"> <div class="govuk-grid-column-two-thirds-from-desktop">

2
app/views/form/_checkbox_question.html.erb

@ -1,5 +1,5 @@
<%= f.govuk_check_boxes_fieldset question.id.to_sym, <%= f.govuk_check_boxes_fieldset question.id.to_sym,
legend: { text: question.header.html_safe, size: "l" }, legend: { text: question.header.html_safe, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1"},
hint: { text: question.hint_text } do %> hint: { text: question.hint_text } do %>
<% question.answer_options.map do |key, val| %> <% question.answer_options.map do |key, val| %>

2
app/views/form/_date_question.html.erb

@ -1,6 +1,6 @@
<%= f.govuk_date_field question.id.to_sym, <%= f.govuk_date_field question.id.to_sym,
hint: { text: question.hint_text }, hint: { text: question.hint_text },
legend: { text: question.header.html_safe, size: "l"}, legend: { text: question.header.html_safe, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1"},
width: 20, width: 20,
**stimulus_html_attributes(question) **stimulus_html_attributes(question)
%> %>

2
app/views/form/_numeric_question.html.erb

@ -1,6 +1,6 @@
<%= f.govuk_number_field question.id.to_sym, <%= f.govuk_number_field question.id.to_sym,
hint: { text: question.hint_text }, hint: { text: question.hint_text },
label: { text: question.header.html_safe, size: "l"}, label: { text: question.header.html_safe, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1"},
min: question.min, max: question.max, step: question.step, min: question.min, max: question.max, step: question.step,
width: 20, :readonly => question.read_only?, width: 20, :readonly => question.read_only?,
**stimulus_html_attributes(question) **stimulus_html_attributes(question)

2
app/views/form/_radio_question.html.erb

@ -1,5 +1,5 @@
<%= f.govuk_radio_buttons_fieldset question.id.to_sym, <%= f.govuk_radio_buttons_fieldset question.id.to_sym,
legend: { text: question.header.html_safe, size: "l" }, legend: { text: question.header.html_safe, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1" },
hint: { text: question.hint_text }, hint: { text: question.hint_text },
small: (question.answer_options.size > 5) do %> small: (question.answer_options.size > 5) do %>

2
app/views/form/_select_question.html.erb

@ -3,6 +3,6 @@
answers, answers,
:name, :name,
:name, :name,
label: { text: question.header}, label: { text: question.header, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1"},
hint: { text: question.hint_text } hint: { text: question.hint_text }
%> %>

2
app/views/form/_text_question.html.erb

@ -1,6 +1,6 @@
<%= f.govuk_text_field question.id.to_sym, <%= f.govuk_text_field question.id.to_sym,
hint: { text: question.hint_text }, hint: { text: question.hint_text },
label: { text: question.header.html_safe, size: "l"}, label: { text: question.header.html_safe, size: page_header.nil? ? "l" : "m", tag: page_header.nil? ? "h2" : "h1"},
width: 20, width: 20,
**stimulus_html_attributes(question) **stimulus_html_attributes(question)
%> %>

4
app/views/form/page.html.erb

@ -6,7 +6,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop"> <div class="govuk-grid-column-two-thirds-from-desktop">
<% if page.header.present? %> <% if page.header.present? %>
<h1 class="govuk-heading-xl"> <h1 class="govuk-heading-l">
<%= page.header %> <%= page.header %>
</h1> </h1>
<% end %> <% end %>
@ -14,7 +14,7 @@
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<% page.questions.map do |question| %> <% page.questions.map do |question| %>
<div id=<%= question.id + "_div " %><%= display_question_key_div(page, question) %> > <div id=<%= question.id + "_div " %><%= display_question_key_div(page, question) %> >
<%= render partial: "form/#{question.type}_question", locals: { question: question, f: f } %> <%= render partial: "form/#{question.type}_question", locals: { question: question, page_header: page.header, f: f } %>
</div> </div>
<% end %> <% end %>

Loading…
Cancel
Save