Replace that with this:
Code:am_pm = 'PM'; if(hr<12){ am_pm='AM'; if(hr<10){hr='0'+hr;} }
That should pad it to become 01:45 AM.
Hmm... The new caching script is a tad slow sometimes. Around 2-3 seconds to fully load the screen.
Here's the trade off:
No cache
- speedy script load
- requires connection to work
- fetches weather every time (uses more networking vs processing) and uses more data if u care about that. Each fetch is 6.9KB.
Cache
- works even no internet (just needed to be connected once to create cache)
- has to run on a database (uses more processing vs networking)
- slower script than no cache (because it has to cross check update time in database for fetch time)
- less data use. pings to check online status for about 0.83KB each time.
So the trade off is... speed vs utility and network efficiency. xD So far, this is the only method I'm aware of that can retain data without any special plugins or something like Cydget.
Here's what I've been using to test it. It's working, just wasn't sure the speed trade off was worth it. Maybe it can use some more optimizing...
EDIT: Hmm... I guess I'm feeling a magnified lag. When I develop this I keep locking and unlocking over and over to test... Now that I'm not working on it and just using it normally, it seems to work really well.
img1: screenshot right when it fetches new weather data -- gives estimate next update time.
img2: screenshot after unlock and relock before update time, so it uses cache since it's not update time yet.
img3: I had turned off all internet connection, and it was trying to update, but no internet... so it uses cache.
How do you modify the html file to show a TWO DIGIT calendar day? Example is today: Sept 1 and I want it to show '01' not '1'.
I think this one is amazing, truely unique!!
You should slap a name on her and submit it to cydia!!
haha thanks man!
If you want I can send it to you..just shoot me your email.
or Ill post it up in a bit.
haha thanks man!
If you want I can send it to you..just shoot me your email.
or Ill post it up in a bit.
I would also like to know how to change this..This lock screen went from really cool..to really akward when it hit 1 digit..it just unbalanced now.
Still working on this trying to get everything right.
Quick question...
I have the theme from the very first post (date/times, etc on bottom half of screen) and I too would like to have the date have a 0 in front if it is a single digit day too...I looked through the html file and can't figure out how to add this.
Can someone help me? I really like the look but it does look weird with the gap there (as others have pointed out)...
HeLLaxGoOd said:How do you modify the html file to show a TWO DIGIT calendar day? Example is today: Sept 1 and I want it to show '01' not '1'.
I would also like to know how to change this..This lock screen went from really cool..to really akward when it hit 1 digit..it just unbalanced now.
Still working on this trying to get everything right.
![]()
Wirelessly posted (iPhone 4 (32GB, JB): Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7)
I don't know if it was an intentional mistake (trying to sound cool) or not, but "Wensday" is not a word.![]()
I want your babies.
![]()
How do you modify the html file to show a TWO DIGIT calendar day? Example is today: Sept 1 and I want it to show '01' not '1'.
Find and add the following line in shown in red
body {
font-family:"Helvetica Neue";
background-color: #000000;
margin: 0;
padding: 265px 0 0 0;
height: 480px;
width: 320px;
background-image: url(Private/Background.png);
background-size: 61%;
Before:
var picture='';
myday=new Date();
myday=myday.getDate();
picture="<span style='font-family: Helvetica Neue; font-size: 88pt; color: #FFFFFF;'>"+myday+"</span>"
document.write(picture);
After:
myday=new Date();
myday=myday.getDate();
document.write((myday<10) ? '0'+myday+'' : myday+'');
also changed the font size to 110 or whatever size you prefer, you can also change the color since default is red.
FYI I am using the original file from the first page.
My 3GS..
![]()
Sooo ready for hawaii!
I see you are still using my old theme. I suggest you try my new theme. Your CSS file should be able to port right over!
As the new theme is entirely different than what this thread originates as, so I made a new thread here:
https://forums.macrumors.com/threads/1006066/
Just added the SlantedLockscreen to my Kryptonite theme....
![]()
I wonder if there is a way to change the color of the fonts? With this wallpaper the town "Oak Park" and current weather condition, "Cloudy" surrounding the temp "81F" are almost invisible...