Skip to content

Commit 3c4deaa

Browse files
author
Jane
committed
add related records and website content sections (hard coded)
1 parent f276825 commit 3c4deaa

File tree

3 files changed

+92
-7
lines changed

3 files changed

+92
-7
lines changed

sass/includes/_record-links.scss

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.record-links {
2+
$root: &;
3+
24
&__wrapper {
35
display: flex;
46
align-items: center;
@@ -28,6 +30,15 @@
2830
padding-bottom: 2rem;
2931
width: 100%;
3032

33+
&--card {
34+
@include colour.colour-border(
35+
"accent-background",
36+
0.3rem,
37+
solid,
38+
top
39+
);
40+
}
41+
3142
@media (min-width: #{$screen__lg + 1px}) {
3243
display: flex;
3344
}

sass/includes/_section.scss

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
.section {
2+
&--bg {
3+
@include colour.colour-background("accent-background-light");
4+
}
5+
26
&--pink {
37
background-color: $color__pink;
48
}
9+
10+
&--padding {
11+
padding: 3rem 0;
12+
}
513
}

templates/records/record_detail_inline.html

+73-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{% endblock extra_gtm_js %}
1010

1111
{% block content %}
12-
1312
<div class="tna-container">
1413
<div class="tna-column">
1514
{% include "includes/records/record-title.html" %}
@@ -69,13 +68,16 @@ <h2 class="heading heading--two">
6968
<div class="uv" id="uv" data-js-iiif-viewer-manifest-url="{{ iiif_manifest_url }}">Loading</div>
7069
{% endif %}
7170

72-
{% comment %} {% if record.hierarchy %}
73-
{% if record.hierarchy|length > 2 %}
74-
<h2 class="tna-heading-l">This record is in the series</h2>
71+
{% comment %}
72+
Hardcoded version below for testing purposes while data isn't available
73+
{% if record.hierarchy %}
74+
{% if record.hierarchy|length > 2 %}
75+
<h2 class="tna-heading-l">This record is in the series</h2>
7576

76-
{% include "includes/records/record-series-panel.html" %}
77-
{% endif %}
78-
{% endif %} {% endcomment %}
77+
{% include "includes/records/record-series-panel.html" %}
78+
{% endif %}
79+
{% endif %}
80+
{% endcomment %}
7981

8082
<h2 class="heading tna-heading-l">This record is in the series</h2>
8183

@@ -96,6 +98,70 @@ <h3 class="tna-heading-l series-panel__heading">
9698
</div>
9799
</div>
98100

101+
{% comment %} TODO: Replace with non-hardcoded component-ised version once BE in place {% endcomment %}
102+
<div class="section tna-!--margin-top-l">
103+
<div class="tna-container record-links">
104+
<div class="tna-column">
105+
<h2 class="heading tna-heading-l">Records from the same series</h2>
106+
</div>
107+
<ul class="card-group--list-style-none">
108+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
109+
<div class="record-links__item record-links__item--card">
110+
<div class="record-links__item__text">
111+
<p class="record-links__item__reference"><span class="sr-only">Link to record </span>IN THE CATALOGUE: WO 208/3324/115</p>
112+
<h2 class="tna-heading-l record-links__item__title">
113+
<a href="/">Escape/Evasion Reports: Code MI9/SPG: 2722</a>
114+
</h2>
115+
<p class="record-links__item__dates">1944</p>
116+
</div>
117+
</div>
118+
</li>
119+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
120+
<div class="record-links__item record-links__item--card">
121+
<div class="record-links__item__text">
122+
<p class="record-links__item__reference"><span class="sr-only">Link to record </span>IN THE CATALOGUE: WO 208/3324/115</p>
123+
<h2 class="tna-heading-l record-links__item__title">
124+
<a href="/">Escape/Evasion Reports: Code MI9/SPG: 2722</a>
125+
</h2>
126+
<p class="record-links__item__dates">1944</p>
127+
</div>
128+
</div>
129+
</li>
130+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
131+
<div class="record-links__item record-links__item--card">
132+
<div class="record-links__item__text">
133+
<p class="record-links__item__reference"><span class="sr-only">Link to record </span>IN THE CATALOGUE: WO 208/3324/115</p>
134+
<h2 class="tna-heading-l record-links__item__title">
135+
<a href="/">Escape/Evasion Reports: Code MI9/SPG: 2722</a>
136+
</h2>
137+
<p class="record-links__item__dates">1944</p>
138+
</div>
139+
</div>
140+
</li>
141+
</ul>
142+
</div>
143+
</div>
144+
145+
{% comment %} TODO: Replace with non-hardcoded component-ised version once BE in place {% endcomment %}
146+
<div class="section section--bg section--padding tna-!--margin-top-l">
147+
<div class="tna-container">
148+
<div class="tna-column">
149+
<h2 class="heading tna-heading-l">Related website content</h2>
150+
</div>
151+
<ul class="card-group--list-style-none">
152+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
153+
{% include "../components/card.html" with horizontal=true title='Great Escapes' href='#' imageSrc=card_image.url imageWidth=800 imageHeight=450 text='Find out more about our new exhibition exploring both iconic and under-told stories of prisoners of war and civilian internees during the Second World War.' headingSize="s" headingLevel=3 label=link_page.is_newly_published|yesno:"New," index=forloop.counter0 heading=heading supertitle='Exhibition' %}
154+
</li>
155+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
156+
{% include "../components/card.html" with horizontal=true title='Judy, the only dog registered as a prisoner of war' href='#' imageSrc=card_image.url imageWidth=800 imageHeight=450 text='Judys remarkable story is one of capture, survival and courage, and offers a unique tale of internment during the war.' headingSize="s" headingLevel=3 label=link_page.is_newly_published|yesno:"New," index=forloop.counter0 heading=heading supertitle='Story of' %}
157+
</li>
158+
<li class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-top-l">
159+
{% include "../components/card.html" with horizontal=true title='Escaping Colditz' href='#' imageSrc=card_image.url imageWidth=800 imageHeight=450 text='Discover how Allied prisoners of war survived and daringly tried to escape this seemingly secure fortification.' headingSize="s" headingLevel=3 label=link_page.is_newly_published|yesno:"New," index=forloop.counter0 heading='Highlights Gallery' supertitle='Highlights Gallery' %}
160+
</li>
161+
</ul>
162+
</div>
163+
</div>
164+
99165
{% endblock %}
100166

101167
{% block extra_js %}

0 commit comments

Comments
 (0)