-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·232 lines (219 loc) · 11 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
<!doctype html>
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8">
<meta name="author" content="Sumon Rahman">
<meta name="description" content="">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Title -->
<title>OpenPlantDatabase.io</title>
<!-- Place favicon.ico in the root directory -->
<link rel="apple-touch-icon" href="images/favicon.png">
<link rel="shortcut icon" type="image/ico" href="images/favicon.ico" />
<!-- Plugin-CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/linearicons.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/animate.css">
<!-- Main-Stylesheets -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/responsive.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target=".mainmenu-area">
<!-- Preloader-content -->
<!-- MainMenu-Area -->
<nav class="mainmenu-area" data-spy="affix" data-offset-top="200">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary_menu">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><img src="images/logo-2.png" alt="Logo"></a>
</div>
<div class="collapse navbar-collapse" id="primary_menu">
<ul class="nav navbar-nav mainmenu">
<li class="active"><a href="#home_page">Home</a></li>
<li><a href="#about_page">About</a></li>
<li><a href="#search">Search</a></li>
</ul>
</div>
</div>
</nav>
<!-- MainMenu-Area-End -->
<!-- Home-Area -->
<header class="home-area overlay" id="home_page">
<div class="container">
<div class="row">
<div class="col-xs-12 hidden-sm col-md-5">
<figure class="mobile-image wow fadeInUp" data-wow-delay="0.2s">
<img class="mySlides w3-animate-fading" src="images/plantsensorexample1.jpg" style="width:600px">
<img class="mySlides w3-animate-fading" src="images/plantsensorexample2.jpg" style="width:600px">
<img class="mySlides w3-animate-fading" src="images/plantsensorexample3.jpg" style="width:600px">
</figure>
</div>
<div class="col-xs-12 col-md-7">
<div class="space-20 hidden-xs"></div>
<h1 class="wow fadeInUp" data-wow-delay="0.4s">Open Plant Database</h1>
<div class="space-20"></div>
<div class="desc wow fadeInUp" data-wow-delay="0.6s">
<p>Stop searching for a source where you can find information about your plants. We tell what the best way is for taken care of your plants. You can also use our database for in your home automation software like Home-Assistant.</p>
</div>
</div>
</div>
</div>
</header>
<!-- Home-Area-End -->
<!-- About-Area -->
<section class="section-padding" id="about_page">
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-10 col-md-offset-1">
<div class="page-title text-center">
<img src="images/logo-1.png" alt="Our Logo">
<div class="space-20"></div>
<h5 class="title">About Open Plant Database</h5>
<div class="space-30"></div>
<h3 class="green-color">An "opensource" database with all the plant information that can be used for IOT.</h3>
<div class="space-20"></div>
<p>Inspired by the Xiaomi / Huahuacaocao Flower Care™ Smart Monitor, we think that they have made the right steps with IOT so that everybody can easy take care for their plants and trees. But the information should not be static but dynamic based on findings of the community. We want that everybody can use the latest information for their own perpose.</p>
</div>
</div>
</div>
</div>
</section>
<!-- About-Area-End -->
<!-- Search-Area -->
<section class="testimonial-area" id="search">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2">
<div class="page-title text-center">
<h5 class="title">Search the plant database</h5>
</div>
<div class="subscribe-form text-center">
<h3 class="green-color">Plant name:</h3>
<div class="space-20"></div>
<form id="mc-form">
<input type="plant name" class="control" id="txt-search" placeholder="Type your search character"> <label class="mt10" for="mc-email"></label>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="filter-records"></div>
</div>
</div>
</div>
</section>
<!-- Search-Area-End -->
<!-- Footer-Area -->
<footer class="footer-area" id="contact_page">
<!-- Footer-Bootom -->
<div class="footer-bottom">
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-5">
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
<span>Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved | Hosted by <a href="https://github.com/rolfberkenbosch/openplantdatabase.io">Github Pages</a>, template by <a href="https://colorlib.com" target="_blank">Colorlib</a></span>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
<div class="space-30 hidden visible-xs"></div>
</div>
</div>
</div>
</div>
<!-- Footer-Bootom-End -->
</footer>
<!-- Footer-Area-End -->
<!--Vendor-JS-->
<script src="js/vendor/jquery-1.12.4.min.js"></script>
<script src="js/vendor/jquery-ui.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<!--Plugin-JS-->
<script src="js/owl.carousel.min.js"></script>
<script src="js/contact-form.js"></script>
<script src="js/ajaxchimp.js"></script>
<script src="js/scrollUp.min.js"></script>
<script src="js/magnific-popup.min.js"></script>
<script src="js/wow.min.js"></script>
<!--Main-active-JS-->
<script src="js/main.js"></script>
<script type="text/javascript">
$(document).ready(function(){
function loadJSON(callback) {
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', 'http://www.openplantdatabase.io/file.json', true); // Replace 'my_data' with the path to your file
xobj.onreadystatechange = function () {
if (xobj.readyState == 4 && xobj.status == "200") {
// Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode
callback(xobj.responseText);
}
};
xobj.send(null);
}
loadJSON(function(response) {
// Parse JSON string into object
var data = JSON.parse(response);
$('#txt-search').keyup(function(){
var searchField = $(this).val();
if(searchField === '') {
$('#filter-records').html('');
return;
}
var regex = new RegExp(searchField, "i");
var output = '<div class="row">';
var count = 1;
$.each(data, function(key, val){
if ((val.pid.search(regex) != -1) || (val.display_pid.search(regex) != -1)) {
output += ' <div class="team-box">';
output += ' <div class="team-image">';
output += ' <img src="images/plants/'+val.display_pid.toLowerCase()+'.jpg" alt="'+ val.display_pid +'">';
output += ' </div>';
output += ' <h4>' + val.display_pid + '</h4>';
output += ' <h6 class="position">PlantID: ' + val.pid + '</h6>';
output += ' <h6 class="position">Origin: ' + val.origin + '</h6>';
output += ' <h6 class="position">Category: ' + val.category + '</h6>';
output += ' <p>Blooming: ' + val.blooming + '<br>Color: ' + val.color + '<br>Size: ' + val.size + '<br>Soil: ' + val.soil + '<br>Sunlight: ' + val.sunlight + '<br>Watering: ' + val.watering + '<br>Fertilization: ' + val.fertilization + '<br>Pruning: ' + val.pruning + '</p>';
output += ' </div>';
count++;
}
});
output += '</div>';
$('#filter-records').html(output);
});
});
});
</script>
<script>
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 9000);
}
</script>
</body>
</html>