]> git.saurik.com Git - cydget.git/blobdiff - Index.html
Checkpoint for Welcome.
[cydget.git] / Index.html
index 33f98a5b593aa3c1d7726d8e1e5137b9829d11f4..575778250ee609628b372359a067d9fbebcb70cd 100644 (file)
     }
 
     #lcd h2 {
-        font-family: "LockClock-Light";
+        font-family: "Helvetica";
         font-size: 17px;
-        left: 2px;
         position: relative;
         text-align: center;
         text-shadow: -0.5px -1px 1px black;
         top: -16px;
     }
 </style></head><body>
-    <div id="lcd">
-        <h1><script type="text/javascript">with (Cycript.all) {
-            var locale = CFLocaleCopyCurrent();
-            var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
-            CFRelease(locale);
-            var format = UIDateFormatStringForFormatType(UINoAMPMTimeFormat);
-            CFDateFormatterSetFormat(formatter, format);
-            var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
-            var string = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
-            CFRelease(formatter);
-            document.write(string);
-            CFRelease(string);
-        }</script></h1>
+    <!-- XXX: extract this out to some kind of nifty Lock Cydget library -->
+    <div id="lcd"><script type="text/javascript">with (Cycript.all) {
+        var locale = CFLocaleCopyCurrent();
+        var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
+        var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
+        CFRelease(locale);
+
+        CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UINoAMPMTimeFormat));
+        var time = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
+        document.write('<h1>' + time + '</h1>');
+        CFRelease(time);
+
+        CFDateFormatterSetFormat(formatter, UIDateFormatStringForFormatType(UIWeekdayNoYearDateFormat));
+        var date = CFDateFormatterCreateStringWithDate(NULL, formatter, now);
+        document.write('<h2>' + date + '</h2>');
+        CFRelease(date);
 
-        <h2>Lock Cydget Example</h2>
-    </div>
+        CFRelease(formatter);
+        CFRelease(now);
+    }</script></div>
 
     <script type="text/javascript" src="Index.js"></script>
 </body></html>