It would be quite awesome if this theme's colors could be changed using color.module - the colors that would need to be changeable are:

  • Menu highlight / line (default is blue)
  • Link color (similar blue)
  • Text color (defaults to black)
  • Line at bottom of page (default is blue)

Maybe other colors too? Site title?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geerlingguy’s picture

Status: Active » Needs work

I'm following along with this nice guide to including a color.inc to integrate my theme with color.module. Hopefully will have some integration by the end of this evening.

geerlingguy’s picture

Almost everything is complete, at least at the initial stage: http://drupalcode.org/project/parish_theme.git/commit/c2e1947

I still need to get the preview working well; I think Bartik may use its own JS file to change the colors of the actual preview image, so I'll take a look at that next.

geerlingguy’s picture

Another quick post on color module integration, specifically with JS mention: http://mearra.com/blogs/sampo-turve/becoming-friends-drupal-color-module...

geerlingguy’s picture

Assigned: Unassigned » geerlingguy
Status: Needs work » Needs review
FileSize
4.43 KB

So, at DrupalCon, spent a bit of time looking over how Bartik works around some of the stranger bits of color.module theme integration, and I found a few little oddities I had to take into account:

  • Color.module only allows the preview.html hardcoded HTML, with no .tpl.php benefits, so the logo path has to be hardcoded. Obviously, if someone has the theme in a non-default location, the path to logo.png will be wrong. So, I have to add a setting to Drupal.settings.color.logo in the color.inc file, then detect the logo (and whether or not it's set) in preview.js.
  • All the color changes have to be made live with CSS changes via jQuery in preview.js.
  • For changing :hover selectors, you have to use jQuery's .hover() function to set the color for the hover, then also set the color back to what it should be after hover is over.

Anyways, here's a patch for this. About to commit to -dev, then I may start doing some testing in preparation for adding these into the next release of Open Parish :D

geerlingguy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.