? .svn ? base-min.css ? reset-fonts-grids.css ? .settings/.svn ? images/.svn Index: style.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/themes/yui-framework/style.css,v retrieving revision 1.1 diff -U3 -r1.1 style.css --- style.css 11 Apr 2008 09:03:30 -0000 1.1 +++ style.css 15 Aug 2008 11:02:57 -0000 @@ -3,12 +3,6 @@ * From Drupal 5.7 Framework - Created Andre Griffin */ -@charset "utf-8"; -@import 'http://yui.yahooapis.com/2.5.1/build/reset-fonts-grids/reset-fonts-grids.css'; -@import 'http://yui.yahooapis.com/2.5.1/build/base/base-min.css'; -@import 'typography.css'; -@import 'grid.css'; - /*--------------ADMINISTRATION SECTION---------------- --------------edit at your own risk ----------------*/ #tabs-wrapper{margin:0;padding:0}h2.with-tabs{float:left;margin-right:1em}ul.tabs{margin:1.8em 0 0 !important;padding:0 !important} Index: template.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/themes/yui-framework/template.php,v retrieving revision 1.1 diff -U3 -r1.1 template.php --- template.php 11 Apr 2008 09:03:30 -0000 1.1 +++ template.php 15 Aug 2008 11:02:57 -0000 @@ -11,7 +11,7 @@ /** * Sets the page width according to YUI specification * - * http://developer.yahoo.com/yui/examples/grids/grids-doc.html + * http://developer.yahoo.com/yui/examples/grids/grids-doc.html */ function phptemplate_page_width() { echo 'doc'; //750px width, centered @@ -28,7 +28,7 @@ */ function phptemplate_page_template($sidebar_left, $sidebar_right) { $template = ''; - + switch( true ) { case $sidebar_left != '' && $sidebar_right == '' : $template = 'yui-t1'; //160px @@ -41,7 +41,7 @@ //$template = 'yui-t6'; //300px break; } - + echo $template; } @@ -75,23 +75,30 @@ /** * Override or insert PHPTemplate variables into the templates. + * documentation at http://drupal.org/node/16383 */ function _phptemplate_variables($hook, $vars) { - if ($hook == 'page') { - - if ($secondary = menu_secondary_local_tasks()) { - $output = ''; - $output .= "\n"; - $vars['tabs2'] = $output; - } - - // Hook into color.module - if (module_exists('color')) { - _color_page_alter($vars); - } - return $vars; + switch ($hook) { + case 'page': + //Add own CSS files to the array of sheets. + _phptemplate_set_yui_css_files(); + //After adding, re-create the $styles var. + $vars['styles'] = drupal_get_css(); + + //Add styles around secondary-links + if ($secondary = menu_secondary_local_tasks()) { + $output = ''; + $output .= "\n"; + $vars['tabs2'] = $output; + } + + // Hook into color.module + if (module_exists('color')) { + _color_page_alter($vars); + } + break; } - return array(); + return $vars; } /** @@ -109,3 +116,23 @@ return $output; } + +function _phptemplate_set_yui_css_files() { + $sheets = array(); + + $path = path_to_theme(); + $relative_sheets= array( + 'reset-fonts-grids.css', + 'base-min.css', + 'typography.css', + 'grid.css', + 'style.css', + ); + + foreach ($relative_sheets as $sheet) { + $this_sheet = $path .'/'. $sheet; + $sheets = drupal_add_css($this_sheet, 'theme', 'all', TRUE); + } + + return $sheets; +}