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

Commit 4237fce

Browse files
committed
Small corrections of the previous commit
Notifcations/banner block is moved to the correct position Documentation on related configuration is added to README.md
1 parent d93047f commit 4237fce

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,32 @@ To make the mentioned configuration on Ubuntu 16.04 you:
3939
- dan_developer/dantopcoder123
4040
- Create your own:
4141
- You may register your own account at https://local.topcoder-dev.com/register
42+
43+
# Configuration
44+
45+
### Notifications in the Dashboard
46+
47+
There's a constant `VIDEO_DEFAULT_HEIGHT` has been added to /app/topcoder.constants.js, the value will be used as the default height when a banner expanded.
48+
49+
To add a new notification, append a new configuration object to /app/my-dashboard/notifications/news.json, the configuration object has following properties:
50+
51+
- header: header text displayed when collapsed.
52+
- details: details text displayed when collapsed.
53+
- headerExpand: header text displayed when expanded, use `header` if this property is falsy
54+
- detailsExpand: details text displayed when expanded, use `details` if this property is falsy
55+
- backgroundImage: background image used when expaneded, the path is relative to /assets/images/news
56+
- redirectTo: the url will redirect to when user click the `Learn more` button, will hide the button if this property is falsy
57+
- redirectText: the text will be displayed on the `Learn more` button, will hide the button if this property is falsy
58+
- videoCode: the video resource code to embed when expanded
59+
- live: show the live flag or not when collapsed
60+
- liveExpand: show the live flag or not when expanded
61+
- height: height of the expanded view, any non-falsy value of this property will override the default height, i.e. `VIDEO_DEFAULT_HEIGHT` in /app/topcoder.constants.js
62+
63+
### Banners in the Dashboard
64+
65+
You can edit `/app/my-dashboard/notifications/notifications.jade` to update the banners. Element with class `banner-row` represents a row of banners, anchor element with class `banner` represents a banner, you can place as many banners as you want in a row, just make sure it have a proper appearance, all banners in one row have same width.
4266

43-
## Recommended Developer Tools
67+
# Recommended Developer Tools
4468

4569
Syntax highlighting for ES6 and React JSX
4670
- Install [babel](https://packagecontrol.io/packages/Babel) via the package manager in Sublime Text

app/my-dashboard/my-dashboard.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
.my-dashboard-container
44
.subtrack-stats(id="stats", ui-view="subtrack-stats")
55

6-
.challenges(id="challenges", ui-view="my-challenges")
7-
86
.notifications(ui-view="notifications")
7+
8+
.challenges(id="challenges", ui-view="my-challenges")
99

1010
.srms(id="srms", ui-view="srms", ng-show="dashboard.showSRMs")
1111

0 commit comments

Comments
 (0)