Index: ninesixty.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/ninesixty/ninesixty.info,v
retrieving revision 1.1.2.5.4.1
diff -u -p -r1.1.2.5.4.1 ninesixty.info
--- ninesixty.info	10 Jan 2011 21:30:11 -0000	1.1.2.5.4.1
+++ ninesixty.info	11 Jan 2011 00:57:37 -0000
@@ -3,7 +3,7 @@
 name = 960 Grid System
 description = A blank base theme using the 960 Grid System. See the "README.txt" file within the theme folder for more information.
 screenshot = images/screenshot.png
-core = 6.x
+core = 7.x
 engine = phptemplate
 
 ; Stylesheets. Anything within the "framework" folder will be placed before all others.
@@ -15,9 +15,13 @@ stylesheets[all][] = styles/framework/de
 ; Theme specific styles. Any sub-themes should override this.
 stylesheets[all][] = styles/styles.css
 
-; Information added by drupal.org packaging script on 2009-08-02
-version = "6.x-1.0"
-core = "6.x"
-project = "ninesixty"
-datestamp = "1249223138"
-
+regions[page_top]       = Page top
+regions[header]         = Header
+regions[search_box]     = Search Box
+regions[highlighted]    = Highlight
+regions[help]           = Help
+regions[content]        = Content
+regions[sidebar_first]  = Left sidebar
+regions[sidebar_second] = Right sidebar
+regions[footer]         = Footer
+regions[page_bottom]    = Page bottom
Index: page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/ninesixty/page.tpl.php,v
retrieving revision 1.1.2.2.4.1
diff -u -p -r1.1.2.2.4.1 page.tpl.php
--- page.tpl.php	10 Jan 2011 21:30:11 -0000	1.1.2.2.4.1
+++ page.tpl.php	11 Jan 2011 00:57:37 -0000
@@ -1,108 +1,87 @@
 <?php
 // $Id: page.tpl.php,v 1.1.2.2.4.1 2011/01/10 21:30:11 dvessel Exp $
 ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
-
-<head>
-  <title><?php print $head_title; ?></title>
-  <?php print $head; ?>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-</head>
-
-<body class="<?php print $body_classes; ?> show-grid">
-  <div id="page" class="container-16 clear-block">
-
-    <div id="site-header" class="clear-block">
-      <div id="branding" class="grid-4 clear-block">
-      <?php if ($linked_logo_img): ?>
-        <span id="logo" class="grid-1 alpha"><?php print $linked_logo_img; ?></span>
-      <?php endif; ?>
-      <?php if ($linked_site_name): ?>
-        <h1 id="site-name" class="grid-3 omega"><?php print $linked_site_name; ?></h1>
-      <?php endif; ?>
-      <?php if ($site_slogan): ?>
-        <div id="site-slogan" class="grid-3 omega"><?php print $site_slogan; ?></div>
-      <?php endif; ?>
-      </div>
+<div id="page" class="container-16 clearfix">
 
-    <?php if ($main_menu_links || $secondary_menu_links): ?>
-      <div id="site-menu" class="grid-12">
-        <?php print $main_menu_links; ?>
-        <?php print $secondary_menu_links; ?>
-      </div>
+  <div id="site-header" class="clearfix">
+    <div id="branding" class="grid-4 clearfix">
+    <?php if ($linked_logo_img): ?>
+      <span id="logo" class="grid-1 alpha"><?php print $linked_logo_img; ?></span>
     <?php endif; ?>
-
-    <?php if ($search_box): ?>
-      <div id="search-box" class="grid-6 prefix-10"><?php print $search_box; ?></div>
+    <?php if ($linked_site_name): ?>
+      <h1 id="site-name" class="grid-3 omega"><?php print $linked_site_name; ?></h1>
+    <?php endif; ?>
+    <?php if ($site_slogan): ?>
+      <div id="site-slogan" class="grid-3 omega"><?php print $site_slogan; ?></div>
     <?php endif; ?>
     </div>
 
+  <?php if ($main_menu_links || $secondary_menu_links): ?>
+    <div id="site-menu" class="grid-12">
+      <?php print $main_menu_links; ?>
+      <?php print $secondary_menu_links; ?>
+    </div>
+  <?php endif; ?>
 
-    <div id="site-subheader" class="prefix-1 suffix-1 clear-block">
-    <?php if ($mission): ?>
-      <div id="mission" class="<?php print ns('grid-14', $header, 7); ?>">
-        <?php print $mission; ?>
-      </div>
-    <?php endif; ?>
+  <?php if ($page['search_box']): ?>
+    <div id="search-box" class="grid-6 prefix-10"><?php print render($page['search_box']); ?></div>
+  <?php endif; ?>
+  </div>
 
-    <?php if ($header): ?>
-      <div id="header-region" class="region <?php print ns('grid-14', $mission, 7); ?> clear-block">
-        <?php print $header; ?>
-      </div>
-    <?php endif; ?>
+  <div id="site-subheader" class="prefix-1 suffix-1 clearfix">
+  <?php if ($page['highlighted']): ?>
+    <div id="highlighted" class="<?php print ns('grid-14', $page['header'], 7); ?>">
+      <?php print render($page['highlighted']); ?>
     </div>
