diff --git a/.circleci/config.yml b/.circleci/config.yml index ba19fef5d8..01df8e0e32 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -363,7 +363,7 @@ workflows: filters: branches: only: - - referral-lock + - free # This is stage env for production QA releases - "build-prod-staging": context : org-global diff --git a/src/shared/components/Contentful/Article/Article.jsx b/src/shared/components/Contentful/Article/Article.jsx index 2e4476dab5..e87248eb3e 100644 --- a/src/shared/components/Contentful/Article/Article.jsx +++ b/src/shared/components/Contentful/Article/Article.jsx @@ -148,6 +148,17 @@ class Article extends React.Component { }, ).substring(0, CONTENT_PREVIEW_LENGTH); const catsGrouped = _.groupBy(fields.contentCategory, cat => cat.fields.trackParent); + // captures clicks on article + // for opening external links in new tab + const articleClickHandler = (e) => { + if (e.target.href && fields.openExternalLinksInNewTab !== false) { + const target = new URL(e.target.href); + if (!target.host.includes('topcoder')) { + window.open(e.target.href, '_blank'); + e.preventDefault(); + } + } + }; return ( @@ -291,7 +302,12 @@ class Article extends React.Component { {/* Content */} -
+
{ fields.type === 'Video' && fields.contentUrl ? ( diff --git a/src/shared/components/Contentful/Article/themes/default.scss b/src/shared/components/Contentful/Article/themes/default.scss index bd3c5b5f56..af7ba08979 100644 --- a/src/shared/components/Contentful/Article/themes/default.scss +++ b/src/shared/components/Contentful/Article/themes/default.scss @@ -324,7 +324,7 @@ ol { @include tc-body-md; - padding-left: 20px; + padding-left: 30px; margin-bottom: 20px; @include roboto-regular; @@ -485,6 +485,10 @@ margin-bottom: 108px; } + @media screen and (min-width: 1440px) and (max-width: 1900px) { + margin-bottom: 70px; + } + @media screen and (max-width: 768px) { margin-bottom: 300px; } diff --git a/src/shared/components/Contentful/ArticleCard/themes/article_large.scss b/src/shared/components/Contentful/ArticleCard/themes/article_large.scss index 1ec8bdcb82..43ade95560 100644 --- a/src/shared/components/Contentful/ArticleCard/themes/article_large.scss +++ b/src/shared/components/Contentful/ArticleCard/themes/article_large.scss @@ -12,6 +12,10 @@ @include xs-to-sm { margin: 5px; } + + @media screen and (max-width: 425px) { + max-height: none; + } } .contentWrapper { @@ -23,6 +27,10 @@ display: flex; flex-direction: row; align-items: stretch; + + @media screen and (max-width: 425px) { + flex-direction: column; + } } .main { @@ -225,6 +233,11 @@ min-width: 150px; } + @media screen and (max-width: 425px) { + width: 100%; + min-height: 130px; + } + &::before { content: ''; width: 35px; @@ -234,5 +247,12 @@ background-size: cover; background-position: right -2px; position: absolute; + + @media screen and (max-width: 425px) { + background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 290 31.73' style='enable-background:new 0 0 290 31.73;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23F4F4F4;%7D%0A%3C/style%3E%3Cg id='Thrive'%3E%3Cg id='Artboard' transform='translate(-22.000000, -20.000000)'%3E%3Cg id='Combined-Shape'%3E%3Cpath class='st0' d='M22,20h290l0,24.11c-60.39,13.64-90.73-0.4-142.15-10.48C118.1,23.5,97,79,22.08,33.64l0,0l0,1.34'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); + width: 100%; + height: 33px; + background-position: 0 -10px; + } } } diff --git a/src/shared/components/Contentful/SearchBar/SearchBar.jsx b/src/shared/components/Contentful/SearchBar/SearchBar.jsx index ab0abb9e09..6e2efc5cbc 100644 --- a/src/shared/components/Contentful/SearchBar/SearchBar.jsx +++ b/src/shared/components/Contentful/SearchBar/SearchBar.jsx @@ -74,7 +74,7 @@ export class SearchBarInner extends Component { onKeyDown(e) { const { inputlVal, selectedFilter } = this.state; - if (inputlVal && e.which === 13) { + if (_.trim(inputlVal) && e.which === 13) { const searchQuery = {}; if (this.searchFieldRef && this.searchFieldRef.value) { if (selectedFilter.name === 'Tags') { @@ -90,7 +90,7 @@ export class SearchBarInner extends Component { if (selectedFilter.name !== 'Author') { window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?${qs.stringify(searchQuery)}`; } else { - window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?author=${inputlVal}`; + window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?author=${_.trim(inputlVal)}`; } } }