-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update logic for showing banner styling
- Loading branch information
Showing
9 changed files
with
89 additions
and
24 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
class HomeController < ApplicationController | ||
helper_method :section, | ||
:page | ||
layout 'hero' | ||
|
||
def index; 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
doctype html | ||
html.govuk-template lang='en' | ||
head | ||
title= [t('service.name'), yield(:page_title).presence].compact.join(' : ') | ||
= csrf_meta_tags | ||
= csp_meta_tag | ||
|
||
= tag.meta content: 'text/html; charset=UTF-8', 'http-equiv': 'Content-Type' | ||
= render 'layouts/analytics_header' | ||
= render 'layouts/hotjar' | ||
|
||
= tag.meta content: 'width=device-width,initial-scale=1', name: 'viewport' | ||
= tag.meta name: 'robots', content: 'noindex,nofollow' unless Rails.application.live? | ||
= tag.meta property: 'og:image', content: image_path('images/govuk-opengraph-image.png') | ||
= tag.meta name: 'description', content: @page&.meta_description if @page&.meta_description.present? | ||
= csrf_meta_tags | ||
= tag.meta name: 'theme-color', content: '#0b0c0c' | ||
|
||
= favicon_link_tag image_path('dfe_favicon.ico') | ||
= favicon_link_tag asset_path('images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" | ||
= favicon_link_tag asset_path('images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' | ||
= favicon_link_tag asset_path('images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' | ||
= favicon_link_tag asset_path('images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' | ||
= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' | ||
= stylesheet_link_tag 'application', 'data-turbo-track': 'reload' | ||
= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true | ||
= yield :head | ||
|
||
body#hero-layout.govuk-template__body | ||
script | ||
| document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled'); | ||
|
||
= render 'layouts/analytics_body' | ||
= render 'layouts/cookie_banner' | ||
|
||
= govuk_skip_link | ||
|
||
= navigation | ||
|
||
.dfe-content-page--header class='govuk-!-padding-bottom-7' | ||
.dfe-width-container | ||
= render 'layouts/banner' | ||
= yield :hero | ||
|
||
.dfe-width-container | ||
main#main-content.govuk-main-wrapper role='main' | ||
= yield | ||
|
||
= yield :other_resources | ||
|
||
= render FooterComponent.new(pages: Page.footer.pages) |
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,9 @@ | ||
require 'rails_helper' | ||
|
||
xdescribe 'ApplicationHelper', type: :helper do | ||
describe '#html_title' do | ||
it 'shows content' do | ||
expect(page).to have_content 'content within html_title' | ||
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,13 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe 'Homepage' do | ||
before do | ||
visit '/' | ||
end | ||
|
||
specify do | ||
within '#hero-layout' do | ||
expect(page).to have_content 'Find helpful articles and resources to support you in your setting.' | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.