+  <?php endif; ?>
 
+  <?php if ($page['header']): ?>
+    <div id="header-region" class="region <?php print ns('grid-14', $page['highlighted'], 7); ?> clearfix">
+      <?php print render($page['header']); ?>
+    </div>
+  <?php endif; ?>
+  </div>
 
-    <div id="main" class="column <?php print ns('grid-16', $left, 4, $right, 3) . ' ' . ns('push-4', !$left, 4); ?>">
-      <?php print $breadcrumb; ?>
-      <?php if ($title): ?>
-        <h1 class="title" id="page-title"><?php print $title; ?></h1>
-      <?php endif; ?>
-      <?php if ($tabs): ?>
-        <div class="tabs"><?php print $tabs; ?></div>
-      <?php endif; ?>
-      <?php print $messages; ?>
-      <?php print $help; ?>
 
-      <div id="main-content" class="region clear-block">
-        <?php print $content; ?>
-      </div>
+  <div id="main" class="column <?php print ns('grid-16', $page['sidebar_first'], 4, $page['sidebar_second'], 3) . ' ' . ns('push-4', !$page['sidebar_first'], 4); ?>">
+    <?php print $breadcrumb; ?>
+    <?php print render($title_prefix); ?>
+    <?php if ($title): ?>
+      <h1 class="title" id="page-title"><?php print $title; ?></h1>
+    <?php endif; ?>
+    <?php print render($title_suffix); ?>      
+    <?php if ($tabs): ?>
+      <div class="tabs"><?php print render($tabs); ?></div>
+    <?php endif; ?>
+    <?php print $messages; ?>
+    <?php print render($page['help']); ?>
 
-      <?php print $feed_icons; ?>
+    <div id="main-content" class="region clearfix">
+      <?php print render($page['content']); ?>
     </div>
 
-  <?php if ($left): ?>
-    <div id="sidebar-left" class="column sidebar region grid-4 <?php print ns('pull-12', $right, 3); ?>">
-      <?php print $left; ?>
-    </div>
-  <?php endif; ?>
+    <?php print $feed_icons; ?>
+  </div>
 
-  <?php if ($right): ?>
-    <div id="sidebar-right" class="column sidebar region grid-3">
-      <?php print $right; ?>
-    </div>
-  <?php endif; ?>
+<?php if ($page['sidebar_first']): ?>
+  <div id="sidebar-left" class="column sidebar region grid-4 <?php print ns('pull-12', $page['sidebar_second'], 3); ?>">
+    <?php print render($page['sidebar_first']); ?>
+  </div>
+<?php endif; ?>
 
+<?php if ($page['sidebar_second']): ?>
+  <div id="sidebar-right" class="column sidebar region grid-3">
+    <?php print render($page['sidebar_second']); ?>
+  </div>
+<?php endif; ?>
 
-  <div id="footer" class="prefix-1 suffix-1">
-    <?php if ($footer): ?>
-      <div id="footer-region" class="region grid-14 clear-block">
-        <?php print $footer; ?>
-      </div>
-    <?php endif; ?>
 
-    <?php if ($footer_message): ?>
-      <div id="footer-message" class="grid-14">
-        <?php print $footer_message; ?>
+  <div id="footer" class="prefix-1 suffix-1">
+    <?php if ($page['footer']): ?>
+      <div id="footer-region" class="region grid-14 clearfix">
+        <?php print render($page['footer']); ?>
       </div>
     <?php endif; ?>
   </div>
 
-
-  </div>
-  <?php print $closure; ?>
-</body>
-</html>
+</div>
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/ninesixty/template.php,v
retrieving revision 1.1.2.6.4.1
diff -u -p -r1.1.2.6.4.1 template.php
--- template.php	10 Jan 2011 21:30:11 -0000	1.1.2.6.4.1
+++ template.php	11 Jan 2011 00:57:37 -0000
@@ -1,21 +1,84 @@
 <?php
 // $Id: template.php,v 1.1.2.6.4.1 2011/01/10 21:30:11 dvessel Exp $
 
