possible new style to be in development...
Posted: Mon Mar 07, 2011 8:30 pm
been wanting to make a style that can change colours with the users time of day. this would consist of 2 or more stylesheets. and since i simplified the stylesheet that i'm using in my new styles, i think i can pull this off now. only thing i'm waiting for now is for someone to go over a piece of javascript to see if it will do the job or not. if you know js and would like to have a look and let me know if it will work or not, here it is
Code: Select all
just so everyone knows, it will not be something that i'm going to be doing right now as i have to move and get a few other things sorted before i can start on it. only thing i do know right now is that it will be based off of my Midnightspace style for the first run and then the Concept style for the second. and also, in the future, i could even produce stylesheets of different colours for members to download so they could mix and match their own colours sets
<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time<10)
{
document.write("<link href="{T_THEME_PATH}/morning.css" rel="stylesheet" type="text/css" media="screen, projection" />");
}
else if (time>10 && time<16)
{
document.write("<link href="{T_THEME_PATH}/day.css" rel="stylesheet" type="text/css" media="screen, projection" />");
}
else
{
document.write("<link href="{T_THEME_PATH}/evening.css" rel="stylesheet" type="text/css" media="screen, projection" />");
}
</script>