-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (102 loc) · 3.61 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>My Cool Webapp</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script>
var APP_PRODUCTION_TYPE = null;
/*
1 > phone gap in production
2 > HTML5 app in domain name production
3 > Phonegap in development (ripple emulator)
4 > HTML5 dev env
*/
if(location.protocol === "file:"){
APP_PRODUCTION_TYPE = 1;
document.write("<script src='phonegap.js'></script" + ">");
/*
this file should not actually exist in your repo
it is injected when needed by build
*/
}else{
if(location.host !== "localhost:9000"){
APP_PRODUCTION_TYPE = 2;
}else{
if(window.top.ripple){
document.write("<script src='ripple.phonegap.js'></script" + ">");
APP_PRODUCTION_TYPE = 3;
}else{
APP_PRODUCTION_TYPE = 4;
}
}
}
</script>
<link rel="stylesheet" href="styles/reset.css" />
<link rel="stylesheet" href="styles/main.css" />
<script>
if(APP_PRODUCTION_TYPE === 3){
document.write("<link rel='stylesheet' href='styles/ripple.css' /" + ">");
}
</script>
<script src="scripts/jquery-2.0.2.min.js"></script>
<script>
(function(){
var device_str = null;
(function(){
if('Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+' === navigator.userAgent){
device_str = "blackberry_playbook_tablet";
return;
}
if('Mozilla/5.0 (BlackBerry; U; BlackBerry 9350; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/7.0.0.0 Mobile Safari/534.1' === navigator.userAgent){
device_str = "blackberry_curve_generic";
return;
}
})();
if(device_str){
console.info("this device is: " + device_str);
$("html").attr("data-device", device_str);
}else{
console.warn("no idea what this device is, I am going to ping my sever so I can stay up to date");
}
if(device_str && device_str.indexOf("blackberry") !== -1){
document.write("<link rel='stylesheet' href='styles/blackberry.css' /" + ">");
}
})();
</script>
</head>
<body>
<section>
<header>
<h1>My cool app v0.4</h1>
</header>
<section data-page="vibrate">
<h1>Vibrate</h1>
<form>
<input id="vibrate_length_input" type="range" min="1" max="5" value="1" />
<p>This will vibrate for <output for="vibrate_length_input">1 second</output></p>
<input type="submit" value="let's shake" />
</form>
<p>
Your repository has been updated and a build has been queueYour repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
vYour repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
Your repository has been updated and a build has been queuer repository has been updated and a build has been queueYour repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
vYour repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
Your repository has been updated and a build has been queue
</p>
<div id="toggle"></div>
</section>
<footer>
<p>©Ricky 2013</p>
</footer>
</section>
<script src="scripts/main.js"></script>
</body>
</html>