-
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
d01ec98
commit 1d115ef
Showing
9 changed files
with
283 additions
and
9 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
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