Notifications
Clear all

Same skin; different CSS file?

8 Posts
4 Users
0 Reactions
1,321 Views
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

Say:

Skin 1 = light on dark
Skin 2 = dark on light

Skin 2 is, basically, skin 1 BUT with a different CSS file.

How do I do this without having to duplicate and sync the template files all the time?


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 06/02/2010 8:12 pm
(@tammy)
Posts: 2577
Member Moderator
 

Make them one skin and use javascript to switch the CSS file.


 
Posted : 06/02/2010 8:55 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Perhaps this would be a good use for that Javascript in the corrections letter that didn't end up getting used?


 
Posted : 06/02/2010 9:02 pm
(@tammy)
Posts: 2577
Member Moderator
 

Huh?


 
Posted : 06/02/2010 9:05 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Oh, sorry. That was meant for Elle. It's related to a project we're working on together. I should have just emailed her instead. : )


 
Posted : 06/02/2010 9:08 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

I implemented this method: http://www.alistapart.com/articles/alternate/

... and it all works. πŸ™‚ I had to add a title to the <link> in the header.php though so it wouldn't constantly override.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 06/02/2010 9:10 pm
 kali
(@kali)
Posts: 307
Reputable Member
 

Darn it, stop thinking of all the good ideas first.

I took a brief look at the ALA implementation. Does this mean that it would be possible to load the basic stylesheet and then have the user pick the actual skin style? A large portion of our skins are the same except for banner/color and this would save a heck of a lot of room in our skin list (not to mention loading times)


Skins made by Kali are no longer supported!

 
Posted : 07/02/2010 4:01 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

kali, yes! Pretty much. It won't show as a separate skin but we have it... in action here: http://dramione.org -- that skin is Clean but if you scroll ALLLL the way down you'll see an option to "Change style:"

However, we did run into some problems using the JavaScript in ALA. It worked but some of us kept getting style flickering. One of the pro bits about keeping it altogether is that some of the more savvy could change styles by view->style though (e.g. in FF).

I'm using a PHP method now: http://www.alistapart.com/articles/phpswitch/ But the code there is WAY outdated (like, it's using globals). If you can wait a  bit, I can paste what I have ATM but right now I have to go tidy up my desks to work; otherwise, it should be relatively easy to implement if you un-global it. :p


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 07/02/2010 4:08 pm
Share: