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

Commit 4f4ca7b

Browse files
Make announcement responsive, change announcement and TCO banner
1 parent daeecb0 commit 4f4ca7b

File tree

11 files changed

+130
-26
lines changed

11 files changed

+130
-26
lines changed

app/directives/notification/notification.jade

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
.header {{config.header}}: 
66
.details {{config.details}}
77
i.expand.fa.fa-plus(ng-click="vm.toggle()")
8-
.expanded(ng-show="vm.expanded", ng-style="{'background-image': 'url('+vm.loadImage(config.backgroundImage)+')'}")
9-
.left(ng-style="{'height': (config.height || vm.defaultHeight) + 'px'}")
8+
.expanded(ng-show="vm.expanded")
9+
.notification-bg-desktop(ng-style="{'background-image': 'url('+vm.loadImage(config.backgroundImageDesktop)+')'}")
10+
.notification-bg-tablet(ng-style="{'background-image': 'url('+vm.loadImage(config.backgroundImageTablet)+')'}")
11+
.notification-bg-mobile(ng-style="{'background-image': 'url('+vm.loadImage(config.backgroundImageMobile)+')'}")
12+
.left
1013
.header {{config.headerExpand}}
1114
.details {{config.detailsExpand}}
1215
a.action(ng-show="config.redirectText && config.redirectTo", href="{{config.redirectTo}}") {{config.redirectText}}
+10-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
[
22
{
3-
"header": "Topcoder MVP Announcement!",
4-
"details": "Check out our first group of MVPs!",
5-
"headerExpand": "Topcoder MVP Announcement!",
6-
"detailsExpand": "Check out our first group of MVPs! Learn more about who they are and a little bit more about them!",
7-
"backgroundImage": "tc-mvps-banner.jpg",
8-
"redirectTo": "https://www.topcoder.com/blog/introducing-2018-topcoder-mvp-members/",
9-
"redirectText": "Read More Here",
3+
"header": "QA - A New Way to Win a Trip to TCO!",
4+
"details": "QA Challenges now have TCO18 points. Top the leaderboard and win a trip to the TCO18 Finals!",
5+
"headerExpand": "QA - A New Way to Win a Trip to TCO!",
6+
"detailsExpand": "Stage 3 of TCO18 has begun and QA Challenges now have TCO18 points. Top the leaderboard and win a trip to the TCO18 Finals!",
7+
"backgroundImageDesktop": "TCO18-desktop.jpg",
8+
"backgroundImageTablet": "TCO18-tablet.jpg",
9+
"backgroundImageMobile": "TCO18-mobile.jpg",
10+
"redirectTo": "https://tco18.topcoder.com/win-a-trip/qa-trip-winning-opportunity/",
11+
"redirectText": "Read More",
1012
"live": false,
1113
"liveExpand": false,
1214
"customTag": {
1315
"text": "Announcement"
1416
},
15-
"videoCode": "",
16-
"height": 500
17+
"videoCode": ""
1718
}
1819
]

assets/css/directives/notification.directive.scss

+113-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
@import 'topcoder/tc-includes';
22

