Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.925 diff -u -p -r1.925 common.inc --- includes/common.inc 18 Jun 2009 21:19:01 -0000 1.925 +++ includes/common.inc 2 Jul 2009 07:55:32 -0000 @@ -3583,6 +3583,9 @@ function drupal_render_page($page) { // 'left', 'footer', etc. drupal_alter('page', $page); + // Change the theme value. + // @todo: this is ugly. + $page['#theme'] = 'html'; return drupal_render($page); } @@ -3930,6 +3933,10 @@ function drupal_common_theme() { 'placeholder' => array( 'arguments' => array('text' => NULL) ), + 'html' => array( + 'arguments' => array('page' => NULL), + 'template' => 'html', + ), 'page' => array( 'arguments' => array('page' => NULL), 'template' => 'page', Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.496 diff -u -p -r1.496 theme.inc --- includes/theme.inc 18 Jun 2009 21:19:02 -0000 1.496 +++ includes/theme.inc 2 Jul 2009 08:10:33 -0000 @@ -1886,6 +1886,48 @@ function template_process(&$variables, $ } /** + * Preprocess variables for html.tpl.php + * + * @see drupal_render_page() + * @see html.tpl.php + */ +function template_preprocess_html(&$variables) { + $variables['page'] = theme('page', $variables['page']); + // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides + // mechanisms for extraction of this RDF content via XSLT transformation + // using an associated GRDDL profile. + $variables['rdf_namespaces'] = drupal_get_rdf_namespaces(); + $variables['grddl_profile'] = 'http://ns.inria.fr/grddl/rdfa/'; + $variables['language'] = $GLOBALS['language']; + $variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr'; + + // Add favicon. + if (theme_get_setting('toggle_favicon')) { + $favicon = theme_get_setting('favicon'); + $type = file_get_mimetype($favicon); + // Use the genereic MIME type for favicons if no other was found. + if ($type == 'application/octet-stream') { + $type = 'image/x-icon'; + } + drupal_add_html_head(''); + } + + // Construct page title + if (drupal_get_title()) { + $head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal')); + } + else { + $head_title = array(variable_get('site_name', 'Drupal')); + if (variable_get('site_slogan', '')) { + $head_title[] = variable_get('site_slogan', ''); + } + } + $variables['head_title'] = implode(' | ', $head_title); + // Closure should be filled last. + $variables['closure'] = theme('closure'); +} + +/** * Preprocess variables for page.tpl.php * * Most themes utilize their own copy of page.tpl.php. The default is located @@ -1907,17 +1949,6 @@ function template_preprocess_page(&$vari $variables['show_blocks'] = $variables['page']['#show_blocks']; $variables['show_messages'] = $variables['page']['#show_messages']; - // Add favicon. - if (theme_get_setting('toggle_favicon')) { - $favicon = theme_get_setting('favicon'); - $type = file_get_mimetype($favicon); - // Use the genereic MIME type for favicons if no other was found. - if ($type == 'application/octet-stream') { - $type = 'image/x-icon'; - } - drupal_add_html_head(''); - } - // Set up layout variable. $variables['layout'] = 'none'; if (!empty($variables['page']['left'])) { @@ -1927,23 +1958,10 @@ function template_preprocess_page(&$vari $variables['layout'] = ($variables['layout'] == 'left') ? 'both' : 'right'; } - // Construct page title - if (drupal_get_title()) { - $head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal')); - } - else { - $head_title = array(variable_get('site_name', 'Drupal')); - if (variable_get('site_slogan', '')) { - $head_title[] = variable_get('site_slogan', ''); - } - } - $variables['head_title'] = implode(' | ', $head_title); $variables['base_path'] = base_path(); $variables['front_page'] = url(); $variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb()); $variables['feed_icons'] = drupal_get_feeds(); - $variables['language'] = $GLOBALS['language']; - $variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr'; $variables['logo'] = theme_get_setting('logo'); $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : ''; $variables['main_menu'] = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array(); @@ -1953,13 +1971,6 @@ function template_preprocess_page(&$vari $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : ''); $variables['tabs'] = theme('menu_local_tasks'); $variables['title'] = drupal_get_title(); - // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides - // mechanisms for extraction of this RDF content via XSLT transformation - // using an associated GRDDL profile. - $variables['rdf_namespaces'] = drupal_get_rdf_namespaces(); - $variables['grddl_profile'] = 'http://ns.inria.fr/grddl/rdfa/'; - // Closure should be filled last. - $variables['closure'] = theme('closure'); if ($node = menu_get_object()) { $variables['node'] = $node; @@ -2017,7 +2028,18 @@ function template_process_page(&$variabl foreach (system_region_list($GLOBALS['theme']) as $region_key => $region_name) { $variables[$region_key] = drupal_render($variables['page'][$region_key]); } +} +/** + * Process variables for html.tpl.php + * + * Perform final addition and modification of variables before passing into + * the template. + * + * @see template_preprocess_html() + * @see html.tpl.php + */ +function template_process_html(&$variables) { $variables['head'] = drupal_get_html_head(); $variables['css'] = drupal_add_css(); $variables['styles'] = drupal_get_css(); Index: modules/system/html.tpl.php =================================================================== RCS file: modules/system/html.tpl.php diff -N modules/system/html.tpl.php --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/system/html.tpl.php 2 Jul 2009 07:06:28 -0000 @@ -0,0 +1,44 @@ +language contains its textual representation. + * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'. + * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document. + * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data. + * - $head_title: A modified version of the page title, for use in the TITLE tag. + * - $head: Markup for the HEAD section (including meta tags, keyword tags, and + * so on). + * - $styles: Style tags necessary to import all CSS files for the page. + * - $scripts: Script tags necessary to load the JavaScript files and settings + * for the page. + * - $page: The rendered page content. + * - $closure: Final closing markup from any modules that have altered the page. + * This variable should always be output last, after all other dynamic content. + * + */ +?> + + +> + + + <?php print $head_title; ?> + + + + + + + + + Index: modules/system/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v retrieving revision 1.23 diff -u -p -r1.23 page.tpl.php --- modules/system/page.tpl.php 18 Jun 2009 21:19:02 -0000 1.23 +++ modules/system/page.tpl.php 2 Jul 2009 07:10:10 -0000 @@ -10,7 +10,6 @@ * General utility variables: * - $base_path: The base URL path of the Drupal installation. At the very * least, this will always default to /. - * - $css: An array of CSS files for the current page. * - $directory: The directory the template is located in, e.g. modules/system * or themes/garland. * - $classes_array: Array of html class attribute values. It is flattened @@ -20,21 +19,9 @@ * - $is_admin: TRUE if the user has permission to access administration pages. * * Page metadata: - * - $language: (object) The language the site is being displayed in. - * $language->language contains its textual representation. - * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'. - * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document. - * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data. - * - $head_title: A modified version of the page title, for use in the TITLE tag. - * - $head: Markup for the HEAD section (including meta tags, keyword tags, and - * so on). - * - $styles: Style tags necessary to import all CSS files for the page. - * - $scripts: Script tags necessary to load the JavaScript files and settings - * for the page. * - $classes: String of classes that can be used to style contextually through - * CSS. It should be placed within the tag. When selecting through CSS - * it's recommended that you use the body tag, e.g., "body.front". It can be - * manipulated through the variable $classes_array from preprocess functions. + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. * The default values can be one or more of the following: * - page: The current template type, i.e., "theming hook". * - front: Page is the home page. @@ -83,28 +70,13 @@ * * Footer/closing data: * - $footer : The footer region. - * - $closure: Final closing markup from any modules that have altered the page. - * This variable should always be output last, after all other dynamic content. * * @see template_preprocess() * @see template_preprocess_page() * @see template_process() */ ?> - -> - - - <?php print $head_title; ?> - - - - - - -
+
- - - - - Index: modules/system/system.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.css,v retrieving revision 1.54 diff -u -p -r1.54 system.css --- modules/system/system.css 11 Apr 2009 22:19:45 -0000 1.54 +++ modules/system/system.css 2 Jul 2009 07:07:46 -0000 @@ -3,7 +3,7 @@ /* ** HTML elements */ -body.drag { +.drag { cursor: move; } th.active img { Index: themes/garland/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v retrieving revision 1.27 diff -u -p -r1.27 page.tpl.php --- themes/garland/page.tpl.php 28 May 2009 16:44:07 -0000 1.27 +++ themes/garland/page.tpl.php 2 Jul 2009 06:42:49 -0000 @@ -1,20 +1,7 @@ -> - - <?php print $head_title ?> - - - - - - - +?> +
@@ -68,7 +55,4 @@
- - - - +
\ No newline at end of file Index: themes/garland/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/style.css,v retrieving revision 1.58 diff -u -p -r1.58 style.css --- themes/garland/style.css 20 Jun 2009 07:40:36 -0000 1.58 +++ themes/garland/style.css 2 Jul 2009 06:50:48 -0000 @@ -373,11 +373,11 @@ table .form-button, table .form-submit { } /* With 3 columns, require a minimum width of 1000px to ensure there is enough horizontal space. */ -body.two-sidebars { +.two-sidebars { min-width: 980px; } /* With 2 columns, require a minimum width of 800px. */ -body.sidebar-left, body.sidebar-right { +.sidebar-left, .sidebar-right { min-width: 780px; } @@ -388,24 +388,24 @@ body.sidebar-left, body.sidebar-right { } /* So we move the #center container over the sidebars to compensate */ -body.sidebar-left #center { +.sidebar-left #center { margin-left: -210px; } -body.sidebar-right #center { +.sidebar-right #center { margin-right: -210px; } -body.two-sidebars #center { +.two-sidebars #center { margin: 0 -210px; } /* And add blanks left and right for the sidebars to fill */ -body.sidebar-left #squeeze { +.sidebar-left #squeeze { margin-left: 210px; } -body.sidebar-right #squeeze { +.sidebar-right #squeeze { margin-right: 210px; } -body.two-sidebars #squeeze { +.two-sidebars #squeeze { margin: 0 210px; } @@ -486,15 +486,15 @@ body.two-sidebars #squeeze { z-index: 3; } -body.sidebar-left #footer { +.sidebar-left #footer { margin-left: -210px; } -body.sidebar-right #footer { +.sidebar-right #footer { margin-right: -210px; } -body.two-sidebars #footer { +.two-sidebars #footer { margin: 0 -210px; }