aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/main.js27
-rw-r--r--src/js/profile.js1
2 files changed, 13 insertions, 15 deletions
diff --git a/src/js/main.js b/src/js/main.js
index 1f869c4..5d17e02 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -9,22 +9,19 @@ $(document).ready(function(){
function setupLoginMenu() {
$('#nav .login-link').remove();
-
- if ($('#nav').find('[href="/profile"]').length == 0) {
- $('<li>').append(
+
+ var extra_links = {'Leagues': '/leagues', 'My Bots': '/profile/bots', 'Profile': '/profile', 'Logout': '/logout'};
+
+ for (var text in extra_links) {
+ var li = $('<li>').append(
$('<a>')
.attr('role', 'presentation')
- .attr('title', 'User profile')
- .attr('href', '/profile')
- .text('Profile'))
- .appendTo($('#nav'));
+ .attr('title', text)
+ .attr('href', extra_links[text])
+ .text(text));
+ if (extra_links[text] == selected_page) { // selected_page is added in layout-main.jade
+ li.addClass('active');
+ }
+ li.appendTo($('#nav'));
}
-
- $('<li>').append(
- $('<a>')
- .attr('role', 'presentation')
- .attr('title', 'Logout')
- .attr('href', '/logout')
- .text('Logout'))
- .appendTo($('#nav'));
} \ No newline at end of file
diff --git a/src/js/profile.js b/src/js/profile.js
index 48600db..7b36432 100644
--- a/src/js/profile.js
+++ b/src/js/profile.js
@@ -4,6 +4,7 @@ $(document).ready(function(){
function setupGreeter() {
$('#greeter').append(' ' + $.cookie(Botleagues.cookie_login_email));
+
$('#banner').append(
$('<span>')
.attr('id', 'banner-email')