Skip to content

Commit d8ec57a

Browse files
Merge pull request #5692 from topcoder-platform/thrive-sep-update1
Thrive sep update1
2 parents 17017b5 + aa072b8 commit d8ec57a

File tree

7 files changed

+91
-18
lines changed

7 files changed

+91
-18
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ workflows:
356356
filters:
357357
branches:
358358
only:
359-
- free
359+
- thrive-sep-update1
360360
# This is beta env for production soft releases
361361
- "build-prod-beta":
362362
context : org-global

src/shared/components/Contentful/Article/Article.jsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export default class Article extends React.Component {
129129
uppercaseHeadings: false,
130130
},
131131
).substring(0, CONTENT_PREVIEW_LENGTH);
132+
const catsGrouped = _.groupBy(fields.contentCategory, cat => cat.fields.trackParent);
132133

133134
return (
134135
<React.Fragment>
@@ -215,14 +216,25 @@ export default class Article extends React.Component {
215216
<div className={theme.separator} />
216217
<h3 className={theme.label}>categories</h3>
217218
{/* Cats */}
218-
<div className={theme.tagContainer}>
219+
<div className={theme.catsWrapper}>
219220
{
220-
_.map(fields.contentCategory, cat => (
221-
<div className={theme.tagItem} key={cat.sys.id} title={`Search for articles in ${cat.fields.trackParent}:${cat.fields.name} category`}>
222-
<Link to={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_TRACKS_PATH}?${qs.stringify({ track: cat.fields.trackParent, tax: cat.fields.name })}`} key={`${cat.sys.id}`} className={theme.catLink}>{cat.fields.name}</Link>
223-
</div>
224-
))
225-
}
221+
_.keys(catsGrouped).map(k => (
222+
<React.Fragment>
223+
<div className={theme.catItem} key={k} title={`Search for articles in ${k} category`}>
224+
<Link to={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_TRACKS_PATH}?${qs.stringify({ track: k })}`} key={k} className={theme.catLink}>{k}</Link>
225+
</div>
226+
<div className={theme.catsContainer}>
227+
{
228+
_.map(catsGrouped[k], cat => (
229+
<div className={theme.catItem} key={cat.sys.id} title={`Search for articles in ${cat.fields.trackParent}:${cat.fields.name} category`}>
230+
<Link to={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_TRACKS_PATH}?${qs.stringify({ track: cat.fields.trackParent, tax: cat.fields.name })}`} key={`${cat.sys.id}`} className={theme.catLink}>{cat.fields.name}</Link>
231+
</div>
232+
))
233+
}
234+
</div>
235+
</React.Fragment>
236+
))
237+
}
226238
</div>
227239
<div className={theme.separator} />
228240
<h3 className={theme.label}>Tags</h3>

src/shared/components/Contentful/Article/themes/default.scss

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,53 @@
134134
}
135135
}
136136

137+
.catsWrapper {
138+
margin-top: 10px;
139+
140+
.catsContainer {
141+
display: flex;
142+
justify-content: flex-start;
143+
align-items: center;
144+
flex-wrap: wrap;
145+
border-left: 3px solid #e9e9e9;
146+
padding-left: 7px;
147+
margin-bottom: 5px;
148+
margin-left: 6px;
149+
150+
&:last-child {
151+
margin-bottom: 0;
152+
}
153+
}
154+
155+
.catItem {
156+
@include roboto-regular;
157+
158+
display: inline-block;
159+
height: 23px;
160+
width: auto;
161+
padding: 4px 6px;
162+
white-space: nowrap;
163+
border: 1px solid #2a2a2a;
164+
border-radius: 5px;
165+
background-color: #fff;
166+
color: #2a2a2a;
167+
font-size: 11px;
168+
font-weight: 400;
169+
letter-spacing: 0.4px;
170+
line-height: 15px;
171+
text-align: left;
172+
margin-bottom: 5px;
173+
174+
&:last-child {
175+
margin-bottom: 0;
176+
}
177+
178+
.catLink {
179+
font-weight: 500;
180+
}
181+
}
182+
}
183+
137184
.tagContainer {
138185
display: flex;
139186
justify-content: flex-start;
@@ -159,10 +206,6 @@
159206
letter-spacing: 0.4px;
160207
line-height: 15px;
161208
text-align: left;
162-
163-
.catLink {
164-
font-weight: 500;
165-
}
166209
}
167210
}
168211

@@ -425,16 +468,17 @@
425468
background-color: #e9e9e9;
426469
flex-direction: column;
427470
overflow: visible;
471+
margin-bottom: 35px;
428472

429473
@include xs-to-sm {
430474
margin-bottom: 200px;
431475
}
432476

433-
@media screen and (min-width: 1024px) and (max-width: 1440px) {
434-
margin-bottom: 50px;
477+
@media screen and (min-width: 768px) and (max-width: 1440px) {
478+
margin-bottom: 108px;
435479
}
436480

437-
@media screen and (max-width: 425px) {
481+
@media screen and (max-width: 768px) {
438482
margin-bottom: 300px;
439483
}
440484

src/shared/containers/EDU/Home.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default class EDUHome extends React.Component {
4444

4545
render() {
4646
const { taxonomy } = this.state;
47-
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
47+
const title = 'Tutorials And Workshops That Matter | Thrive | Topcoder';
4848
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';
4949

5050
return (
@@ -64,6 +64,7 @@ export default class EDUHome extends React.Component {
6464
</div>
6565
<div className={homeTheme.searchBarWrapp}>
6666
<SearchBar />
67+
<div className={homeTheme.infoTextWrap}>Don’t know what a challenge is? <a className={homeTheme.infoTextLink} href="/thrive/articles/all-about-topcoder-challenges-tasks-and-gig-work-opportunities" target="_blank" rel="noreferrer">Find out here</a>.</div>
6768
</div>
6869
</div>
6970
<div className={homeTheme.shapeBanner} />

src/shared/containers/EDU/Search.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class EDUSearch extends React.Component {
8686
const {
8787
taxonomy, query, tree, isShowFilter,
8888
} = this.state;
89-
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
89+
const title = 'Tutorials And Workshops That Matter | Thrive | Topcoder';
9090
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';
9191

9292
const metaTags = (

src/shared/containers/EDU/Tracks.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default class EDUTracks extends React.Component {
183183
taxonomy, query, tree, isShowFilter,
184184
articleCnt, videoCnt, forumCnt,
185185
} = this.state;
186-
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
186+
const title = 'Tutorials And Workshops That Matter | Thrive | Topcoder';
187187
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';
188188
const metaTags = (
189189
<MetaTags

src/shared/containers/EDU/styles/home.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@
8787
top: 0;
8888
margin-left: -20px;
8989
}
90+
91+
.infoTextWrap {
92+
margin-top: 6px;
93+
color: #fff;
94+
line-height: 36px;
95+
font-size: 16px;
96+
font-family: Roboto, sans-serif;
97+
98+
.infoTextLink {
99+
text-decoration: underline;
100+
101+
&:hover {
102+
text-decoration: none;
103+
}
104+
}
105+
}
90106
}
91107
}
92108

0 commit comments

Comments
 (0)