-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (87 loc) · 3.08 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Weather Application</title>
<link rel="stylesheet" href="style.css" />
<script src="https://unpkg.com/arweave/bundles/web.bundle.js"></script>
<script src="https://unpkg.com/arweave/bundles/web.bundle.min.js"></script>
</head>
<body>
<div class="container">
<header class="header">
<div class="search">
<input type="text" placeholder="Enter City Name" id="search-txt" /><a id="search-btn" href="#"><i class="fas fa-search"></i
></a>
</div>
</header>
<main id="main">
<div class="city-icon">
<div class="city-icon-holder">
<div id="city-name"></div>
<img src="" alt="" id="icon" />
</div>
</div>
<div class="temperature">
<div id="temp"></div>
</div>
<div class="humidity">
<div id="humidity-div"></div>
</div>
</main>
<div id="buttons">
<button id="login" class=button type="button">Login !</button>
<button id="save" type="button" >Save to Blockchain !</button>
</div>
<!-- The Modal -->
<div id="Login" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<p id ="dropzone">Drop Keyfile to Login..</p>
<div class="file-input">
<input type="file" id="file" onchange="login(this.files)">
</div>
</div>
</div>
<script>
// Get the modal
var modal = document.getElementById("Login");
// Get the button that opens the modal
var btn = document.getElementById("login");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</div>
<script src="https://use.fontawesome.com/releases/v5.0.13/js/all.js "></script>
<script src="index.js"></script>
<script src="login.js"></script>
<script src="save.js"></script>
<script>
var wallet = {};
//var address = {};
var arweave = Arweave.init({
host: 'arweave.net',
port: 443,
protocol: 'https',
timeout: 20000,
logging: false,
});
arweave.network.getInfo().then(console.log);
</script>
</body>
</html>t