Skip to content

Commit

Permalink
feat: CMD-97 isolate breadcrumbs from content (#870)
Browse files Browse the repository at this point in the history
* refactor: CMD-97 breadcrumbs for news via 1 template

* idea: TUP-706 4.a.i change RSS feed render ⚠️

NOT WORKING! Fails with:

> NoReverseMatch at /feed/
> '' is not a registered namespace

* refactor: TUP-706 rename and document blog block

* feat: TUP-706 render page with only (*_)content

* fix: TUP-706 disable failed djangocms_blog_c… url

* idea!: TUP-706 render blog base via custom app

Fails, because it renders nothing.

* feat!: TUP-706 render remote url content

Load `/blog/remote`.

BREAKING CHANGE: Changed `/blog` to `/blog/local`

* chore: TUP-706 move an import higher in file

* feat: TUP-706 render remote url via setting

* fix: TUP-706 render blog customizations

* fix: TUP-706 render feed ⚠️

⚠️ Does NOT render feed items.

* docs: TUP-706 describe each URL's problem

* docs: TUP-706 describe each URL goal and status

* feat: TUP-706 A.1+3.c remote markup via template

* feat: TUP-706 A.1.a. support BLOG_MULTISITE

* fix: TUP-706 A.1.a. cannot login to site 2

* Revert "fix: TUP-706 A.1.a. cannot login to site 2"

This reverts commit 6bece39.

This did not fix anything. `SESSION_COOKIE_SECURE=False` is still required locally.

* docs: TUP-706 feed status (ineffectual)

* docs: tup-706 urls for local and remote

* feat(poc): TUP-706 get news from remote url

Messy but functional!

* chore: remove test print statements from feeds

* core: clean up views

* core: clean up views more

* refactor: switch order of methods in view class

* feat: TUP-706 edit links via get_client_markup()

* fix: TUP-706 broken links

- ✓ fix links to articles
- ✓ fix pagination links

* chore: remove tup-706 work / isolate CMD-97 work

* feat: tup-706 isolate breadcrumbs from news

* chore: taccsite_custom PR merged

* fix: fullwidth template failed for news

* fix: taccsite_custom changes to match

* chore: taccsite_custom PR merged

* style: remove new line, reduce diff
  • Loading branch information
wesleyboar authored Sep 13, 2024
1 parent 4aa175f commit 0aad6ac
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 26 deletions.
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
12 changes: 10 additions & 2 deletions taccsite_cms/templates/djangocms_blog/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
{% endif %}
{% endblock meta %}

{% block content %}
{# TACC (to not let editor add content to every blog page): #}
{% block cms_content %}{% endblock cms_content %}
{# /TACC #}

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

{% if settings.TACC_CORE_STYLES_VERSION == 0 %}
<link rel="stylesheet" href="{% static 'site_cms/css/build/site.app.blog.css' %}">
Expand All @@ -33,4 +39,6 @@
{% block content_blog %}{% endblock %}
</div>

{% endblock content %}
{# TACC (to not let blog usurp `{% block "content" %}`): #}
{% endblock app_content %}
{# /TACC #}
8 changes: 0 additions & 8 deletions taccsite_cms/templates/djangocms_blog/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
{% load i18n easy_thumbnails_tags cms_tags blog_post_use_custom_media blog_post_is_show_abstract %}

{% block content_blog %}{% spaceless %}
{# TACC (wrap and add breadcrumbs): #}

<section class="container">
{% include "nav_cms_breadcrumbs.html" %}

{# /TACC #}
{# TACC (define whether this is a special post): #}
{% blog_post_use_custom_media post settings.PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY as use_custom_media %}
{% blog_post_is_show_abstract post settings.PORTAL_BLOG_SHOW_ABSTRACT_TAG as is_show_abstract_post %}
Expand Down Expand Up @@ -88,9 +83,6 @@ <h3>{% render_model post "subtitle" %}</h3>
{% endif %}
</article>
{# TACC (end wrap and end spaceless-ness later than source): #}

</section>
{% endspaceless %}

{# /TACC #}
{% endblock content_blog %}
7 changes: 0 additions & 7 deletions taccsite_cms/templates/djangocms_blog/post_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
{% block canonical_url %}<link rel="canonical" href="{{ view.get_view_url }}"/>{% endblock canonical_url %}

{% block content_blog %}
{# TACC (wrap list in container w/ breadcrumbs to mimic other page layouts): #}
<div class="container">
{% include "nav_cms_breadcrumbs.html" %}
{# /TACC #}

<section class="blog-list">
{% block blog_title %}
Expand Down Expand Up @@ -82,8 +78,5 @@ <h2>
{% endif %}
</section>

{# TACC (wrap list in container w/ breadcrumbs to mimic other page layouts): #}
</div>
{# /TACC #}
{% endblock %}
{% endspaceless %}
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 %}
2 changes: 1 addition & 1 deletion taccsite_custom

0 comments on commit 0aad6ac

Please sign in to comment.