-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend layout for public with account components
Update layout_for_public component to support GOVUK account components. Existing variations of the component will remain unchanged, but a few options have been introduced to support the main GOVUK account layout variations. The intention is for this to be used with a layout template in static, to apply account-like page furniture to pages that should have the account layout, while not being rendered by the govuk-account-manager-prototype app.
- Loading branch information
1 parent
e549a4e
commit a474f81
Showing
11 changed files
with
295 additions
and
8 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
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
18 changes: 18 additions & 0 deletions
18
...ovuk_publishing_components/components/layout_for_public/_account-feedback-footer.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<%= tag.div(class: "govuk-width-container") do %> | ||
<%= tag.div(class: "gem-c-layout-for-public-account-feedback-footer") do %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: t("components.layout_for_public.account_layout.feedback.banners.title"), | ||
heading_level: 2, | ||
font_size: "m", | ||
margin_bottom: 4, | ||
} %> | ||
|
||
<p class="govuk-body govuk-!-margin-bottom-0"> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_intro") %> | ||
<a href="<%= "#{Plek.find('account-manager')}/feedback" %>" class="govuk-link"> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_link") %> | ||
</a> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_outro") %> | ||
</p> | ||
<% end %> | ||
<% end %> |
29 changes: 29 additions & 0 deletions
29
app/views/govuk_publishing_components/components/layout_for_public/_account-layout.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="govuk-width-container"> | ||
<% message = capture do %> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_intro") %> | ||
<a class="govuk-link" href=<%= "#{Plek.find('account-manager')}/feedback" %>> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_link") %> | ||
</a> | ||
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_outro") %> | ||
<% end %> | ||
|
||
<%= render "govuk_publishing_components/components/phase_banner", { | ||
phase: "alpha", | ||
message: message | ||
} unless omit_account_phase_banner %> | ||
|
||
<div class="govuk-grid-row govuk-main-wrapper"> | ||
<%= tag.div(class: 'govuk-grid-column-one-third') do %> | ||
<%= render "govuk_publishing_components/components/layout_for_public/account-navigation", { page_is: account_nav_location} %> | ||
<% end unless omit_account_navigation %> | ||
|
||
<div class="govuk-grid-column-two-thirds"> | ||
<div id="wrapper"> | ||
<%= yield :before_content %> | ||
<main role="main" id="content"> | ||
<%= yield %> | ||
</main> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
...ews/govuk_publishing_components/components/layout_for_public/_account-navigation.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<% page_is ||= nil %> | ||
|
||
<nav aria-label="Account management" class="gem-c-layout-for-public-account-nav"> | ||
<ul class="gem-c-layout-for-public-account-menu"> | ||
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "your-account" %>"> | ||
<%= link_to( | ||
t("components.layout_for_public.account_layout.navigation.menu_bar.account.link_text"), | ||
"#{Plek.find('account-manager')}", | ||
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state', | ||
'aria-current': page_is == "your-account" ? "page" : nil, | ||
) %> | ||
</li> | ||
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "manage" %>"> | ||
<%= link_to( | ||
t("components.layout_for_public.account_layout.navigation.menu_bar.manage.link_text"), | ||
"#{Plek.find('account-manager')}/account/manage", | ||
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state', | ||
'aria-current': page_is == "manage" ? "page" : nil, | ||
) %> | ||
</li> | ||
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "security" %>"> | ||
<%= link_to( | ||
t("components.layout_for_public.account_layout.navigation.menu_bar.security.link_text"), | ||
"#{Plek.find('account-manager')}/account/security", | ||
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state', | ||
'aria-current': page_is == "security" ? "page" : nil, | ||
) %> | ||
</li> | ||
</ul> | ||
</nav> |
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