More information on colour schemes for themes
Twiebie |
|
---|---|
Themes can have different colour schemes, but how exactly does this work? I did a search on the website here but didn't find much information on the subject. Can someone point me in the right direction or answer the question here? Thanks. Oh btw - since skins are called themes nowadays with Siena, maybe it's better to change the forum category name. :) |
elfrenazo |
|
---|---|
create category, then go to / modules / pages / tpl example: page.list.tpl create games category: page.list.juegos personalize your .tpl --------------------------------------------------------------- another option --> change themes http://www.cotonti.com/extensions/mobile-geolocation/mobiswitcher-plugin to the topic name in the configuration, up to three ---------------------------------------------------------------- I hope that helps
|
Twiebie |
|
---|---|
Thanks for the reply, but it's actually not what i'm looking for.
I'm wondering how exactly different colour schemes can be used on themes. [BEGIN_COT_THEME] Name=Nemesis Schemes=default:Default [END_COT_THEME] |
Trustmaster |
|
---|---|
Given that you have 3 files in themes/your_theme/css folder: default.css, light.css and dark.css, you can use them as color schemes: [BEGIN_COT_THEME] Name=YourTheme Schemes=default:Default,light:Light,dark:Dark [END_COT_THEME] So you use CSS file names as keys and give them some titles, all comma separated. May the Source be with you!
|
Kingsley |
|
---|---|
^^ Call me a noob, but I am a person that uses multiple css files (coz I truly do not like large css files. like to keep it organized..) Usually I end up with a smal list:
You probably are going to tell me that a) having 1 less css files makes shit react faster, and b) whatever resaon.. :) will this work with how I like to work? |
Trustmaster |
|
---|---|
That's pretty fine, you can use a structure like that plus create a few stylesheets which override some colors, so you can add 'light.css' and 'dark.css' to that family and define some colors/backgrounds there (with !important override if necessary). Also don't forget about @import statement. May the Source be with you!
|
Hodges |
|
---|---|
Hi Trustmaster, I cannot seem to get this to work. I've created, say, green.css, blue.css and placed alongside default.css in /themes/MY_SKIN/css/. I've also added those css files to MY_SKIN.php: <?PHP /* ==================== [BEGIN_COT_THEME] Name=MY_SKIN Schemes=default:Default,blue:Blue,green:Green,monochrome:Monochrome [END_COT_THEME] ==================== */ defined('COT_CODE') or die('Wrong URL'); ?> Upon selecting it in my profile no change occurs. 'blue.css' does not appear in the header in the source. Is there a magical tag missing somewhere to get this included? The MY_SKIN.rc.php file seems to have 'default.css' hard-coded. Should there be a line such as: cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/css/'.$usr['scheme'].'.css'); Cheers, |
Trustmaster |
|
---|---|
Most likely you will need loading 2 CSS files at a time. Move all your common CSS rules to a file called e.g. css/base.css and connect it via MY_SKIN.rc.php: cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/css/base.css'); Then put all colour-specific styles to appropriate files like css/blue.css, css/green.css, etc. and connect them the old way in header.tpl: {HEADER_HEAD} <link rel="stylesheet" type="text/css" href="{PHP.cfg.themes_dir}/{PHP.theme}/css/{PHP.scheme}.css"> There's a more tricky way using cot_rc_link_file() in MY_SKIN.php, but the above should just work. May the Source be with you!
|
Hodges |
|
---|---|
Works a treat. Is there nothing this man cannot solve?! :) |