Skip to content

Commit 5d8cb9e

Browse files
Add mission patch page (#202)
Adds a new mission patch page.
1 parent 4048af7 commit 5d8cb9e

File tree

20 files changed

+163
-42
lines changed

20 files changed

+163
-42
lines changed

app/_components/_all.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
@import "email/email";
2+
@import "gallery/gallery";
23
@import "header/header";
34
@import "screenshots/screenshots";
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.app-gallery {
2+
padding: 0;
3+
list-style: none;
4+
}
5+
6+
.app-gallery--layout-thumbnails {
7+
display: grid;
8+
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
9+
grid-gap: govuk-spacing(6);
10+
11+
figure {
12+
@include govuk-responsive-margin(2, "bottom");
13+
14+
> a {
15+
display: block;
16+
}
17+
18+
> img {
19+
object-fit: cover;
20+
object-position: top;
21+
}
22+
}
23+
}
24+
25+
.app-prose-scope .app-gallery--mission-patches {
26+
27+
figure {
28+
// Remove styling that figures get by default
29+
background-color: inherit;
30+
border-bottom: none;
31+
@include govuk-font(19);
32+
padding: 20px 0 0 0;
33+
img {
34+
outline: none;
35+
}
36+
}
37+
38+
figcaption {
39+
@include govuk-font(19);
40+
padding: 20px 0 0 0;
41+
color: #4c6272;
42+
}
43+
}

app/_components/gallery/macro.njk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% macro appGallery(params) %}
2+
{%- include "./template.njk" -%}
3+
{% endmacro %}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<ul class="app-gallery{% if params.classes %} {{ params.classes }} {% endif %}{% if params.layout != false %} app-gallery--layout-{{ params.layout or "thumbnails" }}{% endif %}">
2+
{%- for item in params.items %}
3+
{%- set id = item.id or (item.text | slugify) -%}
4+
{%- set file = item.src or (id + ".png") -%}
5+
{%- set alt = item.alt or ("Screenshot of " + item.text) -%}
6+
<li class="app-gallery__item" id="{{ id }}">
7+
<figure>
8+
<a href="{{ file }}"><img src="{{ file }}" alt="{{ alt }}"></a>
9+
{%- if item.caption or item.text %}
10+
<figcaption>{{ item.caption or item.text | markdown | safe }}</figcaption>
11+
{%- endif %}
12+
</figure>
13+
</li>
14+
{%- endfor %}
15+
</ul>

app/_layouts/product.njk

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,32 @@
9191
{% endfor %}
9292

9393
<div class="govuk-grid-row">
94-
<div class="govuk-grid-column-full">
95-
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
94+
<div class="govuk-grid-column-two-thirds">
95+
<h2 class="govuk-heading-l">
96+
Reference
97+
</h2>
98+
</div>
99+
</div>
100+
101+
<div class="govuk-grid-row">
96102

97-
{% for item in collections.all | eleventyNavigation(options.homeKey) %}
98-
{% if ("Guide" == item.title) %}
103+
{% for item in collections.all | eleventyNavigation(options.homeKey) %}
104+
{% if (item.title == "Guide") %}
105+
<section class="govuk-grid-column-one-half govuk-!-margin-bottom-6">
99106
<h3 class="govuk-heading-m govuk-!-margin-bottom-1">
100107
<a href="{{ item.url | pretty }}">{{ item.title }}</a>
101108
</h3>
102109
<p class="govuk-body">{{ item.excerpt }}</p>
103-
{% endif %}
104-
{% endfor %}
105-
</div>
110+
</section>
111+
{% endif %}
112+
{% endfor %}
113+
<section class="govuk-grid-column-one-half govuk-!-margin-bottom-6">
114+
<h3 class="govuk-heading-m govuk-!-margin-bottom-1">
115+
<a href="./mission-patches">Mission patches</a>
116+
</h3>
117+
<p class="govuk-body">Archive of patches created to celebrate milestones in the development of our different services.</p>
118+
</section>
119+
106120
</div>
107121

108122
{% endif %}
Binary file not shown.
Binary file not shown.
Binary file not shown.
574 KB
Loading
84.3 KB
Loading

0 commit comments

Comments
 (0)