function template_preprocess_styleguide_palette in Style Guide 7
Implements hook_preprocess_HOOK() for styleguide-palette.tpl.php.
File
- styleguide_palette/
styleguide_palette.module, line 186 - Stores and displays color palettes and swatches.
Code
function template_preprocess_styleguide_palette(&$variables) {
drupal_add_css(drupal_get_path('module', 'styleguide_palette') . '/css/styleguide_palette.css');
$variables['empty'] = empty($variables['swatches']) ? t('There are no swatches yet.') : '';
foreach ($variables['swatches'] as &$swatch) {
$swatch = theme('styleguide_palette_swatch', $swatch);
}
}