-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatser.html
70 lines (57 loc) · 1.84 KB
/
platser.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
<html>
<head>
<title>Anders Väder - Sök plats</title>
<meta charset=UTF-8>
<meta name=viewport content="width=device-width">
<link rel=icon href=images/favicon.png>
<link rel='stylesheet' href='https://cdn.rawgit.com/LeaVerou/awesomplete/gh-pages/awesomplete.css' />
<style>
body {
background: #F3F3F3;
}
div.aboutDiv {
font-size: small;
}
.recent-searches {
margin-top: 10px;
line-height: 1.5;
}
.recent-search-item {
cursor: pointer;
color: blue;
text-decoration: underline;
display: block;
}
.recent-search-item:hover {
text-decoration: none;
}
</style>
</head>
<body>
<section id="plats-search">
<h2>Välj/Sök plats</h2>
<label class=""><input name="lod" id="locinput" type="text" autofocus></label>
</section>
<div class="recent-searches" id="recent-searches"></div>
<div>
<br>
</div>
<div class="aboutDiv" id="aboutDiv">
Platser hämtas från SMHI via SMHI Open Data API
</div>
<script src="https://cdn.rawgit.com/LeaVerou/awesomplete/gh-pages/awesomplete.js" crossorigin=""></script>
<script src="common.js" charset="UTF-8"></script>
<script src="platser.js" charset="UTF-8"></script>
<script>
// Automatic display soft keyboard on ios
//document.body.ontouchend = function() { document.querySelector"#plats-search input").focus(); };
window.onload = function () {
var input = document.querySelector("#plats-search input").focus();
displayRecentSearches();
}
document.body.ontouchend = function () {
document.querySelector("#plats-search input").focus();
};
</script>
</body>
</html>