Theme Building Help

Discussion in 'Jailbreaks and iOS Hacks' started by heisenberg123, Nov 22, 2010.

  1. heisenberg123 macrumors 603

    heisenberg123

    Joined:
    Oct 31, 2010
    Location:
    Hamilton, Ontario
    #1
    Looking to make my own lockscreen theme that has a wallpaper that changes every so often, say every 20 mins.


    i cant find a tutorial on this anywhere
     
  2. lucifiel macrumors 6502a

    lucifiel

    Joined:
    Nov 7, 2009
    Location:
    In your basement
    #2
    Learn HTML and Javascript and CSS.

    That;s how you make those lockscreens.
     
  3. bytethese macrumors 68030

    bytethese

    Joined:
    Jun 20, 2007
    Location:
    Cranford, NJ
    #3
  4. dgstan macrumors 6502a

    Joined:
    Jun 29, 2010
    #4
    Here's the code I wrote that does it. I was trying to have the background mimic the time of day.

    Code:
    <!-- change background script-->
    <script language="JavaScript">
    
    
    day=new Date(); //..get the date
    x=day.getHours(); //..get the hour
    
    
    if(x>=0 && x<6) {
    document.write('<style type="text/css">body{background: white url(Wall/night.jpg); color: black}</style>');
    } else
    
    if(x>=6 && x<8) {
    document.write('<style type="text/css">body{background: white url(Wall/sunrise.jpg); color: black}</style>');
    } else
    
    if(x>=8 && x<11) {
    document.write('<style type="text/css">body{background: white url(Wall/morning.jpg); color: black}</style>');
    } else
    
    if(x>=11 && x<14) {
    document.write('<style type="text/css">body{background: white url(Wall/day.jpg); color: black}</style>');
    } else
    
    if(x>=14 && x<17) {
    document.write('<style type="text/css">body{background: white url(Wall/afternoon.jpg); color: black}</style>');
    } else
    
    if(x>=17 && x<19) {
    document.write('<style type="text/css">body{background: white url(Wall/sunset.jpg); color: black}</style>');
    } else
    
    if(x>=19 && x<20) {
    document.write('<style type="text/css">body{background: white url(Wall/evening.jpg); color: black}</style>');
    } else
    
    if (x>=20 && x<24) {
    document.write('<style type="text/css">body{background: white url(Wall/night.jpg); color: black}</style>');
    }
    </script>
    
    
     
  5. heisenberg123 thread starter macrumors 603

    heisenberg123

    Joined:
    Oct 31, 2010
    Location:
    Hamilton, Ontario
    #5
  6. heisenberg123 thread starter macrumors 603

    heisenberg123

    Joined:
    Oct 31, 2010
    Location:
    Hamilton, Ontario
    #6
    thanks for sharing your code, java script gives me nightmares lol
     

Share This Page