Skip to content

Commit

Permalink
Merge pull request #5275 from alphagov/review-app-complex-header
Browse files Browse the repository at this point in the history
Add ‘complex header’ example to review app
  • Loading branch information
querkmachine authored Sep 3, 2024
2 parents 88dc4af + 0d2370a commit 5ae4fe1
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ notes: Based on https://www.gov.uk/government/news/strictly-vampires-and-sausage
---
{% extends "layouts/full-page-example.njk" %}

{% from "govuk/components/service-navigation/macro.njk" import govukServiceNavigation %}
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{% from "govuk/components/inset-text/macro.njk" import govukInsetText %}

{% set pageTitle = example.title %}
{% block pageTitle %}{{ pageTitle }} - GOV.UK{% endblock %}

{% block header %}
{{ govukHeader({
{{ govukHeader({}) }}
{{ govukServiceNavigation({
navigation: [
{
href: "#1",
Expand Down
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 %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Companies you follow
name: Companies you follow (service navigation with service name)
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 header %}
{{ govukHeader({
classes: "govuk-header--full-width-border"
}) }}
{{ govukServiceNavigation({
classes: "app-service-navigation",
serviceName: "Find company information",
serviceUrl: "#0",
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
}
]
}) }}
{% 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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,7 @@ scenario: |

{% block header %}
{{ govukHeader({
serviceName: "Apply for a passport",
navigation: [
{
href: "/",
text: "Home"
},
{
href: "#upload-a-photo",
text: "Upload a photo",
active: true
}
]
serviceName: "Apply for a passport"
}) }}
{% endblock %}

Expand Down

0 comments on commit 5ae4fe1

Please sign in to comment.