From e7d34efeae489bc26d0d45f5a4406adb2ea75db8 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Tue, 9 Apr 2019 12:42:19 -0400 Subject: [PATCH] Reduce scope of Swiper include Currently the Swiper library is referenced in the base template which means that its CSS and JS get included and loaded on every page. However, the Swiper functionality is only used on the landing page. This leads to redundant requests to load the CSS and JS and may even lead to hard to debug potential issues with clashing JS or CSS. This change moves the Swiper JS and CSS to only be included on the landing page. --- app/server/templates/base.html | 16 ---------------- app/server/templates/index.html | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/server/templates/base.html b/app/server/templates/base.html index 42e16cf4..3e70ccac 100644 --- a/app/server/templates/base.html +++ b/app/server/templates/base.html @@ -16,7 +16,6 @@ - @@ -94,20 +93,5 @@ {% block content %}{% endblock %} {% block footer %}{% endblock %} - - \ No newline at end of file diff --git a/app/server/templates/index.html b/app/server/templates/index.html index d7ea0707..4e2a342a 100644 --- a/app/server/templates/index.html +++ b/app/server/templates/index.html @@ -1,5 +1,10 @@ {% extends "base.html" %} {% load static %} + +{% block header %} + +{% endblock %} + {% block content %}
@@ -207,4 +212,22 @@
+{% endblock %} + +{% block footer %} + + {% endblock %} \ No newline at end of file