diff --git a/public/js/controllers/footerCtrl.js b/public/js/controllers/footerCtrl.js index 30ccbd2c8b..bcdd7ea6a5 100644 --- a/public/js/controllers/footerCtrl.js +++ b/public/js/controllers/footerCtrl.js @@ -1,6 +1,7 @@ "use strict"; -habitrpg.controller("FooterCtrl", ['$scope', '$rootScope', 'User', '$http', 'Notification', 'API_URL', +(typeof habitrpg !== 'undefined' ? habitrpg : habitrpgStatic) + .controller("FooterCtrl", ['$scope', '$rootScope', 'User', '$http', 'Notification', 'API_URL', function($scope, $rootScope, User, $http, Notification, API_URL) { /** diff --git a/public/manifest.json b/public/manifest.json index 2d616d2a19..416553e18e 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -84,7 +84,8 @@ "js/static.js", "js/services/notificationServices.js", "bower_components/habitrpg-shared/script/userServices.js", - "js/controllers/authCtrl.js" + "js/controllers/authCtrl.js", + "js/controllers/footerCtrl.js" ], "css": [ "bower_components/bootstrap/docs/assets/css/bootstrap.css", diff --git a/views/static/layout.jade b/views/static/layout.jade index 5492c2365f..081fbdb637 100644 --- a/views/static/layout.jade +++ b/views/static/layout.jade @@ -1,12 +1,15 @@ //Trick needed to pass 'env' to ./layout block vars doctype 5 -html +html(ng-app='habitrpgStatic') head block title title=env.t('titleIndex') + script(type='text/javascript'). + window.env = !{JSON.stringify(env)}; + link(rel='shortcut icon', href='#{env.getBuildUrl("favicon.ico")}?v=2') meta(charset='utf-8') @@ -18,7 +21,7 @@ html $.getScript("//s7.addthis.com/js/250/addthis_widget.js#pubid=lefnire"); body - div(ng-app='habitrpgStatic',ng-controller='AuthCtrl',style='margin-top:60px;') + div(ng-controller='AuthCtrl',style='margin-top:60px;') include ./login-modal .navbar.navbar-inverse.navbar.navbar-inverse.navbar-fixed-top .navbar-inner