Support iPad-oriented LCD bars.
[cydget.git] / Welcome.html
1 <html><head>
2 <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
3 <style>
4 * {
5 border: 0;
6 -moz-border-radius: 0;
7 -webkit-border-radius: 0;
8 box-sizing: border-box;
9 -moz-box-sizing: border-box;
10 -ms-box-sizing: border-box;
11 -webkit-box-sizing: border-box;
12 /*font-family: inherit;*/
13 font-size: 100%;
14 font-style: inherit;
15 font-weight: inherit;
16 margin: 0;
17 outline: 0;
18 padding: 0;
19 text-decoration: none;
20 vertical-align: baseline;
21 }
22
23 * {
24 -webkit-touch-callout: none;
25 -webkit-text-size-adjust: none;
26 -webkit-user-select: none;
27 }
28
29 body {
30 color: white;
31 }
32
33 #lcd {
34 background: url(cydget://_UIImageWithName/UILCDBackground.png);
35 height: 96px;
36 width: 100%;
37 }
38
39 #lcd h1 {
40 font-family: "LockClock-Light";
41 padding: 0px 0px 0px 1px;
42 position: relative;
43 text-align: center;
44 text-shadow: -0.5px -1px 1px black;
45 }
46
47 #lcd h2 {
48 font-family: "Helvetica";
49 position: relative;
50 text-align: center;
51 text-shadow: -0.5px -1px 1px black;
52 }
53
54 @media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
55 #lcd h1 {
56 font-size: 65px;
57 top: -6px;
58 }
59
60 #lcd h2 {
61 font-size: 17px;
62 top: -16px;
63 }
64 }
65
66 @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
67 #lcd h1 {
68 font-size: 69px;
69 top: -8px;
70 }
71
72 #lcd h2 {
73 font-size: 16px;
74 top: -18px;
75 }
76 }
77
78 @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
79 #lcd {
80 height: 107px;
81 }
82
83 #lcd h1 {
84 font-size: 69px;
85 top: -1px;
86 }
87
88 #lcd h2 {
89 font-size: 16px;
90 top: -8px;
91 }
92 }
93
94 #content {
95 font-family: "Helvetica";
96 }
97
98 #content h3 {
99 font-size: 20px;
100 text-align: center;
101 margin-bottom: 10px;
102 }
103
104 #content p {
105 font-size: 14px;
106 text-align: justify;
107 margin: 10px 12px;
108 }
109
110 sup {
111 font-size: smaller;
112 position: relative;
113 top: -5px;
114 }
115 </style></head><body>
116 <div id="lcd">
117 <script type="text/javascript">
118 document.write('<h1 id="time">');
119
120 var time;
121 if (typeof Cycript != 'undefined')
122 time = '&nbsp;';
123 else {
124 var now = new Date();
125 var minutes = String(now.getMinutes());
126 if (minutes.length == 1)
127 minutes = '0' + minutes
128 time = now.getHours() + ':' + minutes;
129 }
130
131 document.write(time);
132 document.write('</h1>');
133 </script>
134
135 <h2>Welcome to Cydget!</h2>
136 </div>
137
138 <div id="content">
139 <p>Cydget<sup>tm</sup> is a very simple SBAwayViewPlugin multiplexer, allowing both developers and web designers to extend the capabilities of the lock screen by tapping into the existing mechanism Apple had designed for VoiceRecorder and Nike+. The WebCycript Cydget framework is designed to be a powerful replacement for the Lock Widget feature from WinterBoard, which it hereby supersedes.</p>
140 <p>You can switch between Cydgets (your original SpringBoard away view is next in the rotation) using the Home/Menu button, and you can re-order them using Settings under "Cydget".</p>
141 </div>
142
143 <!-- XXX: extract this out to some kind of nifty Lock Cydget library -->
144 <script type="text/cycript">
145 var locale = CFLocaleCopyCurrent();
146 var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
147 var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
148 CFRelease(locale);
149
150 CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UINoAMPMTimeFormat));
151 var time = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
152 document.getElementById("time").innerHTML = time;
153 CFRelease(time);
154
155 CFRelease(formatter);
156 CFRelease(now);
157 </script>
158 </body></html>