Posted by cardiffsteve on March 4, 2013 at 6:09pm
I have created my site with the excellent Omega, and now wondered how I would go about adding fields to the Theme UI in order to add colors which would then be used in my global.css?
currently my colors are 'hard-coded' into global.css in the normal css fashion.
I could then offer the theme to anyone then for free - but not sure if this is allowed?
I just wondered if there is a link anywhere which would point me in the right direction.
thanks
Comments
Hi, I can't help you exactly
Hi,
I can't help you exactly but doesn't Bartik do this? It uses the core module 'Color' and you can select a colour in the theme appearance settings and they are changed dynamically.
I imagine the colour changes wouldn't be written directly to global.css but to another custom stylesheet you specify which loads BEFORE global.css (for all states i.e. normal, narrow) which holds your colours.
Sorry I couldn't be of more help but I suggest cracking open that Bartik theme in notepad and seeing how it does it. How hard can it be? Famous last words!
Good luck :)
Yes, Color module is the way to do this
The CSS for the colors winds up in a file called color.css. The Color module can be a bit of a pain to get going and the official documentation is confusing (at least it was to me). Something like this post will be more helpful in getting you started:
http://www.wunderkraut.com/blog/becoming-friends-with-the-drupal-color-m...
John Hannah
Friendly Machine