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

Commit 19d382c

Browse files
Merge branch 'nursoltan-s-issue-77' into bugbash
2 parents 2a9d1c2 + 1b70e3b commit 19d382c

File tree

6 files changed

+148
-5
lines changed

6 files changed

+148
-5
lines changed

Diff for: src/assets/icons/banner-chevron-up.svg

+17
Loading

Diff for: src/components/Banner/index.jsx

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 ? "" : "expanded"}`}
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+
<p>
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+
</p>
34+
<h3>NOTE THAT THIS IS NOT THE FINAL VERSION OF THE SITE.</h3>
35+
<p>
36+
You may encounter occasional broken links or error messages. If so,
37+
please let us know! This is what the Beta phase is intended for, and
38+
your feedback will enable us to greatly improve the new site.{" "}
39+
</p>
40+
<p>
41+
You can click on the Feedback button on page or file a github ticket
42+
at{" "}
43+
<a href="http://https://github.com/topcoder-platform/micro-frontends-earn-app/issues/new">
44+
https://github.com/topcoder-platform/micro-frontends-earn-app/issues/new
45+
</a>
46+
.
47+
</p>
48+
<p>Thank you!</p>
49+
</div>
50+
)}
51+
</div>
52+
);
53+
};
54+
55+
Banner.propTypes = {};
56+
57+
export default Banner;

Diff for: src/components/Banner/styles.scss

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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: 28px;
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+
&.expanded {
34+
transform: rotate(180deg);
35+
}
36+
37+
&:hover {
38+
cursor: pointer;
39+
}
40+
}
41+
42+
.content {
43+
display: flex;
44+
flex-direction: column;
45+
justify-content: flex-start;
46+
font-size: 16px;
47+
margin-bottom: 24px;
48+
width: 85%;
49+
50+
h3 {
51+
font-size: 15px;
52+
font-weight: bold;
53+
margin-top: 15px;
54+
}
55+
56+
p {
57+
margin-top: 15px;
58+
}
59+
60+
a {
61+
text-decoration: underline;
62+
}
63+
64+
}
65+
}

Diff for: src/containers/Challenges/Listing/ChallengeItem/index.jsx

+1-1
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";

Diff for: src/containers/Challenges/index.jsx

+2
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">

Diff for: src/styles/_variables.scss

+6-4
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)