From 32c34856f844fe30b3009f9a10deae2d384c078f Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Thu, 30 Jun 2022 12:27:06 -0500 Subject: [PATCH] feat(texascale): load annual stylesheets For: https://jira.tacc.utexas.edu/browse/FP-1439 Mirrors: https://github.com/TACC/Core-CMS-Resources/pull/140 --- texascale-org/templates/base.html | 18 ++++++++++++++++++ texascale-org/templates/fullwidth.html | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 texascale-org/templates/base.html diff --git a/texascale-org/templates/base.html b/texascale-org/templates/base.html new file mode 100644 index 00000000..df307666 --- /dev/null +++ b/texascale-org/templates/base.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} +{% load staticfiles get_url_match %} + +{% block assets_custom %} + {{ block.super }} + + {% with year_slug=request.path|get_url_match:"/(2019|202\d)/" %} + {% if year_slug %} + {% with src="texascale-org/css/build/site."|add:year_slug|add:".css" %} + + {% endwith %} + {% else %} + {% if settings.DEBUG %} + + {% endif %} + {% endif %} + {% endwith %} +{% endblock assets_custom %} diff --git a/texascale-org/templates/fullwidth.html b/texascale-org/templates/fullwidth.html index 74250fc7..81d2040f 100644 --- a/texascale-org/templates/fullwidth.html +++ b/texascale-org/templates/fullwidth.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "./base.html" %} {% load cms_tags staticfiles %} {% block title %}{% page_attribute "page_title" %}{% endblock title %}