frontend: replace the niceborder under the menu by a time progressbar

This commit is contained in:
nemunaire 2018-12-05 02:56:09 +01:00
parent dff8431e8b
commit 598f4a5076
2 changed files with 7 additions and 1 deletions

View file

@ -66,7 +66,7 @@
<div ng-controller="DataController"> <div ng-controller="DataController">
<nav class="navbar navbar-expand-sm bg-primary niceborder" ng-cloak> <nav class="navbar navbar-expand-sm bg-primary" style="border-bottom: none;" ng-cloak>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navMenu" aria-controls="navMenu" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navMenu" aria-controls="navMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -117,6 +117,10 @@
</span> </span>
</nav> </nav>
<div class="progress" style="background-color: #4eaee6; height: 5px; border-radius: 0;">
<div class="progress-bar bg-secondary" role="progressbar" style="width: {{timeProgression * 100}}%"></div>
</div>
<div class="container page-header text-primary" ng-cloak> <div class="container page-header text-primary" ng-cloak>
<h1 ng-if="(current_theme)">{{ themes[current_theme].name }} <small class="authors" ng-if="themes[current_theme].authors" ng-bind-html="themes[current_theme].authors"></small></h1> <h1 ng-if="(current_theme)">{{ themes[current_theme].name }} <small class="authors" ng-if="themes[current_theme].authors" ng-bind-html="themes[current_theme].authors"></small></h1>
<h1 ng-if="(!current_theme && title)" ng-cloak>{{ title }} <small class="authors" ng-if="authors">{{ authors }}</small></h1> <h1 ng-if="(!current_theme && title)" ng-cloak>{{ title }} <small class="authors" ng-if="authors">{{ authors }}</small></h1>

View file

@ -156,6 +156,8 @@ angular.module("FICApp")
remain = $rootScope.settings.end - srv_cur; remain = $rootScope.settings.end - srv_cur;
} }
$rootScope.timeProgression = 1 - remain / ($rootScope.settings.end - $rootScope.settings.start);
remain = remain / 1000; remain = remain / 1000;
if (remain < 0) { if (remain < 0) {