forked from Temavrix/NexaView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettings.html
More file actions
241 lines (229 loc) · 9.52 KB
/
Settings.html
File metadata and controls
241 lines (229 loc) · 9.52 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="./scripts/icon/ComDash.png">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css">
<title>Settings</title>
<style>
body {
background-image: url('https://images.unsplash.com/photo-1614597396930-cd6760b99f7c?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=900&ixid=MnwxfDB8MXxyYW5kb218MHx8bGFuZHNjYXBlfHx8fHx8MTY4ODE5MzY3Mw&ixlib=rb-4.0.3&q=80&utm_campaign=api-credit&utm_medium=referral&utm_source=unsplash_source&w=1600');
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow-y: hidden;
margin: 0px;
}
button {
margin: 0.5em;
border-radius: 50%;
border: none;
height: 35px;
width: 43px;
background: #7c7c7c2b;
color: white;
cursor: pointer;
transition: all 0.2s ease-in-out 0s;
}
button:hover {
background: rgba(255, 255, 255, 0.749);
}
.Settings {
background: rgba(0, 0, 0, 0.30);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
backdrop-filter: blur(11.5px);
border: 1px solid rgba(255, 255, 255, 0.18);
padding: 2em;
border-radius: 50px;
max-width: 420px;
width: 100%;
max-height: 430px;
}
input {
border: none;
outline: none;
padding: 0.5em;
width: 276px;
border-radius: 18px;
background: #7c7c7c2b;
color: white;
font-size: 86%;
}
.sidebar {
background: rgba(0, 0, 0, 0.30);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
backdrop-filter: blur(11.5px);
border: 1px solid rgba(255, 255, 255, 0.18);
height: 100%;
width: 65px;
position: absolute;
left: 0;
top: 0;
padding-top: 40px;
}
.sidebar div {
padding: 8px;
font-size: 24px;
display: block;
}
.baricons {
left: 1px;
position: relative;
top: -40px;
}
img#Comicon {
position: relative;
height: 50px;
width: 50px;
left: -2px;
}
div#Dashbutton,
div#Setbutton {
left: -10px;
position: relative;
}
.baraboutus {
bottom: 25px;
position: absolute;
}
</style>
</head>
<body>
<div class="sidebar">
<div class="baricons">
<img src="./scripts/icon/ComDash.png" id="Comicon"/>
<div id="Dashbutton">
<a href="./ComDash.html" title="DashBoard"><img src="./scripts/icon/dashboard.png"/></a>
</div>
<div id="Setbutton">
<a href="./Settings.html" title="Settings"><img src="./scripts/icon/settings.png"/></a>
</div>
</div>
<div class="baraboutus">
<div id="Setbutton">
<a href="https://github.com/Epicalable/ComDash" title="About Us"><img src="./scripts/icon/aboutus.png"/></a>
</div>
</div>
</div>
<div class="Settings">
<label>SETTINGS:-</label>
<br>
<label>Edit your settings below (All info is stored on your local storage)</label>
<div class="weather-inline">
<br>
<label>OpenWeatherApi :</label>
<br>
<input type="text" id="weatherbar"/>
<button type="button" onclick="OpenWeatherHelp()" title="OpenWeatherAPI">
<svg stroke="currentColor" fill="currentColor" stroke-width="0" version="1.2" baseProfile="tiny" viewBox="0 0 24 24"
height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
<path
d="M17 19h-11c-2.206 0-4-1.794-4-4 0-1.861 1.277-3.429 3.001-3.874l-.001-.126c0-3.309 2.691-6 6-6 2.587 0 4.824 1.638 5.65 4.015 2.942-.246 5.35 2.113 5.35 4.985 0 2.757-2.243 5-5 5zm-11.095-6.006c-1.008.006-1.905.903-1.905 2.006s.897 2 2 2h11c1.654 0 3-1.346 3-3s-1.346-3-3-3c-.243 0-.5.041-.81.13l-1.075.307-.186-1.103c-.325-1.932-1.977-3.334-3.929-3.334-2.206 0-4 1.794-4 4 0 .272.027.545.082.811l.244 1.199-1.421-.016z">
</path>
</svg>
</button>
</div>
<br>
<div class="news-inline">
<label>NewsApi :</label>
<br>
<input type="text" id="newsbar"/>
<button type="button" onclick="NewsApiHelp()" title="NewsAPI">
<svg stroke="currentColor" fill="currentColor" stroke-width="0" version="1.1" viewBox="0 0 16 16" height="1em"
width="1em" xmlns="http://www.w3.org/2000/svg">
<path
d="M14 4v-2h-14v11c0 0.552 0.448 1 1 1h13.5c0.828 0 1.5-0.672 1.5-1.5v-8.5h-2zM13 13h-12v-10h12v10zM2 5h10v1h-10zM8 7h4v1h-4zM8 9h4v1h-4zM8 11h3v1h-3zM2 7h5v5h-5z">
</path>
</svg>
</button>
</div>
<br>
<div class="city-inline">
<label>Your City :</label>
<br>
<input type="text" id="citybar"/>
<button type="button" onclick="alert('Enter current city Ex. Singapore, New York, Sydney, Paris')" title="Help">
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em"
xmlns="http://www.w3.org/2000/svg">
<path
d="M12 6C9.831 6 8.066 7.765 8.066 9.934h2C10.066 8.867 10.934 8 12 8s1.934.867 1.934 1.934c0 .598-.481 1.032-1.216 1.626-.255.207-.496.404-.691.599C11.029 13.156 11 14.215 11 14.333V15h2l-.001-.633c.001-.016.033-.386.441-.793.15-.15.339-.3.535-.458.779-.631 1.958-1.584 1.958-3.182C15.934 7.765 14.169 6 12 6zM11 16H13V18H11z">
</path>
<path
d="M12,2C6.486,2,2,6.486,2,12s4.486,10,10,10s10-4.486,10-10S17.514,2,12,2z M12,20c-4.411,0-8-3.589-8-8s3.589-8,8-8 s8,3.589,8,8S16.411,20,12,20z">
</path>
</svg>
</button>
</div>
<br>
<div class="country-inline">
<label>Your Country :</label>
<br>
<input type="text" id="countrybar"/>
<button type="button" onclick="alert('Enter country abbrevation Ex. sg, us, au, fr')" title="Help">
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em"
xmlns="http://www.w3.org/2000/svg">
<path
d="M12 6C9.831 6 8.066 7.765 8.066 9.934h2C10.066 8.867 10.934 8 12 8s1.934.867 1.934 1.934c0 .598-.481 1.032-1.216 1.626-.255.207-.496.404-.691.599C11.029 13.156 11 14.215 11 14.333V15h2l-.001-.633c.001-.016.033-.386.441-.793.15-.15.339-.3.535-.458.779-.631 1.958-1.584 1.958-3.182C15.934 7.765 14.169 6 12 6zM11 16H13V18H11z">
</path>
<path
d="M12,2C6.486,2,2,6.486,2,12s4.486,10,10,10s10-4.486,10-10S17.514,2,12,2z M12,20c-4.411,0-8-3.589-8-8s3.589-8,8-8 s8,3.589,8,8S16.411,20,12,20z">
</path>
</svg>
</button>
</div>
<br>
<button type="button" onclick="Save()">Save</button>
</div>
</body>
<script>
function weatherDB() {
window.localStorage.setItem("OpenWeatherApi", "b190a0605344cc4f3af08d0dd473dd25");
}
function newsDB() {
window.localStorage.setItem("NewsApi", "2c925d05bbe34d23a7fb4f425749d9b9");
}
function cityDB() {
window.localStorage.setItem("City", "Singapore");
}
function countDB() {
window.localStorage.setItem("Country", "SG");
}
var weather = window.localStorage.getItem('OpenWeatherApi');
if (weather == null)
weatherDB()
document.getElementById('weatherbar').value = weather;
var news = window.localStorage.getItem('NewsApi');
if (news == null)
newsDB()
document.getElementById('newsbar').value = news;
var cty = window.localStorage.getItem('City');
if (cty == null)
cityDB()
document.getElementById('citybar').value = cty;
var count = window.localStorage.getItem('Country');
if (count == null)
countDB()
document.getElementById('countrybar').value = count;
function Save() {
weather = document.getElementById('weatherbar').value
window.localStorage.setItem("OpenWeatherApi", weather);
news = document.getElementById('newsbar').value
window.localStorage.setItem("NewsApi", news);
city = document.getElementById('citybar').value
window.localStorage.setItem("City", city);
count = document.getElementById('countrybar').value
window.localStorage.setItem("Country", count);
}
function OpenWeatherHelp() {
var myWindow;
myWindow = window.open("https://openweathermap.org/", "_blank")
}
function NewsApiHelp() {
myWindow = window.open("https://newsapi.org/", "_blank")
}
</script>
</html>