-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(texascale): load annual stylesheets
For: https://jira.tacc.utexas.edu/browse/FP-1439 Mirrors: #140
- Loading branch information
1 parent
a87ede7
commit 32c3485
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} | ||
<link rel="stylesheet" href="{% static src %}" data-year_slug="{{year_slug}}"> | ||
{% endwith %} | ||
{% else %} | ||
{% if settings.DEBUG %} | ||
<!-- will not load annual CSS cuz year_slug is {{year_slug}} not 2019…2029 --> | ||
{% endif %} | ||
{% endif %} | ||
{% endwith %} | ||
{% endblock assets_custom %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters