-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
392 lines (355 loc) · 14.4 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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<!DOCTYPE html>
<html lang="en">
<head>
<!-- basic -->
<script defer src="csv.js"></script>
<script defer src="searchTable.js"></script>
<script defer src="addData.js">
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- mobile metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<!-- site metas -->
<title>Open31</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<!-- bootstrap css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<!-- style css -->
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- Responsive-->
<link rel="stylesheet" href="css/responsive.css">
<!-- fevicon -->
<!-- <link rel="icon" href="images/fevicon.png" type="image/gif" /> -->
<!-- Scrollbar Custom CSS -->
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.min.css">
<!-- Tweaks for older IEs-->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<!-- owl stylesheets -->
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<style>
/* CSS code for styling the table */
#csvTable {
border-collapse: collapse;
width: 100%;
font-family: Arial, sans-serif;
}
#csvTable td,
#csvTable th {
border: 1px solid #ddd;
padding: 8px;
}
#csvTable tr:nth-child(even) {
background-color: #f2f2f2;
}
#csvTable tr:hover {
background-color: #ddd;
}
#csvTable th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
/* CSS code for the add row form */
#addRowForm {
display: flex;
flex-wrap: wrap;
}
#addRowForm label {
display: inline-block;
width: 100%;
margin-bottom: 5px;
}
#addRowForm input[type="text"] {
padding: 8px;
border-radius: 4px;
border: 1px solid #ccc;
box-sizing: border-box;
margin-bottom: 10px;
width: 100%;
}
#addRowForm input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
margin-right: 10px;
}
#addRowForm input[type="submit"]:hover {
background-color: #45a049;
}
#addRowForm input[type="reset"] {
background-color: #f44336;
color: white;
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
}
input[type=text]:focus input[type=description]:focus,
input[type=number]:focus {
border: 2px solid #4CAF50;
}
#addRowForm input[type="reset"]:hover {
background-color: #da190b;
}
</style>
<script defer src="csv.js">
</script>
<script defer src="searchTable.js"></script>
======= >>>>>>> d07fdee79b10ab637f088d9fc697fcaa5dd4f6aa
</head>
<body>
<!--header section start -->
<div class="header_section">
<div class="container-fluid">
<div class="main">
<div class="logo">
<a href="index.html"><img src="images/logo.png"></a>
</div>
<div class="menu_text">
<ul>
<div class="togle_">
<div class="menu_main">
<ul>
<li>
<a href="#"></a>
</li>
<li><a href="#"><i class="fa fa-search" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
<div id="myNav" class="overlay">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<div class="overlay-content">
<a href="index.html">home</a>
<a href="#search">search data</a>
<a href="#add">add data</a>
<!-- <a href="doctors.html">remove</a> -->
<!-- <a href="news.html">News</a> -->
</div>
</div>
<span class="navbar-toggler-icon"></span>
<span onclick="openNav()"><img src="images/toogle-icon.png" class="toggle_menu"></span>
<span onclick="openNav()"><img src="images/toogle-icon1.png" class="toggle_menu_1"></span>
</ul>
</div>
</div>
</div>
<!-- banner section start -->
<div class="banner_section layout_padding">
<div class="container">
<div id="my_slider" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row">
<div class="col-md-6">
<div class="container">
<h1 class="banner_taital">Search the Open31</h1>
<p style="background-color: #f2f2f2" class="banner_text">
This website lets you access data to the ESG ratings by industry of every city in Europe. Contribute to the open source database wiki repository.
</p>
<div class="more_bt"><a href="#search">Surf now</a></div>
</div>
</div>
<div class="col-md-6">
<!-- <div class="banner_img"><img src="images/banner-img.png"></div> -->
</div>
</div>
</div>
</div>
<!-- <a class="carousel-control-prev" href="#my_slider" role="button" data-slide="prev"> -->
<!-- <i class="fa fa-angle-left"></i> -->
<!-- </a> -->
<!-- <a class="carousel-control-next" href="#my_slider" role="button" data-slide="next"> -->
<!-- <i class="fa fa-angle-right"></i> -->
<!-- </a> -->
</div>
</div>
</div>
<!-- banner section end -->
</div>
<!-- header section end -->
<!-- protect section start -->
<div class="protect_section layout_padding" id="search">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1 class="protect_taital">Dataset Viewer</h1>
<p class="protect_text">Search for anything you like...</p>
<input type="text" id="searchInput" placeholder="Search...">
</div>
</div>
<div class="protect_section_2 layout_padding">
<div class="row">
<table id="csvTable">
</table>
<!-- Commented this code so that we can have the searhc and data in one section -->
<!-- <div class="col-md-6"> -->
<!-- </div> -->
<!-- <div class="col-md-6"> -->
<!-- <div class="image_2"><img src="images/img-2.png"></div> -->
<!-- </div> -->
</div>
</div>
</div>
</div>
<!-- protect section end -->
<hr>
<!-- about section start -->
<div class="about_section layout_padding" id="add">
<div class="container">
<div class="row">
<h1 class="about_taital">
Add Data Point
<p>Contribute with your data...</p>
</span>
</h1>
<!-- <div class="col-md-5"> -->
<!-- <div class="about_img"><img src="images/img-1.png"></div> -->
<!-- </div> -->
<div class="customform">
<label for="title">title:</label>
<input type="text" id="title" name="title" required>
<label for="url">url:</label>
<input type="text" id="url" name="url" required>
<label for="description">description:</label>
<input type="text" id="description" name="description" required>
<button type="button" onclick="addRow()">Add Data Point</button>
</div>
<!-- <div class="read_bt"><a href="#">Read More</a></div> -->
</div>
</div>
</div>
<!-- about section end -->
<!-- doctor section start deleted-->
<!-- doctor section end -->
<!-- news section start deleted-->
<!-- news section end -->
<!-- update section start deleted-->
<!-- update section end -->
<!-- footer section start -->
<div class="footer_section layout_padding">
<div class="container">
<div class="footer_section_2">
<div class="row">
<div class="col-md-6">
</div>
</div>
</div>
</div>
</div>
<!-- footer section end -->
<!-- copyright section start -->
<div class="copyright_section">
<div class="container">
<div class="row">
<div class="col-sm-12">
<p class="copyright_text">Creative Commons 2023. <a href="https://html.design"> An OpenWiki website</a></p>
</div>
</div>
</div>
</div>
<!-- copyright section end -->
<!-- Javascript files-->
<script src="js/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery-3.0.0.min.js"></script>
<script src="js/plugin.js"></script>
<!-- sidebar -->
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/custom.js"></script>
<!-- javascript -->
<script src="js/owl.carousel.js"></script>
<script src="https:cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script>
<!-- Our code here -->
<script>
function addDataPoint() {
var titleInput = document.getElementById("title");
var urlInput = document.getElementById("url");
var descriptionInput = document.getElementById("description");
// Get the table and insert a new row
var table = document.getElementById("dataTable");
var row = table.insertRow(-1);
// Insert the new row with data from the input fields
var id = table.rows.length - 1;
var idCell = row.insertCell(0);
var titleCell = row.insertCell(1);
var urlCell = row.insertCell(2);
var descriptionCell = row.insertCell(3);
idCell.innerHTML = id;
titleCell.innerHTML = titleInput.value;
urlCell.innerHTML = urlInput.value;
descriptionCell.innerHTML = descriptionInput.value;
// Clear the input fields
titleInput.value = "";
urlInput.value = "";
descriptionInput.value = "";
}
// Get the input field
var input = document.getElementById("searchInput");
// Add event listener for input
input.addEventListener("input", function() {
searchTable();
});
function searchTable() {
// Declare variables
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("searchInput");
filter = input.value.toUpperCase();
table = document.getElementById("dataTable");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those that don't match the search query
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
<script>
$(document).ready(function() {
$(".fancybox").fancybox({
openEffect: "none",
closeEffect: "none"
});
$(".zoom").hover(function() {
$(this).addClass('transition');
}, function() {
$(this).removeClass('transition');
});
});
</script>
<script>
function openNav() {
document.getElementById("myNav").style.width = "100%";
}
function closeNav() {
document.getElementById("myNav").style.width = "0%";
}
</script>
</body>
</html>