-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into expandable-menus
- Loading branch information
Showing
66 changed files
with
332 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<%= tag.header(class: classes) do %> | ||
|
||
<%= header_image %> | ||
|
||
<%= tag.div(class: header_image ? "content" : "content wide") do %> | ||
|
||
<%= tag.h1(class: "title") do %> | ||
<% Array.wrap(title).each do |p| %> | ||
<%= tag.span(p) %> | ||
<% end %> | ||
<% end %> | ||
|
||
<% if show_title_paragraph? %> | ||
<%= tag.p(title_paragraph, class: "title_paragraph") %> | ||
<% end %> | ||
|
||
<% end %> | ||
|
||
<% end %> |
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,27 @@ | ||
module Content | ||
class LandingHeroComponent < ViewComponent::Base | ||
attr_accessor :colour, :image, :title, :title_paragraph | ||
|
||
def initialize(colour:, image:, title:, title_paragraph: nil) | ||
super | ||
@colour = colour | ||
@image = image | ||
@title = title | ||
@title_paragraph = title_paragraph | ||
end | ||
|
||
def header_image | ||
image_pack_tag(@image, **helpers.image_alt_attribs(@image)) if @image | ||
end | ||
|
||
def show_title_paragraph? | ||
@title_paragraph.present? | ||
end | ||
|
||
def classes | ||
%w[landing-hero].tap do |c| | ||
c << colour if colour | ||
end | ||
end | ||
end | ||
end |
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
5 changes: 2 additions & 3 deletions
5
app/views/content/events/get-the-most-from-events/_header.html.erb
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Get the most", "from an event"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Get the most from an event", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
2 changes: 1 addition & 1 deletion
2
app/views/content/events/get-the-most-from-events/_steps.html.erb
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Explore", "teaching", "advisers"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Explore teaching advisers", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
image: @front_matter["image"], | ||
) %> |
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
2 changes: 1 addition & 1 deletion
2
app/views/content/is-teaching-right-for-me/computing/_article.html.erb
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
4 changes: 2 additions & 2 deletions
4
app/views/content/is-teaching-right-for-me/computing/_header.html.erb
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Become a", "computing teacher"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Become a computing teacher", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
) %> |
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
2 changes: 1 addition & 1 deletion
2
app/views/content/is-teaching-right-for-me/engineers-teach-physics/_article.html.erb
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
4 changes: 2 additions & 2 deletions
4
app/views/content/is-teaching-right-for-me/engineers-teach-physics/_header.html.erb
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Engineers teach", "physics"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Engineers teach physics", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
) %> |
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
2 changes: 1 addition & 1 deletion
2
app/views/content/is-teaching-right-for-me/maths/_article.html.erb
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
4 changes: 2 additions & 2 deletions
4
app/views/content/is-teaching-right-for-me/maths/_header.html.erb
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Become a", "maths teacher"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Become a maths teacher", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
) %> |
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
4 changes: 2 additions & 2 deletions
4
app/views/content/is-teaching-right-for-me/physics/_header.html.erb
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Become a", "physics teacher"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Become a physics teacher", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
) %> |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Sign up for an", "adviser"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Sign up for an adviser", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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
5 changes: 2 additions & 3 deletions
5
app/views/content/landing/campus-mailing-list/_header.html.erb
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Sign up for", "emails"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Sign up for emails", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
2 changes: 1 addition & 1 deletion
2
app/views/content/landing/campus-mailing-list/_mailing-list.html.erb
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["You're more of a teacher than", "you think"], | ||
colour: "grow", | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "You're more of a teacher than you think", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Food for", "thought"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Food for thought", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
image: @front_matter["image"], | ||
) %> |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Grow as only", "a teacher can"], | ||
colour: "grow", | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Grow as only a teacher can", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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
9 changes: 4 additions & 5 deletions
9
app/views/content/landing/how-much-do-teachers-get-paid/_header.html.erb
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["How much do teachers", "get paid?"], | ||
colour: "grow", | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "How much do teachers get paid?", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"] | ||
) %> |
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
7 changes: 3 additions & 4 deletions
7
app/views/content/landing/how-to-become-a-teacher/_header.html.erb
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["How to become", "a teacher"], | ||
colour: "grow", | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "How to become a teacher", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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
7 changes: 3 additions & 4 deletions
7
app/views/content/landing/how-to-fund-your-teacher-training/_header.html.erb
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Fund your", "teacher training"], | ||
colour: "grow", | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Fund your teacher training", | ||
colour: @front_matter["colour"], | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<%= render Content::CampaignHeroComponent.new( | ||
title: ["Get personalised", "guidance"], | ||
colour: @front_matter["colour"], | ||
<%= render Content::LandingHeroComponent.new( | ||
title: "Get personalised guidance", | ||
colour: "pink-blue", | ||
image: @front_matter["image"], | ||
background_colour: "grey" | ||
) %> |
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.