-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstromkonto.html
111 lines (108 loc) · 5.16 KB
/
stromkonto.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Corrently Stromkonto</title>
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link rel="stylesheet" href="/assets/css/Footer-Basic.css">
<link rel="stylesheet" href="/assets/css/header-1.css">
<link rel="stylesheet" href="/assets/css/header-2.css">
<link rel="stylesheet" href="/assets/css/header.css">
<link rel="stylesheet" href="/assets/css/Navigation-Clean.css">
<link rel="stylesheet" href="/assets/css/styles.css">
<link rel="manifest" href="./manifest.json">
</head>
<body>
<div class="shadow-lg" style="margin-bottom: 20px;">
<nav class="navbar navbar-light navbar-expand-md navigation-clean" style="background-color: #ffffff;margin-bottom: 25px;">
<div class="container"><a class="navbar-brand" style="color: #ffa700;font-family: Roboto, sans-serif;" href="/"><img style="filter: brightness(100%) contrast(102%) saturate(100%) sepia(0%);" src="/assets/img/corrently_logo.png"></a><button data-toggle="collapse" class="navbar-toggler"
data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<form action="./stromkonto.html" method="GET">
<div class="form-group text-center">
<div class="input-group rounded">
<div class="input-group-prepend"><span class="input-group-text">Account</span></div>
<input id="account" class="form-control" type="text" name="a">
<div class="input-group-append">
<button
class="btn btn-warning text-center" type="submit" id="checkBtn">öffnen</button>
</div>
</div>
</div>
</form>
</div>
</nav>
</div>
<div class="container">
<div class="card-deck" style="margin-bottom: 25px;">
<div class="card shadow-lg">
<div class="card-header text-dark bg-dark">
<h3 class="text-truncate text-light">Stromkonto</h3>
</div>
<div class="card-body">
<div id="reading_card" style="margin-bottom:25px;">
<table class="table">
<tr class="bg-dark text-light">
<th>Soll</th>
<th>Haben</th>
<th>Saldo</th>
</tr>
<tr>
<td id="soll_eur"></td>
<td id="haben_eur"></td>
<td id="balance_eur"></td>
</tr>
</table>
Erzeugung aus eigenen Anlagen: <span id="p_2_8_0">0</span> kWh.
</div>
<h4>Letzte Buchungen</h4>
<div id="tx_card" data-max="10">
</div>
</div>
<div class="card-footer text-center">
API Endpunkt: <code>https://api.corrently.io/core/stromkonto</code><br/>
</div>
</div>
</div>
<div class="card shadow-lg">
<div class="card-header bg-light">
<h3 class="text-truncate text-dark">Nutzung als Widget</h3>
</div>
<div class="card-body">
<strong>Benötigte Scripte im HEAD</strong>
<pre><code>
<script src="https://elements.corrently.io/assets/js/jquery.min.js"</script>
<script src="https://elements.corrently.io/dist/correntlyElements-min.js"</script>
</code></pre>
<strong>jQuery Erweiterung</strong>
<pre><code>
$(element).correntlySKOBalance([account]);
</code></pre>
<strong>Unterstützte Unterlemente des DOM Objektes</strong>
<ul>
<li><code>soll</code></li>
<li><code>haben</code></li>
<li><code>balance</code></li>
</ul>
</div>
</div>
</div>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="/dist/correntlyElements-min.js"></script>
<script>
/* Funktionaler Code für dieses Beispiel */
$(document).ready( function() {
/* Fallunterscheidung für Eingabefeld Account */
if($.getUrlVar("a") == null) {
$('#reading_card').correntlySKOBalance("0x9d28463d51aC40662865D2462e80825D4DBB41d5"); // Beispielkonto
$('#tx_card').correntlySKOTxs("0x9d28463d51aC40662865D2462e80825D4DBB41d5"); // Beispielkonto
} else {
$('#reading_card').correntlySKOBalance($.getUrlVar("a") ); // Zählerstand für eingegebenes Konto
$('#tx_card').correntlySKOTxs($.getUrlVar("a"));
}
});
</script>
</body>
</html>