Skip to content

Commit

Permalink
Merge branch 'main' into feat/tup-706-news-on-other-sites
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Sep 13, 2024
2 parents 49edd04 + 8490e4c commit 22c6ac3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
4 changes: 4 additions & 0 deletions taccsite_cms/settings_custom.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
('guides/data_transfer.html', 'Guide: Data Transfer'),
('guides/data_transfer.globus.html', 'Guide: Globus Data Transfer'),
('guides/portal_technology.html', 'Guide: Portal Technology Stack'),

# WARNING: Not intuitive to unset, so only enable as needed e.g.
# - serve Blog such that it can be injected into another CMS
# ('raw.html', 'Raw'),
)

########################
Expand Down
21 changes: 14 additions & 7 deletions taccsite_cms/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,22 @@
<main id="cms-content">
{% block content %}

{# To allow extra Container in page structure by hiding extra padding #}
{# To hide extra space that a nested/redundant Container would add #}
<style type="text/css">
.container > .s-breadcrumbs + .container { padding-inline: 0; }
#cms-content-container.container .container { padding-inline: 0; }
</style>

{# To wrap breadcrumbs in Container without relying on CMS editor #}
<div class="container">
{% include "nav_cms_breadcrumbs.html" %}
{% placeholder "content" %}
{# To wrap content in Container without relying on CMS editor #}
<div class="container" id="cms-content-container">
{% block breadcrumbs %}
{% include "nav_cms_breadcrumbs.html" %}
{% endblock breadcrumbs %}

{% block cms_content %}
{% placeholder "content" %}
{% endblock cms_content %}

{# To isolate content editor cannot change layout of (e.g. Blog) #}
{% block app_content %}{% endblock app_content %}
</div>

{% endblock content %}
Expand Down
16 changes: 7 additions & 9 deletions taccsite_cms/templates/djangocms_blog/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
{% endif %}
{% endblock meta %}

{# TACC (do not let blog usurp Content placeholder): #}
{% block fixed_content %}
{# TACC (to not let editor add content to every blog page): #}
{% block cms_content %}{% endblock cms_content %}
{# /TACC #}
{# TACC (wrap list in container to mimic other page layouts): #}
<div class="container">

{# TACC (to not let blog usurp `{% block "content" %}`): #}
{% block app_content %}
{# /TACC #}

{% if settings.TACC_CORE_STYLES_VERSION == 0 %}
Expand All @@ -38,9 +39,6 @@
{% block content_blog %}{% endblock %}
</div>

{# TACC (wrap list in container to mimic other page layouts): #}
</div>
{# /TACC #}
{# TACC (do not let blog usurp Content placeholder): #}
{% endblock fixed_content %}
{# TACC (to not let blog usurp `{% block "content" %}`): #}
{% endblock app_content %}
{# /TACC #}
5 changes: 4 additions & 1 deletion taccsite_cms/templates/fullwidth.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@

{# To remove container and breadcrumbs #}
{% block content %}
{% placeholder "content" %}
{% block cms_content %}
{% placeholder "content" %}
{% endblock cms_content %}
{% block app_content %}{% endblock app_content %}
{% endblock content %}
8 changes: 5 additions & 3 deletions taccsite_cms/templates/raw.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{# To reduce output to only content #}
{% load cms_tags %}

{# To remove container and breadcrumbs #}
{% block content %}
{% placeholder "content" %}
{% block cms_content %}
{% placeholder "content" %}
{% endblock cms_content %}
{% block app_content %}{% endblock app_content %}
{% endblock content %}
{% block fixed_content %}
{% endblock fixed_content %}
2 changes: 1 addition & 1 deletion taccsite_custom

0 comments on commit 22c6ac3

Please sign in to comment.