Skip to content

Commit

Permalink
Meta tag fixes and squashed loading (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Oct 13, 2023
1 parent 338b6b0 commit 9ffdc2d
Show file tree
Hide file tree
Showing 41 changed files with 55 additions and 136 deletions.
4 changes: 1 addition & 3 deletions etna/users/templates/users/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "wagtailadmin/base.html" %}

{% load i18n %}
{% load wagtailusers_tags %}
{% load wagtailadmin_tags %}
{% load i18n wagtailusers_tags wagtailadmin_tags %}

{% block titletag %}{% trans "Beta Tester Users" %}{% endblock %}

Expand Down
4 changes: 1 addition & 3 deletions templates/account/login.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load i18n %}
{% load account %}
{% load static %}
{% load i18n account static %}

{% block title %}{% trans "Login" %}{% endblock %}

Expand Down
10 changes: 2 additions & 8 deletions templates/articles/article_index_page.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{% extends 'base_page.html' %}

{% load static %}
{% load i18n %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% load wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% load static i18n wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %}

{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro %}
<div class="container">
Expand Down
9 changes: 2 additions & 7 deletions templates/articles/article_page.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{% extends 'base_page.html' %}

{% load static %}
{% load wagtailcore_tags %}
{% load sections_tags %}
{% load wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% load static wagtailcore_tags sections_tags wagtailmetadata_tags %}

{% block breadcrumb %}{% endblock %}
{% block content %}
{% include 'includes/generic-intro.html' with breadcrumb=True title=page.title intro=page.intro %}
Expand Down
3 changes: 1 addition & 2 deletions templates/articles/blocks/featured_collection.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load wagtailimages_tags %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags wagtailcore_tags %}

<div class="featured-collection">
<div class="tna-column tna-column--full">
Expand Down
6 changes: 1 addition & 5 deletions templates/articles/focused_article_page.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{% extends 'base_page.html' %}

{% load static wagtailcore_tags sections_tags wagtailmetadata_tags %}
{% load static wagtailcore_tags sections_tags wagtailmetadata_tags wagtailimages_tags %}

{% load wagtailimages_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% block body_class %}template-focused-article{% endblock %}
{% block breadcrumb %}{% endblock %}

Expand Down
5 changes: 2 additions & 3 deletions templates/articles/record_article_page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% extends "base_page.html" %}

{% load static wagtailcore_tags sections_tags wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}

{% block content %}
{% include "includes/record-revealed-intro.html" with display_content_warning=page.display_content_warning custom_warning_text=page.custom_warning_text %}
{% if page.gallery_items %}
Expand Down
5 changes: 2 additions & 3 deletions templates/authors/author_index_page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% extends 'base_page.html' %}

{% load static %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block breadcrumb %}{% endblock %}
{% block content %}
{% include 'includes/generic-intro.html' with breadcrumb=True title=page.title intro=page.role %}
Expand Down
5 changes: 2 additions & 3 deletions templates/authors/author_page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% extends 'base_page.html' %}

{% load static %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block breadcrumb %}{% endblock %}
{% block content %}
{% include 'includes/breadcrumb.html' %}
Expand Down
6 changes: 4 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
{% endblock %}
{% block title_suffix %}
{% wagtail_site as current_site %}
- {{ current_site.site_name }}
{{ current_site.site_name }}
{% endblock %}
</title>
<meta name="description" content="" />
{% if meta_tags %}
{% meta_tags %}
{% endif %}
{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="format-detection" content="telephone=no" />
Expand Down
3 changes: 1 addition & 2 deletions templates/collections/blocks/featured_articles.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load wagtailimages_tags %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags wagtailcore_tags %}

<div class="featured-articles">
<ul class="card-group--list-style-none">
Expand Down
4 changes: 1 addition & 3 deletions templates/collections/explorer_index_page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends 'base_page.html' %}

{% load static wagtailmetadata_tags wagtailimages_tags wagtailcore_tags i18n %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}

