-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add layouts that use the gem layout component #2411
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,49 @@ | ||
<% | ||
full_width ||= false | ||
|
||
if @emergency_banner | ||
emergency_banner = render "components/emergency_banner", { | ||
campaign_class: @emergency_banner.campaign_class, | ||
heading: @emergency_banner.heading, | ||
link: @emergency_banner.link, | ||
link_text: @emergency_banner.link_text, | ||
short_description: @emergency_banner.short_description, | ||
} | ||
end | ||
|
||
user_satisfaction_survey = '<div id="user-satisfaction-survey-container"></div>' | ||
global_bar = render "components/global_bar" | ||
%> | ||
|
||
<%= render "govuk_publishing_components/components/layout_for_public", { | ||
emergency_banner: emergency_banner, | ||
full_width: full_width, | ||
global_bar: user_satisfaction_survey + global_bar, | ||
navigation_items: [ | ||
{ | ||
text: "Account", | ||
href: Plek.new.find("account-manager"), | ||
data: { | ||
module: "explicit-cross-domain-links", | ||
link_for: "accounts-signed-in", | ||
}, | ||
}, | ||
{ | ||
text: "Sign out", | ||
href: Plek.new.website_root + "/transition-check/logout", | ||
data: { | ||
module: "explicit-cross-domain-links", | ||
link_for: "accounts-signed-in", | ||
}, | ||
}, | ||
{ | ||
text: "Sign in", | ||
href: Plek.new.website_root + "/transition-check/login", | ||
data: { | ||
module: "explicit-cross-domain-links", | ||
link_for: "accounts-signed-out", | ||
}, | ||
}], | ||
title: content_for?(:title) ? yield(:title) : "GOV.UK - The best place to find government services and information", | ||
|
||
} %> |
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 @@ | ||
<%= render partial: "gem_base" %> |
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,3 @@ | ||
<%= render partial: 'gem_base', locals: { | ||
full_width: true, | ||
} %> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 +1,27 @@ | ||
# Slimmer Templates | ||
|
||
## `gem_layout` | ||
|
||
This template uses the [public layout component] from the GOV.UK Publishing Components gem. It supplies the header and footer only - this includes the cookie banner, skip to content link, header bar, emergency banner, survery banner, global bar, feedback, and footer. The content is constrained and centred. | ||
|
||
## `gem_layout_full_width` | ||
|
||
This is the same as the `gem_layout` template, except that this layout **doesn't** constrain and centre the content to the same width as the GOV.UK header. | ||
|
||
Use this layout if you want to have full width content - such as the blue welcome bar on the GOV.UK homepage. | ||
|
||
## `core_layout` (default) | ||
|
||
This template contains styles for the black header bar, the footer and core | ||
layout classes. By default it will center your content to the same width as the | ||
GOV.UK header. It provides classes for grid layouts using the column mixins | ||
from the frontend toolkit. | ||
This template contains styles for the black header bar, the footer and core layout classes. By default it will centre your content to the same width as the GOV.UK header. It provides classes for grid layouts using the column mixins from the frontend toolkit. | ||
|
||
It is recommended that new applications use this template so they behave in a | ||
consistent way. | ||
This layout uses deprecated dependencies. | ||
|
||
## `header_footer_only` | ||
|
||
This template only contains styles for the black header bar and the footer of | ||
GOV.UK. | ||
This template only contains styles for the black header bar and the footer of GOV.UK. | ||
|
||
Use this layout if you want to explicitly control the full layout of your page including centering all the content. | ||
|
||
This layout uses deprecated dependencies. | ||
|
||
Use this layout if you want to explicitly control the full layout of your page | ||
including centering all the content. | ||
[public layout component]: https://components.publishing.service.gov.uk/component-guide/layout_for_public |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not-related to this change, but I'm not sure bowl is still a thing 😬