diff --git a/cms/models.py b/cms/models.py index caab4e2b8..19095e9dd 100644 --- a/cms/models.py +++ b/cms/models.py @@ -778,6 +778,12 @@ def news_and_events(self): """ Gets the news and events section subpage """ + webinar_or_blog_enabled = settings.FEATURES.get( + "WEBINARS", False + ) or settings.FEATURES.get("ENABLE_BLOG", False) + if webinar_or_blog_enabled: + return None + return self._get_child_page_of_type(NewsAndEventsPage) @property diff --git a/static/js/components/TopAppBar.js b/static/js/components/TopAppBar.js index 87461e0ab..0dd5aa896 100644 --- a/static/js/components/TopAppBar.js +++ b/static/js/components/TopAppBar.js @@ -66,15 +66,6 @@ const TopAppBar = ({ currentUser, location, errorPageHeader, courseTopics }: Pro id="nav" className="collapse navbar-collapse px-0 justify-content-end" > - { - SETTINGS.webinars ? ( -
  • - - Webinars - -
  • - ) : null - }
  • { SETTINGS.course_dropdown ? ( @@ -86,10 +77,19 @@ const TopAppBar = ({ currentUser, location, errorPageHeader, courseTopics }: Pro ) }
  • + { + SETTINGS.webinars ? ( +
  • + + Webinars + +
  • + ) : null + } { SETTINGS.enable_blog ? (
  • - + Blog
  • diff --git a/static/scss/top-app-bar.scss b/static/scss/top-app-bar.scss index 7433ec117..9b2d4d376 100644 --- a/static/scss/top-app-bar.scss +++ b/static/scss/top-app-bar.scss @@ -54,6 +54,10 @@ text-decoration: none; display: block; + &.blog-link { + margin-right: 10px; + } + &:hover { color: $primary; }