{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro %}

Expand Down
7 changes: 2 additions & 5 deletions templates/collections/highlight_gallery_page.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{% extends 'base_page.html' %}

{% load i18n static wagtailcore_tags wagtailimages_tags records_tags %}
{% load wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% load i18n static wagtailcore_tags wagtailimages_tags records_tags wagtailmetadata_tags %}

{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro display_content_warning=page.display_content_warning custom_warning_text=page.custom_warning_text %}

Expand Down
4 changes: 1 addition & 3 deletions templates/collections/time_period_explorer_index_page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends 'base_page.html' %}

{% load static wagtailcore_tags wagtailmetadata_tags %}

{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro %}

Expand Down
5 changes: 2 additions & 3 deletions templates/collections/time_period_explorer_page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% extends "base_page.html" %}

{% load i18n static wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock meta_tag %}

{% block content %}
{% include "includes/highlight-intro.html" with background_image=page.hero_image title=page.title intro=page.intro %}
{% if page.related_highlight_gallery_pages %}
Expand Down
4 changes: 1 addition & 3 deletions templates/collections/topic_explorer_index_page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends 'base_page.html' %}

{% load static wagtailcore_tags wagtailmetadata_tags %}

{% block meta_tag %}
{% meta_tags %}
{% endblock %}
{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro %}

Expand Down
5 changes: 2 additions & 3 deletions templates/collections/topic_explorer_page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% extends "base_page.html" %}

{% load i18n static wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock meta_tag %}

{% block content %}
{% include "includes/highlight-intro.html" with background_image=page.hero_image title=page.title intro=page.intro %}
{% if page.related_highlight_gallery_pages %}
Expand Down
3 changes: 1 addition & 2 deletions templates/generic_pages/general_page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends 'base_page.html' %}

{% load static %}
{% load wagtailcore_tags %}
{% load static wagtailcore_tags %}



Expand Down
9 changes: 1 addition & 8 deletions templates/home/home_page.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{% extends "base_page.html" %}

{% load static i18n wagtailcore_tags wagtailmetadata_tags wagtailimages_tags %}

{% load static %}
{% load i18n %}
{% block breadcrumb %}
{% endblock %}
{% block body_class %}template-homepage{% endblock %}
{% load wagtailcore_tags %}
{% load wagtailmetadata_tags %}
{% load wagtailimages_tags %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}

{% block content %}
{% include "includes/generic-intro.html" with title=page.title intro=page.intro %}
Expand Down
3 changes: 1 addition & 2 deletions templates/includes/card-group-record-summary-no-image.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load records_tags %}
{% load wagtailimages_tags %}
{% load records_tags wagtailimages_tags %}

<li class="col-sm-12 col-md-6 col-lg-4">
<div class="card-group-record-summary">
Expand Down
4 changes: 2 additions & 2 deletions templates/includes/hero-img.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load wagtailimages_tags %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags wagtailcore_tags %}

{% if hero_image %}
<div class="hero-image__container">
{% if caption %}<figure class="hero-image__figure">{% endif %}
Expand Down
3 changes: 0 additions & 3 deletions templates/password_pages/password_required.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{% extends 'base_page.html' %}

{% load static wagtailmetadata_tags wagtailimages_tags wagtailcore_tags i18n %}
{% block meta_tag %}
{% meta_tags %}
{% endblock %}

{% if breadcrumb %}
{% include 'includes/breadcrumb.html' %}
Expand Down
4 changes: 1 addition & 3 deletions templates/records/archive_detail.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load static %}
{% load datalayer_tags %}
{% load records_tags %}
{% load static datalayer_tags records_tags %}

{% block extra_gtm_js %}
{% render_gtm_datalayer record %}
Expand Down
4 changes: 1 addition & 3 deletions templates/records/image-browse.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends 'base-images.html' %}

{% load static %}
{% load datalayer_tags %}
{% load records_tags %}
{% load static datalayer_tags records_tags %}

