diff --git a/.circleci/config.yml b/.circleci/config.yml index 2540011007..fbe4c60282 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -231,13 +231,13 @@ workflows: branches: only: - develop + - tco21 # This is alternate dev env for parallel testing - "build-test": context : org-global filters: branches: - only: - - develop + only: - feature-contentful # This is alternate dev env for parallel testing - "build-qa": @@ -245,7 +245,7 @@ workflows: filters: branches: only: - - develop-on-qa-env + - develop # This is beta env for production soft releases - "build-prod-beta": context : org-global diff --git a/src/server/tc-communities/tco21/metadata.json b/src/server/tc-communities/tco21/metadata.json new file mode 100644 index 0000000000..fa22f3f373 --- /dev/null +++ b/src/server/tc-communities/tco21/metadata.json @@ -0,0 +1,20 @@ +{ + "challengeFilter": { + "tags": ["TCO", "TCO21"] + }, + "communityId": "tco21", + "communityName": "TCO21", + "groupIds": [], + "hideSearch": true, + "logos": [{ + "img": "/community-app-assets/themes/tco/TCO21.svg", + "url": "https://tco21.topcoder.com" + }], + "menuItems": [{ + "navigationMenu": "3UBKZJ0qMHAkqrobue73NB" + }], + "newsFeed": "http://www.topcoder.com/feed", + "subdomains": ["tco21"], + "description": "2021 Topcoder Open. The Ultimate Programming & Design Tournament", + "image": "tco21.jpg" +} diff --git a/src/shared/actions/contentful.js b/src/shared/actions/contentful.js index 2c8f9c3547..dd17409407 100644 --- a/src/shared/actions/contentful.js +++ b/src/shared/actions/contentful.js @@ -181,12 +181,13 @@ async function getMenuDone(menuProps) { cR2.fields.childRoutes, cR3 => service.getEntry(cR3.sys.id).then( async (c3) => { - const sI3 = menuItemBuilder(url2, c3); + const url3 = urlTarget(url2, cR2); + const sI3 = menuItemBuilder(url3, c3); if (c3.fields.childRoutes) { sI3.subMenu = await Promise.all(_.map( c3.fields.childRoutes, cR4 => service.getEntry(cR4.sys.id).then( - c4 => menuItemBuilder(urlTarget(url2, c3), c4), + c4 => menuItemBuilder(url3, c4), ), )); } @@ -239,9 +240,10 @@ async function getMenuDone(menuProps) { } else { menu = menuData; } - // add the preconfigured secondary menus - menu[0].secondaryMenuForLoggedInUser = config.SECONDARY_MENU_FOR_LOGGED_USER; - menu[0].secondaryMenuForGuest = config.SECONDARY_MENU_FOR_GUEST; + // add the preconfigured secondary menus? + if (fields.showSecondaryNaviMenu) { + menu[0].secondaryMenu = config.HEADER_MENU[1].secondaryMenu; + } return { id: menuProps.id, diff --git a/src/shared/components/Contentful/ContentBlock/themes/TCO19.scss b/src/shared/components/Contentful/ContentBlock/themes/TCO19.scss index 6d1dba8192..6dd6d736f7 100644 --- a/src/shared/components/Contentful/ContentBlock/themes/TCO19.scss +++ b/src/shared/components/Contentful/ContentBlock/themes/TCO19.scss @@ -78,13 +78,13 @@ strong a { th { @include roboto-regular; - color: #808080; + color: #2a2a2a; font-size: 15px; font-weight: bold; - line-height: 25px; + line-height: 18px; text-align: left; text-transform: uppercase; - padding: 7px 10px 7px 0; + padding: 18px 10px 14px 0; @include md-to-xl { white-space: nowrap; @@ -102,8 +102,8 @@ strong a { line-height: 25px; text-align: left; color: $tc-gray-80; - border-top: 1px solid #ededf2; - border-bottom: 1px solid #ededf2; + border-top: 1px solid #d4d4d4; + border-bottom: 1px solid #d4d4d4; padding: 20px 50px 20px 0; min-height: 51px; diff --git a/src/shared/components/Contentful/ContentBlock/themes/TCO20.scss b/src/shared/components/Contentful/ContentBlock/themes/TCO20.scss index 7dca7a7556..e6b4a5a3e7 100644 --- a/src/shared/components/Contentful/ContentBlock/themes/TCO20.scss +++ b/src/shared/components/Contentful/ContentBlock/themes/TCO20.scss @@ -94,13 +94,13 @@ strong a { th { @include roboto-regular; - color: #808080; + color: #2a2a2a; font-size: 15px; font-weight: bold; - line-height: 25px; + line-height: 18px; text-align: left; text-transform: uppercase; - padding: 7px 10px 7px 0; + padding: 18px 10px 14px 0; @include md-to-xl { white-space: nowrap; @@ -118,8 +118,8 @@ strong a { line-height: 25px; text-align: left; color: $tc-gray-80; - border-top: 1px solid #ededf2; - border-bottom: 1px solid #ededf2; + border-top: 1px solid #d4d4d4; + border-bottom: 1px solid #d4d4d4; padding: 20px 50px 20px 0; min-height: 51px; diff --git a/src/shared/components/Contentful/ContentBlock/themes/general.scss b/src/shared/components/Contentful/ContentBlock/themes/general.scss index ad01f09abc..195069213b 100644 --- a/src/shared/components/Contentful/ContentBlock/themes/general.scss +++ b/src/shared/components/Contentful/ContentBlock/themes/general.scss @@ -122,13 +122,13 @@ strong a { th { @include roboto-regular; - color: #808080; + color: #2a2a2a; font-size: 15px; font-weight: bold; - line-height: 25px; + line-height: 18px; text-align: left; text-transform: uppercase; - padding: 7px 10px 7px 0; + padding: 18px 10px 14px 0; @include md-to-xl { white-space: nowrap; @@ -146,8 +146,8 @@ strong a { line-height: 25px; text-align: left; color: $tc-gray-80; - border-top: 1px solid #ededf2; - border-bottom: 1px solid #ededf2; + border-top: 1px solid #d4d4d4; + border-bottom: 1px solid #d4d4d4; padding: 20px 50px 20px 0; min-height: 51px; diff --git a/src/shared/components/Contentful/Countdown/index.jsx b/src/shared/components/Contentful/Countdown/index.jsx index 0ff5447e93..67ccb5b868 100644 --- a/src/shared/components/Contentful/Countdown/index.jsx +++ b/src/shared/components/Contentful/Countdown/index.jsx @@ -25,6 +25,7 @@ export default function CountdownLoader(props) { title={data.entries.items[id].fields.title} end={new Date(data.entries.items[id].fields.endDate)} extraStylesForContainer={data.entries.items[id].fields.extraStylesForContainer} + themeName={data.entries.items[id].fields.theme} /> )} renderPlaceholder={LoadingIndicator} diff --git a/src/shared/components/Countdown/index.jsx b/src/shared/components/Countdown/index.jsx index 7fd2a42dc8..4cccc74494 100644 --- a/src/shared/components/Countdown/index.jsx +++ b/src/shared/components/Countdown/index.jsx @@ -8,7 +8,13 @@ import PT from 'prop-types'; import React from 'react'; import { fixStyle } from 'utils/contentful'; -import './style.scss'; +import defaultTheme from './themes/style.scss'; +import TCO21 from './themes/TCO21.scss'; + +const THEMES = { + Default: defaultTheme, + TCO21, +}; /* We have to use state component, as we need to manipulate with DOM nodes to * access nuka-carousel state. */ @@ -34,6 +40,8 @@ export default class Countdown extends React.Component { } render() { + const { themeName } = this.props; + const theme = THEMES[themeName]; let { elapsed } = this.state; const oneDay = 24 * 60 * 60; const oneHour = 60 * 60; @@ -54,27 +62,26 @@ export default class Countdown extends React.Component { ); return (