Skip to content

Thrive spooky1 4 #5891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion src/shared/components/Contentful/Article/Article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<React.Fragment>
Expand Down Expand Up @@ -291,7 +302,12 @@ class Article extends React.Component {
</div>
</div>
{/* Content */}
<div className={theme.articleContent}>
<div
className={theme.articleContent}
role="presentation"
onClick={articleClickHandler}
onKeyPress={articleClickHandler}
>
<MarkdownRenderer markdown={fields.content} {...contentfulConfig} />
{
fields.type === 'Video' && fields.contentUrl ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
ol {
@include tc-body-md;

padding-left: 20px;
padding-left: 30px;
margin-bottom: 20px;

@include roboto-regular;
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@include xs-to-sm {
margin: 5px;
}

@media screen and (max-width: 425px) {
max-height: none;
}
}

.contentWrapper {
Expand All @@ -23,6 +27,10 @@
display: flex;
flex-direction: row;
align-items: stretch;

@media screen and (max-width: 425px) {
flex-direction: column;
}
}

.main {
Expand Down Expand Up @@ -225,6 +233,11 @@
min-width: 150px;
}

@media screen and (max-width: 425px) {
width: 100%;
min-height: 130px;
}

&::before {
content: '';
width: 35px;
Expand All @@ -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;
}
}
}
4 changes: 2 additions & 2 deletions src/shared/components/Contentful/SearchBar/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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)}`;
}
}
}
Expand Down