3+
$tablet-width: 768px;
4+
$desktop-width: 1024px;
5+
6+
@mixin mobile {
7+
@media screen and (max-width: #{$tablet-width - 1px}) {
8+
@content;
9+
}
10+
}
11+
12+
@mixin tablet {
13+
@media screen and (min-width: #{$tablet-width}) and (max-width: #{$desktop-width - 1px}) {
14+
@content;
15+
}
16+
}
17+
18+
@mixin desktop {
19+
@media screen and (min-width: #{$desktop-width}) {
20+
@content;
21+
}
22+
}
23+
324
.notification{
425
margin-bottom: 24px;
526
.live{
@@ -55,13 +76,41 @@
5576
}
5677
.expanded{
5778
background-color: $tc-black;
58-
background-position: center top;
59-
// background-position: 0 20%;
60-
background-size: cover;
61-
background-repeat: no-repeat;
6279
color: $tc-black;
6380
display: flex;
6481
position: relative;
82+
.notification-bg-desktop,
83+
.notification-bg-tablet,
84+
.notification-bg-mobile {
85+
display: none;
86+
position: absolute;
87+
top: 0;
88+
left: 0;
89+
width: 100%;
90+
height: 100%;
91+
background-position: center top;
92+
// background-position: 0 20%;
93+
background-size: cover;
94+
background-repeat: no-repeat;
95+
}
96+
.notification-bg-desktop {
97+
@include desktop {
98+
background-position: center center;
99+
display: block;
100+
}
101+
}
102+
.notification-bg-tablet {
103+
@include tablet {
104+
display: block;
105+
background-position: center right;
106+
}
107+
}
108+
.notification-bg-mobile {
109+
@include mobile {
110+
background-position: center right;
111+
display: block;
112+
}
113+
}
65114
.mask{
66115
position: absolute;
67116
top: 0;
@@ -72,33 +121,83 @@
72121
}
73122
.left{
74123
flex: 1;
75-
height: 100%;
76124
position: relative;
77-
margin-top: 2%;
125+
@include desktop {
126+
height: 400px;
127+
}
128+
@include tablet {
129+
height: 375px;
130+
display: flex;
131+
flex-direction: column;
132+
padding: 20px;
133+
}
134+
@include mobile {
135+
height: 230px;
136+
display: flex;
137+
flex-direction: column;
138+
padding: 14px;
139+
}
78140
}
79141
.header{
80142
font-weight: bold;
81143
font-size: 40px;
82-
margin-top: 340px;
83-
padding-left: 60px;
84-
margin-bottom: 12px;
144+
margin-bottom: 14px;
85145
color: #FFF;
146+
@include desktop {
147+
margin-top: 34px;
148+
padding-left: 44px;
149+
}
150+
@include tablet {
151+
font-size: 36px;
152+
flex: 1;
153+
text-align: center;
154+
}
155+
@include mobile {
156+
font-size: 18px;
157+
flex: 1;
158+
}
86159
}
87160
.details{
88-
max-width: 50%;
89161
font-size: 16px;
90162
line-height: 16px;
91163
font-weight: 100;
92-
padding-left: 60px;
93164
color: #FFF;
165+
position: relative;
166+
@include desktop {
167+
max-width: 50%;
168+
padding-left: 44px;
169+
font-size: 18px;
170+
line-height: 22px;
171+
margin-bottom: 40px;
172+
}
173+
@include tablet {
174+
font-size: 16px;
175+
margin-bottom: 16px;
176+
text-align: center;
177+
}
178+
@include tablet {
179+
font-size: 14px;
180+
margin-bottom: 16px;
181+
text-align: center;
182+
}
94183
}
95184
.action{
96-
position: absolute;
97-
bottom: 30px;
98-
left: 60px;
99185
background-color: white;
100186
padding: 10px 20px;
101187
border-radius: 26px;
188+
@include desktop {
189+
position: relative;
190+
margin-left: 40px;
191+
}
192+
@include tablet {
193+
text-align: center;
194+
}
195+
@include mobile {
196+
padding: 6px 20px;
197+
font-size: 14px;
198+
margin-top: 4px;
199+
text-align: center;
200+
}
102201
}
103202
.right{
104203
flex: 1;

assets/css/my-dashboard/notifications.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
margin-right: 0;
4141
}
4242
&.tco18{
43-
background: url(../../images/banner-tco18-stage-2.jpg) center/cover;
43+
background: url(../../images/banner-tco18-stage-3.jpg) center/cover;
44+
background-position: center top;
4445
}
4546
&.watson{
4647
background: url(../../images/banner-watson.jpg) center/cover;
-323 KB
Binary file not shown.
72.4 KB
Loading

assets/images/news/TCO18-desktop.jpg

253 KB
Loading

assets/images/news/TCO18-mobile.jpg

37.4 KB
Loading

assets/images/news/TCO18-tablet.jpg

179 KB
Loading
-706 KB
Binary file not shown.

assets/images/news/tc-mvps-banner.jpg

-207 KB
Binary file not shown.

0 commit comments

Comments
 (0)