-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
175 lines (174 loc) · 6.84 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
<!doctype html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>jQuery Mobile Example App</title>
<style type="text/css" media="screen">@import "css/jquery.mobile-1.0a2.css";</style>
<style type="text/css" media="screen">@import "css/style.css";</style>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://platform.twitter.com/anywhere.js?id=qkoZFCYqt5KiFcgBeV8hKQ&v=1" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script src="js/jquery.mobile-1.0a2.js" type="application/x-javascript" charset="utf-8"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5739517-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script>
var monthes = ['января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря'];
var shuffle = function(o){ //v1.0
for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
$(function(){
$('#twitter_page').live('pageshow',function(event, ui){
twttr.anywhere(function(T) {
$.mobile.pageLoading();
var j=0;
T.User.find('andrebrov').timeline().first(20).each(function(status) {
$('div#twi_list').append('<p>' + status.user.name + ': ' + status.text + '</p>');
j++;
if (j==1){
$.mobile.pageLoading(true);
}
});
});
});
$('#map_page').live('pageshow',function(event, ui){
navigator.geolocation.getCurrentPosition(function(location) {
var point = new google.maps.LatLng(location.coords.latitude, location.coords.longitude);
var myOptions = {
zoom: 13,
center: point,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
var marker = new google.maps.Marker({position: point,map: map});
google.maps.event.addListener(marker, 'click', function() {
alert("Current coodinates are: latitude "+location.coords.latitude+", longitude "+location.coords.longitude);
});
});
});
$("#search").keyup(function(){
var res = shuffle(monthes);
var list='';
$.each(res, function(index, value) {
list+='<li role="option" tabindex="0" data-theme="a" class="ui-btn ui-li ui-btn-up-a"><div class="ui-btn-inner"><div class="ui-btn-text">'+value+'</div><span class="ui-icon ui-icon-arrow-r"></span></div></li>';
});
$("#searchresult").html(list);
});
});
</script>
</head>
<body>
<div data-role="page" id="main_page" data-theme="b">
<div data-role="header" >
<h1>Home page</h1>
<a href="#settings" data-icon="gear" class="ui-btn-right">Options</a>
</div>
<div data-role="content" >
<ul data-role="listview" data-inset="true" data-theme="a">
<li><a href="#twitter_page">Twitter example</a></li>
<li><a href="#map_page">Map example</a></li>
<li><a href="#search">Search example</a></li>
<li><a href="#about">About</a></li>
</ul>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
<div data-role="page" id="twitter_page" data-theme="b">
<div data-role="header" >
<h1>Simple twitter example</h1>
</div>
<div data-role="content" >
<div id="twi_list"></div>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
<div data-role="page" id="map_page" data-theme="b">
<div data-role="header" >
<h1>Map example</h1>
</div>
<div data-role="content" >
<div id="map_canvas"></div>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
<div data-role="page" id="about" data-theme="c">
<div data-role="header" >
<h1>About me</h1>
</div>
<div data-role="content" >
<h1>Rebrov Andrey</h1>
<div>Hi, my name is Rebrov Andrey. My contacts are below.</div>
<ul data-role="listview" data-inset="true" data-theme="c" role="listbox">
<li data-role="list-divider" role="heading" tabindex="0" class="ui-li ui-li-divider ui-bar-b ui-corner-top"></li>
<li><a href="mailto:[email protected]" class="ui-link-inherit">EMail me</a></li>
<li><a href="tel:+79178170781" class="ui-link-inherit">Call me</a></li>
<li data-role="list-divider" role="heading" tabindex="1" class="ui-li ui-li-divider ui-bar-b ui-corner-bottom"></li>
</ul>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
<div data-role="page" id="settings" data-theme="b">
<div data-role="header" >
<h1>Settings</h1>
</div>
<div data-role="content" >
<div data-role="fieldcontain">
<label for="name">My name:</label>
<input type="text" name="name" id="name" value="" />
<label for="textarea">About myself:</label>
<textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
<label for="slider">Value this site:</label>
<input type="range" name="slider" id="slider" value="0" min="-50" max="50" />
<p/>
<label for="slider2">Value this site:</label>
<select name="slider2" id="slider2" data-role="slider">
<option value="off">Like</option>
<option value="on">Dislike</option>
</select>
<p/>
<label for="select-choice-1" class="select">Select your current mood:</label>
<select name="select-choice-1" id="select-choice-1">
<option value="standard">Tired</option>
<option value="standard">Happy</option>
<option value="standard">Sick</option>
<option value="standard">Sunny</option>
</select>
</div>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
<div data-role="page" id="search" data-theme="b">
<div data-role="header" >
<h1>Search</h1>
</div>
<div data-role="content" >
<label for="search">Search</label>
<input type="search" name="password" id="search" value="" />
<ul data-role="listview" data-inset="true" id="searchresult">
</ul>
</div>
<div data-role="footer">
Developed by Rebrov Andrey, Samara 2010
</div>
</div>
</body>
</html>