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

Commit 4275a89

Browse files
author
vikasrohit
committed
AS#125999129126033, 1 Million users hero banner on Dashboard
-- Added banner
1 parent 1ae9296 commit 4275a89

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

app/directives/tc-banner/tc-banner.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.tc-banner-placeholder(class="{{vm.theme}}")
22
.image
33
img(ng-src="{{vm.img}}")
4-
.title(ng-bind="vm.title")
4+
.title(ng-bind="vm.title", ng-show="vm.title !== null")
55
.content(ng-transclude, ng-show="transcluded")
6-
.description(ng-bind-html="vm.description")
6+
.description(ng-bind-html="vm.description", ng-show="vm.description !== null")
77
.ctas
88
.cta(ng-repeat="link in vm.ctas")
99
a(class="{{link.cssClass}}", title="{{link.title}}", ng-href="{{link.url}}", ng-if="link.url") {{link.title}}

app/my-dashboard/my-dashboard.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
//- .ttl
99
//- tc-banner(theme="black", banner-name="ttl")
10+
.one-million
11+
tc-banner(theme="black", banner-name="1million")
1012

1113
.tco
1214
tc-banner(theme="black", banner-name="tco16")

app/services/bannerDataService.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ import angular from 'angular'
3535
url: 'http://tco16.topcoder.com/latest/overview/',
3636
cssClass: 'tc-btn tc-btn-s tco-cta'
3737
}]
38+
},
39+
'1million': {
40+
title: null,
41+
img: require('../../assets/images/1M-banner-hero.png'),
42+
description: null,
43+
ctas: [{
44+
title: 'Learn More',
45+
url: 'https://www.topcoder.com/blog/1-million-members-strong/',
46+
cssClass: 'tc-btn tc-btn-s tco-cta'
47+
}]
3848
}
3949
// Commenting out instead of deleting in case there is
4050
// another one with a similar format soon

assets/css/my-dashboard/my-dashboard.scss

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
background-color: $white;
1212
}
1313

14-
.challenges, .srms, .programs, .tco, .ttl, .community-updates {
14+
.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
1515
@include module-l;
1616
margin-top: 1px;
1717
width: 100%;
@@ -34,7 +34,25 @@
3434
}
3535
}
3636

37-
.challenges, .srms, .programs, .tco, .ttl, .community-updates {
37+
.one-million {
38+
.tc-banner-placeholder {
39+
background: none $tc-gray-90;
40+
.image {
41+
img {
42+
width: auto;
43+
}
44+
}
45+
46+
.ctas {
47+
// specific css override to reduce the gap between image and ctas
48+
// ideally we should have separate title, image and description
49+
// however, here we have all 3 in single image
50+
margin-top: 0px;
51+
}
52+
}
53+
}
54+
55+
.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
3856
padding-top: 0px;
3957
}
4058

assets/images/1M-banner-hero.png

22.1 KB
Loading

0 commit comments

Comments
 (0)