Skip to content

Commit 28fe20e

Browse files
authored
Removed other phase-banner tests
2 parents f6b4bf8 + 5df29ed commit 28fe20e

File tree

8 files changed

+126
-24
lines changed

8 files changed

+126
-24
lines changed

docs/Gemfile.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ GEM
9595
rbs (>= 3, < 4)
9696
sorbet-runtime (>= 0.5.10782)
9797
safe_yaml (1.0.5)
98-
sass-embedded (1.69.5-arm64-darwin)
98+
sass-embedded (1.69.5)
9999
google-protobuf (~> 3.23)
100-
sass-embedded (1.69.5-x86_64-linux-gnu)
100+
rake (>= 13.0.0)
101+
sass-embedded (1.69.5-arm64-darwin)
101102
google-protobuf (~> 3.23)
102103
sorbet-runtime (0.5.11466)
103104
strscan (3.1.0)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div class="nhsuk-phase-banner" id="{{include.phase_id}}">
2+
<div class="nhsuk-width-container">
3+
<p class="nhsuk-phase-banner__content">
4+
<strong class="nhsuk-tag">{{include.phase_tag}}</strong>
5+
<span class="nhsuk-phase-banner__text">{{include.phase_text}}</span>
6+
</p>
7+
</div>
8+
</div>
9+
<script>
10+
console.log("{{include.auto_hide}}")
11+
if ("{{include.auto_hide}}" == 'true' && (window.location.hostname.startsWith('notify.nhs.uk') || window.location.hostname.startsWith('127.0.0.2'))) {
12+
document.getElementById("{{ include.phase_id }}").style.visibility = 'hidden';
13+
}
14+
</script>

docs/_includes/primary-navigation.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,26 @@
99
{% endfor -%}
1010
</ul>
1111
</nav>
12+
13+
{% include components/phase-banner.html
14+
auto_hide='true'
15+
phase_id= 'dev'
16+
phase_tag= 'Developer'
17+
phase_text='This is a developer preview of notify.nhs.uk. <a href="https://notify.nhs.uk">Go to the live NHS Notify
18+
website.</a>'
19+
%}
20+
21+
{% include components/phase-banner.html
22+
phase_id= 'new'
23+
phase_tag= 'New'
24+
phase_text='This is new'
25+
auto_hide='false'
26+
%}
27+
28+
29+
{% include components/phase-banner.html
30+
phase_id= 'new'
31+
phase_tag= 'WOOHAA'
32+
phase_text='This is new'
33+
auto_hide='false'
34+
%}

docs/_layouts/no-nav-page.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: default
3+
---
4+
5+
{% assign current_dir = page.dir %}
6+
{% assign paths = page.dir | split: "/" %}
7+
{% assign parent_dir = paths[1] %}
8+
9+
{%-
10+
assign nav_pages = site.pages
11+
| where_exp: "item", "item.dir contains parent_dir"
12+
-%}
13+
14+
{% assign first_level_dir = parent_dir | prepend: '/' | append: '/' %}
15+
{%-
16+
assign first_level = nav_pages
17+
| where_exp: "item", "item.dir == first_level_dir"
18+
| group_by: "section"
19+
| sort: 'name', 'last'
20+
-%}
21+
22+
<div class="nhsuk-width-container">
23+
<main class="nhsuk-main-wrapper" id="maincontent" role="main">
24+
<div class="nhsuk-grid-row">
25+
<div class="nhsuk-grid-column-full">
26+
<div class="nhsnotify-pane__main-content nhsuk-grid-column-three-quarters">
27+
{% if page.section != undefined %}
28+
<heading class="nhsuk-heading-s" style="margin-bottom: 0; color: #4c6272">{{ page.section }}</heading>
29+
{% endif %}
30+
<h1>{{ page.title }}</h1>
31+
{{ content }}
32+
</div>
33+
</div>
34+
</div>
35+
</main>
36+
</div>

docs/_layouts/page.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
---
44

55
{% assign current_dir = page.dir %}
6-
{% assign paths = page.dir | split: "/" %}
6+
{% assign paths = page.dir | split: "/" %}
77
{% assign parent_dir = paths[1] %}
88

