Projet

Général

Profil

Paste
Télécharger (1,4 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / zen / zen-internals / template.zen.inc @ 4b706e38

1 87dbc3bf Benjamin Luce
<?php
2
/**
3
 * @file
4
 * Add stylesheets that are only needed when Zen is the enabled theme.
5
 *
6
 * Don't do something this dumb in your sub-theme. Stylesheets should be added
7
 * using your sub-theme's .info file. If you desire styles that apply
8
 * conditionally, you can conditionally add a "body class" in the
9
 * preprocess_page function. For an example, see how wireframe styling is
10
 * handled in zen_preprocess_html() and wireframes.css.
11
 */
12
13
/**
14
 * If the user is silly and enables Zen as the theme, manually add some stylesheets.
15
 */
16
function _zen_preprocess_html(&$variables, $hook) {
17
  // Add Zen's stylesheets manually instead of via its .info file. We do not
18
  // want the stylesheets to be inherited from Zen since it becomes impossible
19
  // to re-order the stylesheets in the sub-theme.
20
  $directory = drupal_get_path('theme', 'zen') . '/zen-internals/css/';
21
  $stylesheet = (theme_get_setting('zen_layout') == 'zen-fixed-width') ? 'styles-fixed.css' : 'styles.css';
22
  drupal_add_css($directory . $stylesheet, array('group' => CSS_THEME, 'every_page' => TRUE));
23
24
  // Sub-themes after 7.x-5.1 remove these files, but we can't remove them using
25
  // zen.info since it will break sub-themes built with 7.x-5.0/5.1.
26
  drupal_add_css($directory . 'system.messages.css', array('group' => CSS_THEME, 'every_page' => TRUE));
27
  drupal_add_css($directory . 'system.theme.css', array('group' => CSS_THEME, 'every_page' => TRUE));
28
}