From fc112d997b7454978e71ae8dc3fc7530b7ef22c4 Mon Sep 17 00:00:00 2001 From: d3m1g0d Date: Sat, 6 Apr 2019 15:18:43 +0200 Subject: [PATCH] First try AJAX --- frontend/frontend.js | 9 +- frontend/stylesheet.css | 36 +++--- frontend/website.html | 239 +++++++++++++++++++++------------------- 3 files changed, 147 insertions(+), 137 deletions(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index 172b9ad..4bbee0d 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -1,4 +1,7 @@ -function kebab () { - $('#values').html('kebab'); - console.log('yeet'); +$('#update').click(updateData()) +function updateData () { + const url = 'http:' + window.location.hostname + ':5000/data' + $.get(url, function (data, status) { + $('#debug').text(data) + }) } diff --git a/frontend/stylesheet.css b/frontend/stylesheet.css index 92c838c..2561df4 100644 --- a/frontend/stylesheet.css +++ b/frontend/stylesheet.css @@ -1,56 +1,56 @@ #A { - background-color: #7e00db; - color: white; + background-color: #7e00db; + color: white; } #B { - background-color: #2300ff; - color: white; + background-color: #2300ff; + color: white; } #C { - background-color: #007bff; - color: white; + background-color: #007bff; + color: white; } #D { - background-color: #00eaff; + background-color: #00eaff; } #E { - background-color: #00ff00; + background-color: #00ff00; } #F { - background-color: #70ff00; + background-color: #70ff00; } #G { - background-color: #c3ff00; + background-color: #c3ff00; } #H { - background-color: #ffef00; + background-color: #ffef00; } #R { - background-color: #ff9b00; + background-color: #ff9b00; } #I, #S { - background-color: #ff0000; + background-color: #ff0000; } #J { - background-color: #f60000; + background-color: #f60000; } #T { - background-color: #c80000; - color: white; + background-color: #c80000; + color: white; } #U { - background-color: #8d0000; - color: white; + background-color: #8d0000; + color: white; } \ No newline at end of file diff --git a/frontend/website.html b/frontend/website.html index 489bfb9..e3c1fff 100644 --- a/frontend/website.html +++ b/frontend/website.html @@ -1,119 +1,126 @@ - - - - - TeraHz - - -

TeraHz

-
-

Vrednosti:


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BandWavelength [nm]Irradiance [μW/cm²]
A410 nm---
B435 nm---
C460 nm---
D485 nm---
E510 nm---
F535 nm---
G560 nm---
H585 nm---
R610 nm---
I645 nm---
S680 nm---
J705 nm---
T730 nm---
U760 nm---
V810 nm---
W860 nm---
K900 nm---
L940 nm---
- -
- - - - + + + + + + TeraHz + + + +
+

TeraHz

+
+
+

Vrednosti:


+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BandWavelength [nm]Irradiance [μW/cm²]
A410 nm---
B435 nm---
C460 nm---
D485 nm---
E510 nm---
F535 nm---
G560 nm---
H585 nm---
R610 nm---
I645 nm---
S680 nm---
J705 nm---
T730 nm---
U760 nm---
V810 nm---
W860 nm---
K900 nm---
L940 nm---
+ +
+ + + + +