Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/fp 1439 yearly site theme for texascale #140

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions texascale-org/templates/djangocms_blog/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{# https://github.com/TACC/Core-CMS/blob/main/taccsite_cms/templates/djangocms_blog/base.html #}
{% extends "djangocms_blog/base.html" %}
{% load static get_url_match %}

{% block content_assets %}
{{ block.super }}

{% with year_slug=request.path|get_url_match:"/(20\d\d)/" %}
{% if year_slug %}
{% with path="texascale-org/css/build/app.blog."|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 /(202\d)/ -->
{% endif %}
{% endif %}
{% endwith %}
{% endblock content_assets %}
18 changes: 18 additions & 0 deletions texascale_cms/templates/base.html
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 %}
2 changes: 1 addition & 1 deletion texascale_cms/templates/fullwidth.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "./base.html" %}
{% load cms_tags static %}

{% block title %}{% page_attribute "page_title" %}{% endblock title %}
Expand Down