-
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.
Merge pull request #2255 from alphagov/public-layout-for-account
Extend layout for public with account components
- Loading branch information
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