Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 3f6de3c

Browse files
Merge branch 'issue-77' of https://github.com/nursoltan-s/micro-frontends-earn-app into nursoltan-s-issue-77
2 parents 2a9d1c2 + fc0059e commit 3f6de3c

File tree

6 files changed

+145
-5
lines changed

6 files changed

+145
-5
lines changed
Lines changed: 17 additions & 0 deletions
Loading

src/components/Banner/index.jsx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import React, { useState } from "react";
2+
import PT from "prop-types";
3+
import BannerChevronUp from "../../assets/icons/banner-chevron-up.svg";
4+
5+
import "./styles.scss";
6+
7+
const Banner = () => {
8+
const [isExpanded, setIsExpanded] = useState(false);
9+
const header =
10+
"Welcome to our BETA work listings site - Tell us what you think!";
11+
12+
return (
13+
<div styleName="banner">
14+
<p styleName="header">
15+
{header}
16+
17+
<span
18+
styleName={`chevron ${isExpanded ? "up" : "down"}`}
19+
role="button"
20+
tabIndex="0"
21+
onClick={() => setIsExpanded(!isExpanded)}
22+
>
23+
<BannerChevronUp />
24+
</span>
25+
</p>
26+
27+
{isExpanded && (
28+
<div styleName="content">
29+
<h3>
30+
Welcome to the Beta version of the new Challenge Listings. During
31+
this Beta phase, we will be fine-tuning the platform based on
32+
feedback we receive from you, our community members.
33+
</h3>
34+
<br />
35+
<h3>NOTE THAT THIS IS NOT THE FINAL VERSION OF THE SITE.</h3>
36+
<br />
37+
<h3>
38+
You may encounter occasional broken links or error messages. If so,
39+
please let us know! This is what the Beta phase is intended for, and
40+
your feedback will enable us to greatly improve the new site.{" "}
41+
</h3>
42+
<br />
43+
<h3>
44+
You can click on the Feedback button on page or file a github ticket
45+
at{" "}
46+
<a href="http://https://github.com/topcoder-platform/micro-frontends-earn-app/issues/new">
47+
https://github.com/topcoder-platform/micro-frontends-earn-app/issues/new
48+
</a>
49+
.
50+
</h3>
51+
<br />
52+
<h3>Thank you!</h3>
53+
</div>
54+
)}
55+
</div>
56+
);
57+
};
58+
59+
Banner.propTypes = {};
60+
61+
export default Banner;

src/components/Banner/styles.scss

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
@import "styles/variables";
2+
@import "styles/mixins";
3+
@import "styles/GUIKit/default";
4+
5+
.banner {
6+
display: flex;
7+
justify-content: flex-start;
8+
flex-wrap: wrap;
9+
10+
width: 100%;
11+
background: linear-gradient(90deg, $blue 0%, $green 100%);
12+
border-radius: 10px;
13+
margin-bottom: 22px;
14+
color: $white;
15+
padding-left: 54px;
16+
17+
.header {
18+
display: flex;
19+
width: 100%;
20+
justify-content: space-between;
21+
flex-direction: row;
22+
align-items: center;
23+
@include roboto-bold;
24+
height: 50px;
25+
font-size: 20px;
26+
text-transform: uppercase;
27+
}
28+
29+
.chevron {
30+
margin-right: 20px;
31+
margin-top: 5px;
32+
33+
&.up {
34+
}
35+
36+
&.down {
37+
transform: rotate(180deg);
38+
}
39+
40+
&:hover {
41+
cursor: pointer;
42+
}
43+
}
44+
45+
.content {
46+
display: flex;
47+
flex-direction: column;
48+
justify-content: flex-start;
49+
font-size: 16px;
50+
margin-top: 24px;
51+
margin-bottom: 12px;
52+
width: 80%;
53+
54+
a {
55+
text-decoration: underline;
56+
}
57+
}
58+
}

src/containers/Challenges/Listing/ChallengeItem/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const ChallengeItem = ({ challenge, onClickTag, onClickTrack, isLoggedIn }) => {
2424
challenge.prizeSets
2525
);
2626

27-
let submissionLink = `${process.env.URL.BASE}/challenges/${challenge.id}`;
27+
let submissionLink = `${process.env.URL.BASE}/challenges/${challenge.id}`; // eslint-disable-line no-undef
2828

2929
if (isLoggedIn && challenge.numOfSubmissions > 0) {
3030
submissionLink += "?tab=submissions";

src/containers/Challenges/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import IconListView from "../../assets/icons/list-view.svg";
1010
import IconCardView from "../../assets/icons/card-view.svg";
1111

1212
import "./styles.scss";
13+
import Banner from "../../components/Banner";
1314

1415
const Challenges = ({
1516
challenges,
@@ -56,6 +57,7 @@ const Challenges = ({
5657

5758
return (
5859
<div styleName="page">
60+
<Banner />
5961
<h1 styleName="title">
6062
<span>CHALLENGES</span>
6163
<span styleName="view-mode">

src/styles/_variables.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* The standard TC UI pallete. Always prefer to use these constants to set
55
* colors in your stylesheets.
66
*/
7-
/* Grayscale colors. */
7+
/* Grayscale colors. */
88
$tc-black: #151516;
99
$tc-gray-90: #2a2a2b;
1010
$tc-gray-80: #404041;
@@ -97,7 +97,7 @@ $tc-pastel-blue: #5656f4;
9797
$tc-pastel-yellow: #feb900;
9898
$tc-pastel-crimson: #e90c5a;
9999

100-
/* Color aliases. */
100+
/* Color aliases. */
101101

102102
/* Base metal colors. */
103103
$tc-gold: $tc-gold-100;
@@ -132,8 +132,10 @@ $base-unit: 5px;
132132
$body-color: $tc-gray-90;
133133
$white: $tc-white;
134134
$green: #229174;
135-
$darkGreen: #137D60;
135+
$darkGreen: #137d60;
136136
$lightGreen: #0ab88a;
137+
$blue: #2c95d7;
138+
$green: #06d6a0;
137139

138140
$border-radius: 6px;
139141
$border-radius-sm: 5px;
@@ -142,4 +144,4 @@ $border-radius-lg: 8px;
142144
$page-padding-x: 7 * $base-unit;
143145
$page-padding-y: 32px;
144146

145-
$screen-xxl: 1366px;
147+
$screen-xxl: 1366px;

0 commit comments

Comments
 (0)