From 2c6812b00908048d01cb7caa29ed052310c8dfcc Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:14:37 -0500 Subject: [PATCH] refactor: cmd-79 rename tacc cms settings (#416) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: cmd-79/tv3-181 FAVICON → PORTAL_FAVICON * refactor: cmd-79/tv3-181 LOGO → PORTAL_LOGO * refactor: cmd-79/tv3-181 TACC_ → PORTAL_ * feat: cmd-79/tv3-181 Core-CMS image placeholder * test: cmd-79/tv3-181 new Core-CMS image * fix: correct branch translation to core-cms image * fix!: cmd-79 core-cms backwards-compatibility bugs With this update, there is an unexpected and bewildering UI change: - the navbar at 992px is collapsed - it should only collapse at 991px - this behavior is different than when using Core-CMS v4.8.3 * style: cmd-79 remove newline to simplify diff * fix: cmd-79 nav overflows header at certain screen widths * refactor: rename old Core-CMS settings to new * docs: PORTAL_NAV_WIDTH moved to correct section --- .../src/taccsite_cms/settings_custom.py | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/apps/tup-cms/src/taccsite_cms/settings_custom.py b/apps/tup-cms/src/taccsite_cms/settings_custom.py index ee189c6bc..d51d1c97b 100644 --- a/apps/tup-cms/src/taccsite_cms/settings_custom.py +++ b/apps/tup-cms/src/taccsite_cms/settings_custom.py @@ -95,16 +95,15 @@ # TACC: LOGOS ######################## -LOGO = [ - "tup", - "tup_cms/img/org_logos/tacc-logo-white.svg", - "tup", - "/", - "_self", - "TACC Logo", - "anonymous", - "True" -] +PORTAL_LOGO = { + "img_file_src": "tup_cms/img/org_logos/tacc-logo-white.svg", + "is_remote": False, + "img_class": "", + "link_href": "/", + "link_target": "_self", + "img_alt_text": "TACC Logo", + "img_crossorigin": "anonymous", +} # To hide logo, set `PORTAL_LOGO = False` ######################## # TACC: SEARCH @@ -129,15 +128,17 @@ # TACC: PORTAL ######################## -INCLUDES_CORE_PORTAL = False -INCLUDES_PORTAL_NAV = True -INCLUDES_SEARCH_BAR = True +PORTAL_IS_TACC_CORE_PORTAL = False +PORTAL_HAS_LOGIN = True +PORTAL_HAS_SEARCH = True + +PORTAL_NAV_WIDTH = 'lg' ######################## # TACC: SOCIAL MEDIA ######################## -TACC_SOCIAL_SHARE_PLATFORMS = ['linkedin', 'facebook', 'email'] +PORTAL_SOCIAL_SHARE_PLATFORMS = ['linkedin', 'facebook', 'email'] ######################## # DJANGOCMS_BLOG @@ -189,10 +190,10 @@ # DJANGOCMS_BLOG: TACC ######################## -TACC_BLOG_SHOW_CATEGORIES = True -TACC_BLOG_SHOW_TAGS = False -TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'multimedia' -TACC_BLOG_SHOW_ABSTRACT_TAG = 'external' +PORTAL_BLOG_SHOW_CATEGORIES = True +PORTAL_BLOG_SHOW_TAGS = False +PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'multimedia' +PORTAL_BLOG_SHOW_ABSTRACT_TAG = 'external' TACC_BLOG_CATEGORY_ORDER = ['press-release', 'feature-story', 'multimedia', 'podcast']