diff --git a/cdhweb/context_processors.py b/cdhweb/context_processors.py index 2d7a6acf..29bdc1c4 100644 --- a/cdhweb/context_processors.py +++ b/cdhweb/context_processors.py @@ -1,4 +1,5 @@ from django.conf import settings +from django.templatetags.static import static from wagtail.models import Site from cdhweb.pages.utils import absolutize_url @@ -14,14 +15,15 @@ def template_settings(request): if "purple-mode" in feature_flags: default_preview_img = "img/alt-modes/purple/cdhlogo_square.png" else: - default_preview_img = "img/cdhlogo_square.jpg" + default_preview_img = "images/cdhlogo_square.jpg" context_extras = { "SHOW_TEST_WARNING": getattr(settings, "SHOW_TEST_WARNING", False), "site": Site.find_for_request(request), - "default_preview_image": absolutize_url( - "".join([settings.STATIC_URL, default_preview_img]) + "default_preview_image": request.build_absolute_uri( + static(default_preview_img) ), + # try using template tag import static tag and use here instead of join django utils static # Include analytics based on settings.DEBUG or override in settings.py # Defaults to opposite of settings.DEBUG "INCLUDE_ANALYTICS": getattr(settings, "INCLUDE_ANALYTICS", not settings.DEBUG), diff --git a/static/images/alt-modes/purple/cdhlogo_square.png b/static/images/alt-modes/purple/cdhlogo_square.png new file mode 100644 index 00000000..5d855c85 Binary files /dev/null and b/static/images/alt-modes/purple/cdhlogo_square.png differ diff --git a/static/images/cdhlogo_square.jpg b/static/images/cdhlogo_square.jpg new file mode 100644 index 00000000..7ae22534 Binary files /dev/null and b/static/images/cdhlogo_square.jpg differ diff --git a/templates/base.html b/templates/base.html index 5b7aec9d..8f2c207c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,9 +5,12 @@
-