Skip to content

Commit 1f007dd

Browse files
committed
Tidy up courses page to use standard page title component and remove uneccessary spacing
1 parent b4f6c34 commit 1f007dd

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

app/views/courses/index.html.erb

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
<% meta_tag :title, 'Courses - Teach Computing' %>
2-
<%= render 'components/hero', hero_title: 'Computing courses for teachers', glyph_position: 'bottom', colour: 'lime-green' %>
2+
<%= render Cms::PageTitleComponent.new(title: "Computing courses for teachers") %>
33
<div data-controller="course-filter">
44
<%= render GovGridRowComponent.new(padding: {bottom: 2}) do |row| %>
5-
<%= row.with_column("two-thirds") do %>
6-
<p class="govuk-body">
5+
<%= row.with_column("full") do %>
6+
<p class="govuk-heading-m">
77
Discover our range of professional development courses, designed to help you teach computing. Courses cover key stages 1 to 4 and cater for all levels of knowledge.
88
</p>
99
<% end %>
10-
<%= row.with_column("one-third") do %>
11-
<%= render AsideComponent.new(title: "Costs") do |component| %>
12-
<% component.with_body do %>
13-
<p class="govuk-body">All our online courses are free to all educators. Additional fees are applicable to residential courses and are stated at the point of booking. </p>
14-
<% end %>
15-
<% end %>
16-
<% end %>
1710
<% end %>
1811

1912
<%= form_with url: course_filter_path, method: :get, class: 'ncce-courses__filter-form', data: { action: "ajax:success->course-filter#handleResults", 'course-filter-target': "form" } do %>
2013
<div class="govuk-width-container ncce-courses__container" data-course-filter-target="resultsContainer" id="results-top">
2114
<div class="govuk-main-wrapper ncce-courses__results-wrapper">
2215
<div class="govuk-grid-row">
2316
<div class="govuk-grid-column-one-third-from-desktop ncce-courses__filters-wrapper govuk-!-margin-bottom-3">
17+
<%= render AsideComponent.new(title: "Costs") do |component| %>
18+
<% component.with_body do %>
19+
<p class="govuk-body">All our online courses are free to all educators. Additional fees are applicable to residential courses and are stated at the point of booking. </p>
20+
<% end %>
21+
<% end %>
2422
<%= render 'courses/aside-filters' %>
2523
</div>
2624
<div class="govuk-grid-column-two-thirds-from-desktop">
27-
2825
<div data-course-filter-target="results">
2926
<%= render 'courses/courses-list' %>
3027
</div>

app/webpacker/stylesheets/components/courses/_courses.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151

5252
/* Move the title inside the filter box on mobile */
5353
&-title--desktop {
54+
border-top-color: $orange;
55+
border-top-style: solid;
56+
border-top-width: 3px;
57+
padding-top: 1rem;
58+
margin-top: 2rem;
59+
5460
@include govuk-media-query($until: desktop) {
5561
display: none;
5662
}

spec/views/courses/index.html_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
end
2626

2727
it "has a title" do
28-
expect(rendered).to have_css(
29-
".govuk-heading-xl",
30-
text: "Computing courses for teachers"
31-
)
28+
expect(rendered).to have_css(".govuk-heading-l", text: "Computing courses for teachers")
3229
end
3330

3431
it "renders the courses_list partial" do

0 commit comments

Comments
 (0)