/** * Override or insert variables into the html templates. */ function adaptivetheme_subtheme_preprocess_html(&$vars) { // Load the media queries styles // Remember to rename these files to match the names used here - they are // in the CSS directory of your subtheme. $media_queries_css = array('adaptivetheme_subtheme.responsive.style.css', 'adaptivetheme_subtheme.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, 'adaptivetheme_subtheme'); /** * Load IE specific stylesheets * AT automates adding IE stylesheets, simply add to the array using * the conditional comment as the key and the stylesheet name as the value. * * See our online help: http://adaptivethemes.com/documentation/working-with-internet-explorer * * For example to add a stylesheet for IE8 only use: * * 'IE 8' => 'ie-8.css', * * Your IE CSS file must be in the /css/ directory in your subtheme. */ /* -- Delete this line to add a conditional stylesheet for IE 7 or less. $ie_files = array( 'lte IE 7' => 'ie-lte-7.css', ); load_subtheme_ie_styles($ie_files, 'adaptivetheme_subtheme'); // */ }
/** * Override or insert variables into the html templates. */ function constellation_preprocess_html(&$vars) { if (drupal_is_front_page()) { $vars['head_title'] = 'Freelance Drupal web development | NEAR DARK Design Studio'; } // Load the media queries styles // Remember to rename these files to match the names used here - they are // in the CSS directory of your subtheme. $media_queries_css = array('constellation.responsive.style.css', 'constellation.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, 'constellation'); drupal_add_css(drupal_get_path('theme', 'constellation') . '/css/ie-8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); //dpm($vars); /** * Load IE specific stylesheets * AT automates adding IE stylesheets, simply add to the array using * the conditional comment as the key and the stylesheet name as the value. * * See our online help: http://adaptivethemes.com/documentation/working-with-internet-explorer * * For example to add a stylesheet for IE8 only use: * * 'IE 8' => 'ie-8.css', * * Your IE CSS file must be in the /css/ directory in your subtheme. */ /* -- Delete this line to add a conditional stylesheet for IE 7 or less. $ie_files = array( 'lte IE 7' => 'ie-lte-7.css', ); load_subtheme_ie_styles($ie_files, 'constellation'); // */ }
/** * Override or insert variables into the html template. */ function pixture_reloaded_preprocess_html(&$vars) { global $theme_key; $theme_name = 'pixture_reloaded'; $path_to_theme = drupal_get_path('theme', $theme_name); // Load the media queries styles $media_queries_css = array($theme_name . '.responsive.style.css', $theme_name . '.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, $theme_name); // Add a class for the active color scheme if (module_exists('color')) { $class = check_plain(get_color_scheme_name($theme_key)); $vars['classes_array'][] = 'color-scheme-' . drupal_html_class($class); } // Add class for the active theme $vars['classes_array'][] = drupal_html_class($theme_key); // Add theme settings classes $settings_array = array('font_size', 'box_shadows', 'body_background', 'menu_bullets', 'menu_bar_position', 'corner_radius', 'image_alignment'); foreach ($settings_array as $setting) { $vars['classes_array'][] = theme_get_setting($setting); } // Fonts $fonts = array('bf' => 'base_font', 'snf' => 'site_name_font', 'ssf' => 'site_slogan_font', 'ptf' => 'page_title_font', 'ntf' => 'node_title_font', 'ctf' => 'comment_title_font', 'btf' => 'block_title_font'); $families = get_font_families($fonts, $theme_key); if (!empty($families)) { foreach ($families as $family) { $vars['classes_array'][] = $family; } } // Add Noggin module settings extra classes, not all designs can support header images if (module_exists('noggin')) { if (variable_get('noggin:use_header', FALSE)) { $va = theme_get_setting('noggin_image_vertical_alignment'); $ha = theme_get_setting('noggin_image_horizontal_alignment'); $vars['classes_array'][] = 'ni-a-' . $va . $ha; $vars['classes_array'][] = theme_get_setting('noggin_image_repeat'); $vars['classes_array'][] = theme_get_setting('noggin_image_width'); } } // Special case for PIE htc rounded corners, not all themes include this if (theme_get_setting('ie_corners') == 1) { drupal_add_css($path_to_theme . '/css/ie-htc.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); } // Headings styles if (theme_get_setting('headings_styles_caps') == 1) { $vars['classes_array'][] = 'hs-caps'; } if (theme_get_setting('headings_styles_weight') == 1) { $vars['classes_array'][] = 'hs-fwn'; } if (theme_get_setting('headings_styles_shadow') == 1) { $vars['classes_array'][] = 'hs-ts'; } }
/** * Preprocess variables for the html template. */ function constellation_preprocess_html(&$vars) { $vars['classes_array'][] = 'constellation-theme'; if (drupal_is_front_page()) { $vars['head_title'] = 'Denver Drupal Web Development | NEAR DARK Design Studio'; } // Load the media queries styles // Remember to rename these files to match the names used here - they are // in the CSS directory of your subtheme. $media_queries_css = array('constellation.responsive.style.css', 'constellation.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, 'constellation'); drupal_add_css(drupal_get_path('theme', 'constellation') . '/css/ie-8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); return $vars; }
/** * Override or insert vars into the html template. */ function corolla_preprocess_html(&$vars) { global $theme_key; $theme_name = 'corolla'; // Load the media queries styles $media_queries_css = array($theme_name . '.responsive.style.css', $theme_name . '.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, $theme_name); // Load IE specific stylesheets $ie_files = array('lte IE 9' => 'ie-lte-9.css'); load_subtheme_ie_styles($ie_files, $theme_name); // Add a class for the active color scheme if (module_exists('color')) { $class = check_plain(get_color_scheme_name($theme_key)); $vars['classes_array'][] = 'color-scheme-' . drupal_html_class($class); } // Add class for the active theme $vars['classes_array'][] = drupal_html_class($theme_key); // Add theme settings classes $settings_array = array('font_size', 'box_shadows', 'body_background', 'menu_bullets', 'content_corner_radius', 'tabs_corner_radius', 'image_alignment'); foreach ($settings_array as $setting) { $vars['classes_array'][] = theme_get_setting($setting); } // Fonts $fonts = array('bf' => 'base_font', 'snf' => 'site_name_font', 'ssf' => 'site_slogan_font', 'ptf' => 'page_title_font', 'ntf' => 'node_title_font', 'ctf' => 'comment_title_font', 'btf' => 'block_title_font'); $families = get_font_families($fonts, $theme_key); if (!empty($families)) { foreach ($families as $family) { $vars['classes_array'][] = $family; } } // Heading styles if (theme_get_setting('headings_styles_caps') == 1) { $vars['classes_array'][] = 'hs-caps'; } if (theme_get_setting('headings_styles_weight') == 1) { $vars['classes_array'][] = 'hs-fwn'; } if (theme_get_setting('headings_styles_shadow') == 1) { $vars['classes_array'][] = 'hs-ts'; } }
function openfit_base_preprocess_html(&$vars) { // Load the media queries styles // If you change the names of these files they must match here - these files are // in the /css/ directory of your subtheme - the names must be identical! $media_queries_css = array('openfit_base.responsive.style.css', 'openfit_base.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, 'openfit_base'); /** * Load IE specific stylesheets * AT automates adding IE stylesheets, simply add to the array using * the conditional comment as the key and the stylesheet name as the value. * * See our online help: http://adaptivethemes.com/documentation/working-with-internet-explorer * * For example to add a stylesheet for IE8 only use: * * 'IE 8' => 'ie-8.css', * * Your IE CSS file must be in the /css/ directory in your subtheme. */ $ie_files = array('lte IE 7' => 'ie-lte-7.css'); load_subtheme_ie_styles($ie_files, 'openfit_base'); }
/** * Override or insert variables into the html templates. */ function adaptivetheme_subtheme_preprocess_html(&$vars) { global $theme_key; // Load the media queries styles // Remember to rename these files to match the names used here - they are // in the CSS directory of your subtheme. $media_queries_css = array('adaptivetheme_subtheme.responsive.style.css', 'adaptivetheme_subtheme.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, $theme_key); /** * Load IE Stylesheets * * AT automates adding IE stylesheets, simply add to the array using * the conditional comment as the key and the stylesheet name as the value. * * See our online help: http://adaptivethemes.com/documentation/working-with-internet-explorer * * For example to add a stylesheet for IE8 only use: * * 'IE 8' => 'ie-8.css', * * Your IE CSS file must be in the /css/ directory in your subtheme. */ /* -- Delete this line to add a conditional stylesheet for IE 7 or less. $ie_files = array( 'lte IE 7' => 'ie-lte-7.css', ); load_subtheme_ie_styles($ie_files, $theme_key); // */ // Add class for the active theme name /* -- Delete this line to add a class for the active theme name. $vars['classes_array'][] = drupal_html_class($theme_key); // */ // Browser/platform sniff - adds body classes such as ipad, webkit, chrome etc. /* -- Delete this line to add a classes for the browser and platform. $vars['classes_array'][] = css_browser_selector(); // */ }
/** * Override or insert variables into the html template. */ function at_commerce_preprocess_html(&$vars) { global $theme_key; $theme_name = 'at_commerce'; $path_to_theme = drupal_get_path('theme', $theme_name); // Load the media queries styles $media_queries_css = array($theme_name . '.responsive.style.css', $theme_name . '.responsive.gpanels.css'); load_subtheme_media_queries($media_queries_css, $theme_name); // Load IE specific stylesheets $ie_files = array('IE 6' => 'ie-6.css', 'lte IE 7' => 'ie-lte-7.css', 'IE 8' => 'ie-8.css', 'lte IE 9' => 'ie-lte-9.css'); load_subtheme_ie_styles($ie_files, $theme_name); // Add a class for the active color scheme if (module_exists('color')) { $class = check_plain(get_color_scheme_name($theme_key)); $vars['classes_array'][] = 'color-scheme-' . drupal_html_class($class); } // Add class for the active theme $vars['classes_array'][] = drupal_html_class($theme_key); // Add browser and platform classes $vars['classes_array'][] = css_browser_selector(); // Add theme settings classes $settings_array = array('font_size', 'body_background', 'header_layout', 'menu_bullets', 'main_menu_alignment', 'image_alignment', 'site_name_case', 'site_name_weight', 'site_name_alignment', 'site_name_shadow', 'site_slogan_case', 'site_slogan_weight', 'site_slogan_alignment', 'site_slogan_shadow', 'page_title_case', 'page_title_weight', 'page_title_alignment', 'page_title_shadow', 'node_title_case', 'node_title_weight', 'node_title_alignment', 'node_title_shadow', 'comment_title_case', 'comment_title_weight', 'comment_title_alignment', 'comment_title_shadow', 'block_title_case', 'block_title_weight', 'block_title_alignment', 'block_title_shadow', 'corner_radius_form_input_text', 'corner_radius_form_input_submit'); foreach ($settings_array as $setting) { $vars['classes_array'][] = theme_get_setting($setting); } // Font family settings $fonts = array('bf' => 'base_font', 'snf' => 'site_name_font', 'ssf' => 'site_slogan_font', 'mmf' => 'main_menu_font', 'ptf' => 'page_title_font', 'ntf' => 'node_title_font', 'ctf' => 'comment_title_font', 'btf' => 'block_title_font'); $families = get_font_families($fonts, $theme_key); if (!empty($families)) { foreach ($families as $family) { $vars['classes_array'][] = $family; } } // Add Noggin module settings extra classes, not all designs can support header images if (module_exists('noggin')) { if (variable_get('noggin:use_header', FALSE)) { $va = theme_get_setting('noggin_image_vertical_alignment'); $ha = theme_get_setting('noggin_image_horizontal_alignment'); $vars['classes_array'][] = 'ni-a-' . $va . $ha; $vars['classes_array'][] = theme_get_setting('noggin_image_repeat'); $vars['classes_array'][] = theme_get_setting('noggin_image_width'); } } // Special case for PIE htc rounded corners, not all themes include this if (theme_get_setting('ie_corners') == 1) { drupal_add_css($path_to_theme . '/css/ie-htc.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); } // Custom settings for AT Commerce // Content displays $show_frontpage_grid = theme_get_setting('content_display_grids_frontpage') == 1 ? TRUE : FALSE; $show_taxopage_grid = theme_get_setting('content_display_grids_taxonomy_pages') == 1 ? TRUE : FALSE; if ($show_frontpage_grid == TRUE || $show_taxopage_grid == TRUE) { drupal_add_js($path_to_theme . '/js/equalheights.js'); } if ($show_frontpage_grid == TRUE) { $cols_fpg = theme_get_setting('content_display_grids_frontpage_colcount'); $vars['classes_array'][] = $cols_fpg; drupal_add_js($path_to_theme . '/js/eq.fp.grid.js'); } if ($show_taxopage_grid == TRUE) { $cols_tpg = theme_get_setting('content_display_grids_taxonomy_pages_colcount'); $vars['classes_array'][] = $cols_tpg; drupal_add_js($path_to_theme . '/js/eq.tp.grid.js'); } // Do stuff for the slideshow if (theme_get_setting('show_slideshow') == 1) { // Add some js and css drupal_add_css($path_to_theme . '/css/styles.slideshow.css', array('preprocess' => TRUE, 'group' => CSS_THEME, 'media' => 'screen', 'every_page' => TRUE)); drupal_add_js($path_to_theme . '/js/jquery.flexslider-min.js'); drupal_add_js($path_to_theme . '/js/slider.options.js'); // Add some classes to do evil hiding of elements with CSS... if (theme_get_setting('show_slideshow_navigation_controls') == 0) { $vars['classes_array'][] = 'hide-ss-nav'; } if (theme_get_setting('show_slideshow_direction_controls') == 0) { $vars['classes_array'][] = 'hide-ss-dir'; } // Write some evil inline CSS in the head, oh er.. $slideshow_width = check_plain(theme_get_setting('slideshow_width')); $slideshow_css = '.flexible-slideshow,.flexible-slideshow .article-inner,.flexible-slideshow .article-content,.flexslider {max-width: ' . $slideshow_width . 'px;}'; drupal_add_css($slideshow_css, array('group' => CSS_DEFAULT, 'type' => 'inline')); } // Draw stuff drupal_add_js($path_to_theme . '/js/draw.js'); }