diff --git a/index.html b/index.html index 0f4dda5..f1c34c4 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,7 @@
{{matesText()}}
+
Last mate: {{lastMate | date:'medium'}}
diff --git a/scripts/app.js b/scripts/app.js index 7d485bc..44db350 100644 --- a/scripts/app.js +++ b/scripts/app.js @@ -16,12 +16,15 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http, }; $scope.cooldown = false; + $scope.lastMate = ""; + $http.get("/mates") .then((r) => { var json = angular.fromJson(r.data); $scope.mates = json.mates; + $scope.lastMate = json.lastUpdate; animateCountdown($scope, $interval, json.lastUpdate, json.cooldown); }); @@ -39,8 +42,8 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http, if (json.error || r.status != 200) return; $scope.mates = json.mates; + $scope.lastMate = json.lastUpdate; animateCountdown($scope, $interval, json.lastUpdate, json.cooldown); - }); }; }]); diff --git a/stylesheets/default.css b/stylesheets/default.css index 190f947..59790a5 100644 --- a/stylesheets/default.css +++ b/stylesheets/default.css @@ -10,7 +10,7 @@ body font-family: 'Arial', sans-serif; font-size: 40pt; - width: 300px; + width: 400px; height: 400px; margin-top: calc(50vh - 200px); margin-right: auto; @@ -70,3 +70,17 @@ body background-color: #0009; } + +.lastAdded +{ + font-size: 15pt; + line-height: 50px; + + width: 100%; + height: 50px; + + text-align: center; + vertical-align: middle; + + color: #444; +}