99
{%-
10-
assign nav_pages = site.pages
11-
| where_exp: "item", "item.dir contains parent_dir"
10+
assign nav_pages = site.pages
11+
| where_exp: "item", "item.dir contains parent_dir"
1212
-%}
1313

1414
{% assign first_level_dir = parent_dir | prepend: '/' | append: '/' %}
1515
{%-
16-
assign first_level = nav_pages
17-
| where_exp: "item", "item.dir == first_level_dir"
18-
| group_by: "section"
19-
| sort: 'name', 'last'
16+
assign first_level = nav_pages
17+
| where_exp: "item", "item.dir == first_level_dir"
18+
| group_by: "section"
19+
| sort: 'name', 'last'
2020
-%}
2121
<div class="nhsuk-width-container">
2222
<main class="nhsuk-main-wrapper" id="maincontent" role="main">
@@ -26,21 +26,21 @@
2626
<div class="nhsnotify-pane__side-bar nhsuk-grid-column-one-quarter">
2727
<nav class="nhsnotify-side-nav">
2828
<ul class="nhsuk-list nhsnotify-side-nav__list">
29-
{% for section in first_level %}
29+
{% for section in first_level %}
3030
{% if section.name != "" %}
31-
<p class="nhsuk-u-font-weight-bold nhsnotify-side-nav__list-section">{{ section.name }}</p>
31+
<p class="nhsuk-u-font-weight-bold nhsnotify-side-nav__list-section">{{ section.name }}</p>
3232
{% endif %}
33-
{% assign sorted = section.items | sort: 'nav_order' %}
34-
{% for post in sorted %}
35-
<li class="
33+
{% assign sorted = section.items | sort: 'nav_order' %}
34+
{% for post in sorted %}
35+
<li class="
3636
nhsnotify-side-nav__item
3737
{% if post.url == page.url %}
3838
nhsnotify-side-nav__item--current
3939
{% endif %}
4040
">
41-
<a class="nhsnotify-side-nav__link" href="{{ site.baseurl | append: post.url }}">{{ post.title }}</a>
42-
</li>
43-
{% endfor %}
41+
<a class="nhsnotify-side-nav__link" href="{{ site.baseurl | append: post.url }}">{{ post.title }}</a>
42+
</li>
43+
{% endfor %}
4444
{% endfor %}
4545
</ul>
4646

docs/_sass/_nhsnotify.scss

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
width: unset;
33
background-color: unset;
44
border-bottom: 0;
5-
margin:unset;
5+
margin: unset;
66
}
77

88
.nhsnotify-banner--blue {
@@ -68,14 +68,42 @@
6868
}
6969

7070
.nhsuk-header__navigation-list {
71-
justify-content: flex-start;
72-
flex-wrap: wrap;
71+
justify-content: flex-centre;
7372
}
7473

7574
.nhsuk-header__navigation-link {
76-
text-decoration: none;
75+
text-decoration: underline;
7776

7877
&:hover {
79-
text-decoration: underline;
78+
text-decoration: none;
8079
}
8180
}
81+
82+
.nhsuk-phase-banner {
83+
padding-top: 10px;
84+
padding-bottom: 10px;
85+
background-color: #fff;
86+
}
87+
88+
.nhsuk-phase-banner__content {
89+
font-size: 1rem;
90+
line-height: 1.25;
91+
margin-bottom: 0px;
92+
}
93+
94+
.nhsuk-tag {
95+
outline: 2px solid transparent;
96+
outline-offset: -2px;
97+
color: #fff;
98+
background-color: #005eb8;
99+
letter-spacing: 1px;
100+
text-decoration: none;
101+
text-transform: uppercase;
102+
font-weight: 700;
103+
}
104+
105+
.nhsuk-phase-banner__text {
106+
font-size: 1rem;
107+
line-height: 1.25;
108+
padding-left: 0.5em;
109+
}

docs/pages/get-started/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Feel free to add content and custom Front Matter to this file.
33
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
44

5-
layout: page
5+
layout: no-nav-page
66
title: Get started
77
nav_order: 6
88
has_children: true

docs/pages/support/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Feel free to add content and custom Front Matter to this file.
33
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
44

5-
layout: page
5+
layout: no-nav-page
66
title: Support
77
nav_order: 5
88
has_children: true

0 commit comments

Comments
 (0)