feat: Replace new with start screen
- Convert to liquid - Add old ongoing function for now - Add macros as partials - Rename data source to better reflect usage - Update app.js to fulfill jshint
This commit is contained in:
parent
6c252875fa
commit
c259ead9a0
8 changed files with 94 additions and 55 deletions
|
|
@ -1,25 +1,33 @@
|
|||
//NEW
|
||||
|
||||
function Clock(id) {
|
||||
this.id = id;
|
||||
'use strict';
|
||||
|
||||
var that = this;
|
||||
setInterval(function () { that.updateClock(); }, 1000);
|
||||
this.id = id;
|
||||
const that = this;
|
||||
|
||||
setInterval(function () {
|
||||
that.updateClock();
|
||||
}, 1000);
|
||||
this.updateClock();
|
||||
}
|
||||
|
||||
Clock.prototype.updateClock = function () {
|
||||
var date = new Date();
|
||||
var clock = document.getElementById(this.id);
|
||||
'use strict';
|
||||
|
||||
const date = new Date();
|
||||
const clock = document.getElementById(this.id);
|
||||
//console.log(this);
|
||||
clock.innerHTML = this.formatDigits(date.getHours()) + ":" + this.formatDigits(date.getMinutes()) + ":" + this.formatDigits(date.getSeconds());
|
||||
clock.innerHTML = this.formatDigits(date.getHours()) + ':' + this.formatDigits(date.getMinutes()) + ":" + this.formatDigits(date.getSeconds());
|
||||
};
|
||||
|
||||
Clock.prototype.formatDigits = function (val) {
|
||||
if (val < 10) val = "0" + val;
|
||||
'use strict';
|
||||
|
||||
if (val < 10) val = '0' + val;
|
||||
|
||||
return val;
|
||||
}
|
||||
};
|
||||
|
||||
//OLD
|
||||
|
||||
|
|
@ -121,6 +129,7 @@ function barwidth(size, G, W) {
|
|||
|
||||
return newW;
|
||||
}
|
||||
|
||||
//String Element erweitern
|
||||
String.prototype.transform = function () {
|
||||
return parseFloat(this.replace(',', '.'));
|
||||
|
|
@ -129,6 +138,7 @@ String.prototype.transform = function () {
|
|||
Array.prototype.arrayAdd = function () {
|
||||
return eval(this.join("+"));
|
||||
}
|
||||
|
||||
//Speicherplatz in Prozent berechnen
|
||||
function percentage(total, gigs, round) {
|
||||
var totalSpace = total;
|
||||
|
|
@ -138,6 +148,7 @@ function percentage(total, gigs, round) {
|
|||
|
||||
return p;
|
||||
}
|
||||
|
||||
//Speicherplatz in GB berechnen
|
||||
function gigabytes(percent, total, round) {
|
||||
var occupiedPercent = percent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue