dashboard topbar improvement

parent 1649886a
......@@ -28,6 +28,10 @@ dashboardControllers.controller('SupervisorCtrl', function SupervisorCtrl(
$location.path('/setup');
};
$scope.isActive = function (viewLocation) {
return viewLocation === $location.path();
};
// Subscribe to the supervisor's room
IOService.post('/sup/subscribe', {
action: 'subscribe',
......
<nav
class="topbar navbar navbar-default"
role="navigation">
<div class="container-fluid">
<div class="container">
<div class="navbar-header">
<a
class="topbar__logo navbar-brand"
......@@ -15,17 +15,17 @@
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li ng-class="{active: $location.url() == '/students'}">
<li ng-class="{active: isActive('/students')}">
<a href="/app/#/students">
<i class="fa fa-users" aria-hidden="true"></i> {{ 'students' | translate }}
</a>
</li>
<li ng-if="user.isOffice" ng-class="{active: $location.url() == '/supervisor/list'}">
<li ng-if="user.isOffice" ng-class="{active: isActive('/supervisor/list')}">
<a class="pointer" role="menuitem" tabindex="0" href="/app/#/supervisor/list">
<i class="fa fa-users" aria-hidden="true"></i> {{ 'supervisors' | translate }}
</a>
</li>
<li ng-if="!user.isTutor" ng-class="{active: $location.url() == '/instructions'}">
<li ng-if="!user.isTutor" ng-class="{active: isActive('/instructions')}">
<a href="/app/#/instructions">
<i class="glyphicon glyphicon-tasks" aria-hidden="true"></i> {{ 'instructions' | translate }}
</a>
......
<!-- SupervisorCtrl controls here, see app.js -->
<header-supervisor></header-supervisor>
<div class="container">
<header-supervisor></header-supervisor>
<!-- The content -->
<div ui-view id="main-content"></div>
</div>
......
......@@ -1198,3 +1198,10 @@ input.editable.scene-name {
position:absolute;
width:100%
}
.navbar-nav{
margin-left: 1em;
}
.navbar-default .navbar-nav > .active > a{
border-radius: .4em;
}
......@@ -3,10 +3,12 @@
* a supervisor has logged in.
*/
.topbar {
padding: 0.5em;
/*padding: 0.5em;
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top-right-radius: 0;*/
padding: 0.7em;
border-radius: none;
&__logo {
width: 5rem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment