Skip to content

Commit

Permalink
Add more details to archives
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 15, 2024
1 parent 21d39fe commit 9191ccb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
2 changes: 2 additions & 0 deletions app/lib/template_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def article_supertitle(s):
return "Focus on"
if s == "articles.RecordArticlePage":
return "Record revealed"
if s == "collections.HighlightGalleryPage":
return "Gallery"
return ""


Expand Down
36 changes: 29 additions & 7 deletions app/templates/catalogue/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,52 @@ <h2 class="tna-heading-l">Contact information</h2>
{% endif %}
{% if data.contact_info.url %}
<dt>Website</dt>
<dd><a href="{{ data.contact_info.url }}" rel="noopener noreferrer">{{ data.contact_info.url }}</a></dd>
<dd><a href="{{ data.contact_info.url }}" target="_blank" title="Website for {{ data.name }} (opens in new tab)" rel="noopener noreferrer">{{ data.contact_info.url }}</a></dd>
{% endif %}
<dt>Opening times</dt>
<dd>???</dd>
</dl>
</aside>
</div>
</section>
<section class="tna-container tna-section">
<div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
{% if data.opening_times or data.disabled_access or data.fee or data.appointment %}
<h2 class="tna-heading-l">Visiting {{ data.name }}</h2>
<dl class="tna-dl tna-dl--plain">
{% if data.opening_times %}
<dt>Opening times</dt>
<dd>{{ data.opening_times | safe }}</dd>
{% endif %}
{% if data.disabled_access %}
<dt>Disabled access</dt>
<dd>{{ data.disabled_access | safe }}</dd>
{% endif %}
{% if data.fee %}
<dt>Fee</dt>
<dd>{{ data.fee }}</dd>
{% endif %}
{% if data.appointment %}
<dt>Appointment</dt>
<dd>{{ data.appointment }}</dd>
{% endif %}
</dl>
{% endif %}
<h2 class="tna-heading-l">Key information</h2>
<dl class="tna-dl tna-dl--plain">
<dt>ARCHON code</dt>
<dd>{{ data.archon }}</dd>
</dl>
{% if data.information %}
<div class="etna-space-above">
{{ data.information | safe }}
</div>
{% endif %}
</div>
</section>
{% if data.agents %}
<section class="tna-section tna-!--padding-top-s">
<div class="tna-container">
<div class="tna-column tna-column--full">
<h2 class="tna-heading-l">Collections information</h2>


<ul class="tna-ul">
{% for agent in data.agents %}
{% if data.agents[agent] | length %}
Expand All @@ -71,7 +93,6 @@ <h2 class="tna-heading-l">Collections information</h2>
{% endif %}
{% endfor %}
</ul>

</div>
{% for agent in data.agents %}
{% if data.agents[agent] | length %}
Expand Down Expand Up @@ -104,8 +125,9 @@ <h3 class="tna-heading-m">Paper catalogues available to view at The National Arc
<ul class="tna-ul">
{% for item in data.manifestations %}
<li>
NRA {{ item.nra }}
<a href="{{ item.url }}">
{{ item.title[0].value }}
{{ item.title }}
</a>
</li>
{% endfor %}
Expand Down
5 changes: 4 additions & 1 deletion app/templates/explore/highlight-gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
<article>
<header class="tna-section tna-container">
<div class="tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny">
<h1 class="tna-heading-xl">{{ page_data['title'] }}</h1>
<hgroup class="tna-hgroup-xl">
<p class="tna-hgroup__supertitle">{{ page_data['meta']['type'] | article_supertitle }}</p>
<h1 class="tna-hgroup__title">{{ page_data['title'] }}</h1>
</hgroup>
{{ page_data['intro'] | safe }}
</div>
</header>
Expand Down

0 comments on commit 9191ccb

Please sign in to comment.