Only load content styles on content pages

This commit is contained in:
Jake Howard 2022-06-28 22:19:28 +01:00
parent a0ddf1c434
commit b6c87d9583
Signed by: jake
GPG Key ID: 57AFB45680EDD477
4 changed files with 12 additions and 20 deletions

View File

@ -16,8 +16,6 @@
<link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'contrib/fontawesome/css/all.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/lite-youtube-embed.css' %}">
<link rel="stylesheet" type="text/css" href="{% url 'static-pygments:styles' 'default' %}">
{% block extra_css %}{% endblock %}
</head>
@ -41,7 +39,6 @@
<script async defer type="text/javascript" src="{% static 'js/base.js' %}"></script>
<script async defer type="text/javascript" src="{% static 'js/lite-youtube-embed.js' %}"></script>
{% block darkmode %}
<script type="text/javascript" src="{% static 'js/darkreader.js' %}"></script>

View File

@ -1,13 +1 @@
{% extends "wagtail_base.html" %}
{% load wagtailcore_tags %}
{% block content %}
{% include "common/hero.html" %}
<section class="container content">
{% include_block page.body %}
</section>
{% endblock content %}
{% extends "common/content_page.html" %}

View File

@ -1,6 +1,6 @@
{% extends "wagtail_base.html" %}
{% load wagtailcore_tags %}
{% load wagtailcore_tags static %}
{% block content %}
@ -10,4 +10,13 @@
{% include_block page.body %}
</section>
{% endblock content %}
{% endblock %}
{% block extra_css %}
<link rel="stylesheet" type="text/css" href="{% static 'css/lite-youtube-embed.css' %}">
<link rel="stylesheet" type="text/css" href="{% url 'static-pygments:styles' 'default' %}">
{% endblock %}
{% block extra_js %}
<script async defer type="text/javascript" src="{% static 'js/lite-youtube-embed.js' %}"></script>
{% endblock %}

View File

@ -1,7 +1,5 @@
{% extends "wagtail_base.html" %}
{% load util_tags %}
{% block content %}
{% include "common/hero.html" %}