+/**
+ * The default group for NineSixty framework CSS files added to the page.
+ */
+define('CSS_NS_FRAMEWORK', -200);
+
+/**
+ * Implements hook_preprocess_html
+ */
+function ninesixty_preprocess_html(&$vars) {
+  $vars['classes_array'][] = 'show-grid';
+}
 
 /**
  * Preprocessor for page.tpl.php template file.
  */
 function ninesixty_preprocess_page(&$vars, $hook) {
+
   // For easy printing of variables.
-  $vars['logo_img']         = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
-  $vars['linked_logo_img']  = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
-  $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
-  $vars['main_menu_links']      = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
-  $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
-
-  // Make sure framework styles are placed above all others.
-  $vars['css_alt'] = ninesixty_css_reorder($vars['css']);
-  $vars['styles'] = drupal_get_css($vars['css_alt']);
+  $vars['logo_img'] = '';
+  if (!empty($vars['logo'])) {
+    $vars['logo_img'] = theme('image', array(
+      'path'  => $vars['logo'],
+      'alt'   => t('Home'),
+      'title' => t('Home'),
+    ));
+  }
+  $vars['linked_logo_img']  = '';
+  if (!empty($vars['logo_img'])) {
+    $vars['linked_logo_img'] = l($vars['logo_img'], '<front>', array(
+      'attributes' => array(
+        'rel'   => 'home',
+        'title' => t('Home'),
+      ),
+      'html' => TRUE,
+    ));
+  }
+  $vars['linked_site_name'] = '';
+  if (!empty($vars['site_name'])) {
+    $vars['linked_site_name'] = l($vars['site_name'], '<front>', array(
+      'attributes' => array(
+        'rel'   => 'home',
+        'title' => t('Home'),
+      ),
+    ));
+  }
+
+  // Site navigation links.
+  $vars['main_menu_links'] = '';
+  if (isset($vars['main_menu'])) {
+    $vars['main_menu_links'] = theme('links__system_main_menu', array(
+      'links' => $vars['main_menu'],
+      'attributes' => array(
+        'id' => 'main-menu',
+        'class' => array('inline', 'main-menu'),
+      ),
+      'heading' => array(
+        'text' => t('Main menu'),
+        'level' => 'h2',
+        'class' => array('element-invisible'),
+      ),
+    ));
+  }
+  $vars['secondary_menu_links'] = '';
+  if (isset($vars['secondary_menu'])) {
+    $vars['secondary_menu_links'] = theme('links__system_secondary_menu', array(
+      'links' => $vars['secondary_menu'],
+      'attributes' => array(
+        'id'    => 'secondary-menu',
+        'class' => array('inline', 'secondary-menu'),
+      ),
+      'heading' => array(
+        'text' => t('Secondary menu'),
+        'level' => 'h2',
+        'class' => array('element-invisible'),
+      ),
+    ));
+  }
+
 }
 
 /**
@@ -60,50 +123,39 @@ function ns() {
 }
 
 /**
+ * Implements hook_css_alter.
+ * 
  * This rearranges how the style sheets are included so the framework styles
  * are included first.
  *
  * Sub-themes can override the framework styles when it contains css files with
- * the same name as a framework style. This can be removed once Drupal supports
- * weighted styles.
+ * the same name as a framework style. This mirrors the behavior of the 6--1
+ * release of NineSixty warts and all. Future versions will make this obsolete.
  */
-function ninesixty_css_reorder($css) {
+function ninesixty_css_alter(&$css) {
   global $theme_info, $base_theme_info;
 
   // Dig into the framework .info data.
   $framework = !empty($base_theme_info) ? $base_theme_info[0]->info : $theme_info->info;
 
+  // Ensure framework CSS is always first.
+  $on_top = CSS_NS_FRAMEWORK;
+
   // Pull framework styles from the themes .info file and place them above all stylesheets.
   if (isset($framework['stylesheets'])) {
     foreach ($framework['stylesheets'] as $media => $styles_from_960) {
-      // Setup framework group.
-      if (isset($css[$media])) {
-        $css[$media] = array_merge(array('framework' => array()), $css[$media]);
-      }
-      else {
-        $css[$media]['framework'] = array();
-      }
       foreach ($styles_from_960 as $style_from_960) {
         // Force framework styles to come first.
         if (strpos($style_from_960, 'framework') !== FALSE) {
-          $framework_shift = $style_from_960;
-          $remove_styles = array($style_from_960);
+          $css[$style_from_960]['group'] = $on_top;
           // Handle styles that may be overridden from sub-themes.
-          foreach ($css[$media]['theme'] as $style_from_var => $preprocess) {
+          foreach (array_keys($css) as $style_from_var) {
             if ($style_from_960 != $style_from_var && basename($style_from_960) == basename($style_from_var)) {
-              $framework_shift = $style_from_var;
-              $remove_styles[] = $style_from_var;
-              break;
+              $css[$style_from_var]['group'] = $on_top;
             }
           }
-          $css[$media]['framework'][$framework_shift] = TRUE;
-          foreach ($remove_styles as $remove_style) {
-            unset($css[$media]['theme'][$remove_style]);
-          }
         }
       }
     }
   }
-
-  return $css;
 }
Index: styles/styles.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/ninesixty/styles/styles.css,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 styles.css
--- styles/styles.css	10 Jan 2011 21:19:20 -0000	1.1.2.2
+++ styles/styles.css	11 Jan 2011 00:57:37 -0000
@@ -14,27 +14,9 @@ h1#site-name {
   margin-bottom: 1.5em;
 }
 
-/*
-** Formatting for administration page
-**
-** The admin panel styles are a mess. IE has problems with this so this is
-** only a temporary fix. This should be fixed in core.
-*/
-div.admin-panel {
+ul.main-menu,
+ul.secondary-menu {
+  display: block;
+  margin: 0;
   padding: 0;
 }
-
-div.admin-panel .body {
-  padding: 0 !important;
-}
-
-div.admin .left,
-div.admin .right {
-  width: 50%;
-  margin-left: 0;
-  margin-right: 0;
-}
-
-div.admin .right .admin-panel {
-  margin-left: 10px;
-}
