-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split complex header example into two
Create examples with and without the service name in the Service navigation component to demonstrate differences in HTML landmarks
- Loading branch information
1 parent
273984a
commit 0d2370a
Showing
2 changed files
with
106 additions
and
35 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
...es/govuk-frontend-review/src/views/full-page-examples/companies-you-follow-slot/index.njk
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,101 @@ | ||
--- | ||
title: Companies you follow | ||
name: Companies you follow (service navigation with slots) | ||
scenario: | | ||
You are a user logged into Companies House WebFiling service, looking at a | ||
list of companies you are following. | ||
notes: Based on Companies House "Find an update company information" service | ||
--- | ||
|
||
{% extends "layouts/full-page-example.njk" %} | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %} | ||
{% from "govuk/components/header/macro.njk" import govukHeader %} | ||
{% from "govuk/components/service-navigation/macro.njk" import govukServiceNavigation %} | ||
{% from "govuk/components/phase-banner/macro.njk" import govukPhaseBanner %} | ||
|
||
{% set pageTitle = example.title %} | ||
{% block pageTitle %}{{ pageTitle }} - GOV.UK{% endblock %} | ||
|
||
{% block head %} | ||
{{ super() }} | ||
<style> | ||
.app-service-navigation .govuk-service-navigation__wrapper { | ||
flex-grow: 1; | ||
} | ||
.app-sign-out { | ||
margin-left: auto; | ||
padding: 15px 0 10px; | ||
} | ||
.app-sign-out .govuk-button { | ||
margin: 0; | ||
width: auto; | ||
} | ||
</style> | ||
{% endblock %} | ||
|
||
{% set signOutButton %} | ||
<li class="govuk-service-navigation__item app-sign-out"> | ||
{{ govukButton({ | ||
type: "button", | ||
classes: "govuk-button--inverse", | ||
text: "Sign out" | ||
}) }} | ||
</li> | ||
{% endset %} | ||
|
||
{% block header %} | ||
{{ govukHeader({ | ||
classes: "govuk-header--full-width-border", | ||
serviceName: "Find and update company information", | ||
serviceUrl: "#0" | ||
}) }} | ||
{{ govukServiceNavigation({ | ||
classes: "app-service-navigation", | ||
navigation: [ | ||
{ | ||
href: '#1', | ||
text: 'Search the register' | ||
}, | ||
{ | ||
href: '#2', | ||
text: 'Your details' | ||
}, | ||
{ | ||
href: '#3', | ||
text: 'Your filings' | ||
}, | ||
{ | ||
href: '#4', | ||
text: 'Companies you follow', | ||
current: true | ||
} | ||
], | ||
slots: { | ||
navigationEnd: signOutButton | ||
} | ||
}) }} | ||
{% endblock %} | ||
|
||
{% block beforeContent %} | ||
{{ govukPhaseBanner({ | ||
tag: { | ||
text: "Alpha" | ||
}, | ||
html: 'This is a new service. Help us improve it and <a class="govuk-link" href="#">give your feedback by email</a>.' | ||
}) }} | ||
{{ govukBreadcrumbs({ | ||
items: [ | ||
{ | ||
text: "Home", | ||
href: "#0" | ||
} | ||
] | ||
}) }} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<h1 class="govuk-heading-xl">Companies you follow</h1> | ||
<p class="govuk-body">You are not following any companies.</p> | ||
{% endblock %} |
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