diff --git a/source/code/app.js b/source/code/app.js
index 8632638..8a21b5f 100644
--- a/source/code/app.js
+++ b/source/code/app.js
@@ -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;
diff --git a/source/data/new.json b/source/data/start.json
similarity index 56%
rename from source/data/new.json
rename to source/data/start.json
index 9d4a0a8..cc0da22 100644
--- a/source/data/new.json
+++ b/source/data/start.json
@@ -5,10 +5,10 @@
},
{
"text": "Basics",
- "href": "./demo/basics.html"
+ "href": "/demo/basics.html"
},
{
"text": "Drag",
- "href": "./demo/examples/ui/drag.html"
+ "href": "/demo/examples/ui/drag.html"
}
]
\ No newline at end of file
diff --git a/source/screens/demo/examples/ui/new.njk b/source/screens/demo/examples/ui/new.njk
deleted file mode 100755
index df1f62a..0000000
--- a/source/screens/demo/examples/ui/new.njk
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: New
-tags:
- - ui
----
-{% set pageId = page.fileSlug %}
-{% set bodyClass = "body_new" %}
-
-{% extends "hippie/_app_frame.njk" %}
-{% import "hippie/macros/_header.njk" as header %}
-
-{% block body %}
- {{ header.status(hippie, new) }}
-
{% render 'hippie/partials/status-coord', id: "log" %} + / + {% render 'hippie/partials/status-date', id: "date" %} + / + {% render 'hippie/partials/status-time', id: "time" %}
+