CSS_THEME, 'media' => 'all', 'weight' => -999)); drupal_add_css($adminimal_path . '/css/style.css', array('group' => CSS_THEME, 'media' => 'all', 'weight' => 1)); // Add conditional CSS for IE8 and below. drupal_add_css($adminimal_path . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE)); // Add conditional CSS for IE7 and below. drupal_add_css($adminimal_path . '/css/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE)); // Add conditional CSS for IE6. drupal_add_css($adminimal_path . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 6', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE)); // Add theme name to body class. $vars['classes_array'][] = 'adminimal-theme'; // Add icons to the admin configuration page. if (theme_get_setting('display_icons_config')) { drupal_add_css($adminimal_path . '/css/icons-config.css', array('group' => CSS_THEME, 'weight' => 10, 'preprocess' => FALSE)); } // Define Default media queries. $media_query_mobile = 'only screen and (max-width: 480px)'; $media_query_tablet = 'only screen and (min-width : 481px) and (max-width : 1024px)'; // Get custom media queries if set. if (theme_get_setting('use_custom_media_queries')) { $media_query_mobile = theme_get_setting('media_query_mobile'); $media_query_tablet = theme_get_setting('media_query_tablet'); } // Add responsive styles. drupal_add_css($adminimal_path . '/css/mobile.css', array('group' => CSS_THEME, 'media' => $media_query_mobile, 'weight' => 1000)); drupal_add_css($adminimal_path . '/css/tablet.css', array('group' => CSS_THEME, 'media' => $media_query_tablet, 'weight' => 1000)); // Add custom CSS. $custom_css_path = 'public://adminimal-custom.css'; if (theme_get_setting('custom_css') && file_exists($custom_css_path)) { drupal_add_css($custom_css_path, array('group' => CSS_THEME, 'weight' => 9999, 'preprocess' => FALSE)); } // Fix the viewport and zooming in mobile devices. $viewport = array( '#tag' => 'meta', '#attributes' => array( 'name' => 'viewport', 'content' => 'width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no, initial-scale=1', ), ); drupal_add_html_head($viewport, 'viewport'); } /** * Override or insert variables into the page template. */ function adminimal_preprocess_page(&$vars) { $vars['primary_local_tasks'] = $vars['tabs']; unset($vars['primary_local_tasks']['#secondary']); $vars['secondary_local_tasks'] = array( '#theme' => 'menu_local_tasks', '#secondary' => $vars['tabs']['#secondary'], ); } /** * Display the list of available node types for node creation. */ function adminimal_node_add_list($variables) { $content = $variables['content']; $output = ''; if ($content) { $output = '
' . t('You have not created any content types yet. Go to the content type creation page to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '
'; } return $output; } /** * Implements theme_adminimal_block_content(). * * Use unordered list markup in both compact and extended mode. */ function adminimal_adminimal_block_content($variables) { $content = $variables['content']; $output = ''; if (!empty($content)) { $output = system_adminimal_compact_mode() ? '