{% block extra_gtm_js %}
{% image_browse_datalayer as datalayer %}
Expand Down
4 changes: 2 additions & 2 deletions templates/records/image-viewer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'base-images.html' %}
{% load records_tags %}
{% load static %}

{% load records_tags static %}

{% block content %}

Expand Down
4 changes: 1 addition & 3 deletions templates/records/record_creators.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load static %}
{% load datalayer_tags %}
{% load records_tags %}
{% load static datalayer_tags records_tags %}

{% block extra_gtm_js %}
{% render_gtm_datalayer record %}
Expand Down
4 changes: 1 addition & 3 deletions templates/records/record_detail.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load static %}
{% load datalayer_tags %}
{% load records_tags %}
{% load static datalayer_tags records_tags %}

{% block extra_gtm_js %}
{% render_gtm_datalayer record %}
Expand Down
3 changes: 1 addition & 2 deletions templates/records/record_disambiguation_page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends "base.html" %}

{% load static %}
{% load datalayer_tags %}
{% load static datalayer_tags %}

{% block content %}
{% include "includes/generic-intro.html" with title="Several records share this reference" only %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load records_tags %}
{% load search_tags %}
{% load records_tags search_tags %}

<!--
<div class="featured-search__interpretive-results-section">
<h2 class="tna-heading featured-search__heading">{{ bucket.label }}</h2>
Expand Down
4 changes: 2 additions & 2 deletions templates/search/blocks/featured-search__record-creator.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load records_tags %}
{% load search_tags %}
{% load records_tags search_tags %}

<div class="featured-search__results-block">
<h2 class="tna-heading featured-search__heading">{{ bucket.label }}</h2>

Expand Down
4 changes: 2 additions & 2 deletions templates/search/blocks/featured-search__results-block.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load records_tags %}
{% load search_tags %}
{% load records_tags search_tags %}

<div class="featured-search__results-block">
<h2 class="tna-heading featured-search__heading">{{ bucket.label }}</h2>
<ul class="featured-search__results-list">
Expand Down
3 changes: 1 addition & 2 deletions templates/search/blocks/search_pagination.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load search_tags %}
{% load humanize %}
{% load search_tags humanize %}

<nav class="pagination" role="navigation" aria-label="Records pagination" data-container-name="Pagination"
id="analytics-disambiguation-pagination">
Expand Down
3 changes: 1 addition & 2 deletions templates/search/blocks/search_results.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load search_tags %}
{% load humanize %}
{% load search_tags humanize %}

{{ selected_filters_count|json_script:"selected_filters_count" }}
<script>
Expand Down
5 changes: 1 addition & 4 deletions templates/search/catalogue_search.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load humanize %}
{% load datalayer_tags %}
{% load search_tags %}
{% load humanize datalayer_tags search_tags static %}

{% comment %} prepend number of search results to page title {% endcomment %}
{% block prepend_title %}
Expand All @@ -18,7 +16,6 @@
{% block extra_gtm_js %}
{% render_gtm_datalayer view %}
{% endblock extra_gtm_js %}
{% load static %}
{% block breadcrumb %}
{% endblock %}

Expand Down
4 changes: 1 addition & 3 deletions templates/search/featured_search.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{% extends "base.html" %}

{% load datalayer_tags %}
{% load search_tags %}
{% load datalayer_tags search_tags humanize %}

{% block extra_gtm_js %}
{% render_gtm_datalayer view %}
{% endblock extra_gtm_js %}
{% load humanize %}
{% block breadcrumb %}
{% endblock %}
{% block content %}
Expand Down
4 changes: 1 addition & 3 deletions templates/search/long_filter_options.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends "base.html" %}

{% load humanize %}
{% load search_tags %}
{% load humanize search_tags static %}

{% load static %}
{% block breadcrumb %}
{% endblock %}
{% block content %}
Expand Down
Loading

0 comments on commit 9ffdc2d

Please sign in to comment.