 layouts/zen_page/zen-page.tpl.php | 131 ++++++++++++++++++++++++++++++++++++++
 layouts/zen_page/zen_page.css     |   1 +
 layouts/zen_page/zen_page.inc     |  25 ++++++++
 layouts/zen_page/zen_page.png     | Bin 0 -> 122 bytes
 template.php                      |  40 ++++++++++++
 templates/pane-header.tpl.php     |  41 ++++++++++++
 templates/pane-messages.tpl.php   |  36 +++++++++++
 templates/pane-navigation.tpl.php |  20 ++++++
 templates/panels-pane.tpl.php     |  58 +++++++++++++++++
 zen.info                          |   3 +
 10 files changed, 355 insertions(+)

diff --git a/layouts/zen_page/zen-page.tpl.php b/layouts/zen_page/zen-page.tpl.php
new file mode 100644
index 0000000..7135e60
--- /dev/null
+++ b/layouts/zen_page/zen-page.tpl.php
@@ -0,0 +1,131 @@
+<?php
+/**
+ * @file
+ * Zen theme's implementation to display a single Drupal page.
+ *
+ * Available variables:
+ *
+ * General utility variables:
+ * - $base_path: The base URL path of the Drupal installation. At the very
+ *   least, this will always default to /.
+ * - $directory: The directory the template is located in, e.g. modules/system
+ *   or themes/bartik.
+ * - $is_front: TRUE if the current page is the front page.
+ * - $logged_in: TRUE if the user is registered and signed in.
+ * - $is_admin: TRUE if the user has permission to access administration pages.
+ *
+ * Site identity:
+ * - $front_page: The URL of the front page. Use this instead of $base_path,
+ *   when linking to the front page. This includes the language domain or
+ *   prefix.
+ * - $logo: The path to the logo image, as defined in theme configuration.
+ * - $site_name: The name of the site, empty when display has been disabled
+ *   in theme settings.
+ * - $site_slogan: The slogan of the site, empty when display has been disabled
+ *   in theme settings.
+ *
+ * Navigation:
+ * - $main_menu (array): An array containing the Main menu links for the
+ *   site, if they have been configured.
+ * - $secondary_menu (array): An array containing the Secondary menu links for
+ *   the site, if they have been configured.
+ * - $secondary_menu_heading: The title of the menu used by the secondary links.
+ * - $breadcrumb: The breadcrumb trail for the current page.
+ *
+ * Page content (in order of occurrence in the default page.tpl.php):
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title: The page title, for use in the actual HTML content.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ * - $messages: HTML for status and error messages. Should be displayed
+ *   prominently.
+ * - $tabs (array): Tabs linking to any sub-pages beneath the current page
+ *   (e.g., the view and edit tabs when displaying a node).
+ * - $action_links (array): Actions local to the page, such as 'Add menu' on the
+ *   menu administration interface.
+ * - $feed_icons: A string of all feed icons for the current page.
+ * - $node: The node object, if there is an automatically-loaded node
+ *   associated with the page, and the node ID is the second argument
+ *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
+ *   comment/reply/12345).
+ *
+ * Regions:
+ * - $page['header']: Items for the header region.
+ * - $page['navigation']: Items for the navigation region, below the main menu (if any).
+ * - $page['help']: Dynamic help text, mostly for admin pages.
+ * - $page['highlighted']: Items for the highlighted content region.
+ * - $page['content']: The main content of the current page.
+ * - $page['sidebar_first']: Items for the first sidebar.
+ * - $page['sidebar_second']: Items for the second sidebar.
+ * - $page['footer']: Items for the footer region.
+ * - $page['bottom']: Items to appear at the bottom of the page below the footer.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_page()
+ * @see zen_preprocess_page()
+ * @see template_process()
+ */
+?>
+
+<div id="page">
+
+  <header id="header" role="banner">
+
+    <!-- $logo :: =pane-header.tpl.php -->
+
+    <!-- $site_name && $site_slogan :: =pane-header.tpl.php -->
+
+    <!-- $secondary_menu :: =pane-header.tpl.php -->
+
+    <?php print $content['header']; ?>
+
+  </header>
+
+  <div id="main">
+
+    <div id="content" class="column" role="main">
+      <?php print $content['highlighted']; ?>
+      <a id="main-content"></a>
+      <!-- render($title_prefix) :: ? -->
+      <!-- $title :: :: ? -->
+      <!-- render($title_suffix) :: ? -->
+      <!-- $breadcrumb :: <=pane-messages.tpl.php -->
+      <!-- $messages :: =pane-messages.tpl.php -->
+      <!-- render($tabs) :: <=panel-messages.tpl.php -->
+      <!-- render($page['help']) :: !=panel-messages.tpl.php -->
+      <!-- render($action_links) :: =panel-messages.tpl.php -->
+      <?php print $content['content']; ?>
+      <!-- $feed_icons :: ? -->
+    </div><!-- /#content -->
+
+    <div id="navigation">
+
+      <!-- $main_menu :: =pane-navigation.tpl.php -->
+
+      <?php print $content['navigation']; ?>
+
+    </div><!-- /#navigation -->
+
+    <?php
+      // Render the sidebars to see if there's anything in them.
+      $sidebar_first  = $content['sidebar_first'];
+      $sidebar_second = $content['sidebar_second'];
+    ?>
+
+    <?php if ($sidebar_first || $sidebar_second): ?>
+      <aside class="sidebars">
+        <?php print $sidebar_first; ?>
+        <?php print $sidebar_second; ?>
+      </aside><!-- /.sidebars -->
+    <?php endif; ?>
+
+  </div><!-- /#main -->
+
+  <?php print $content['footer']; ?>
+
+</div><!-- /#page -->
+
+<?php print $content['bottom']; ?>
diff --git a/layouts/zen_page/zen_page.css b/layouts/zen_page/zen_page.css
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/layouts/zen_page/zen_page.css
@@ -0,0 +1 @@
+
diff --git a/layouts/zen_page/zen_page.inc b/layouts/zen_page/zen_page.inc
new file mode 100644
index 0000000..b3973f2
--- /dev/null
+++ b/layouts/zen_page/zen_page.inc
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * zen_page.inc
+ * Plugin definition for Zen page layout.
+ */
+// Plugin definition
+$plugin = array(
+  'title' => t('Site template: Zen page'),
+  'category' => t('Site'),
+  'icon' => 'zen_page.png',
+  'css' => 'zen_page.css',
+  'theme' => 'zen_page',
+  'regions' => array(
+	'header' => t('Header'),
+	'highlighted' => t('Highlighted'),
+	//'help' => t('Help'),
+	'content' => t('Content'),
+	'navigation' => t('Navigation'),
+	'sidebar_first' => t('Sidebar: First'),
+	'sidebar_second' => t('Sidebar: Second'),
+	'footer' => t('Footer'),
+	'bottom' => t('Bottom'),
+  ),
+);
diff --git a/layouts/zen_page/zen_page.png b/layouts/zen_page/zen_page.png
new file mode 100644
index 0000000..176ed69
Binary files /dev/null and b/layouts/zen_page/zen_page.png differ
diff --git a/template.php b/template.php
index 61a1f8f..4ecf3e1 100644
--- a/template.php
+++ b/template.php
@@ -692,3 +692,43 @@ function zen_mark($variables) {
     return ' <mark class="updated">' . t('updated') . '</mark>';
   }
 }
+
+/**
+ * Override Pane Header in Panels.
+ */
+function zen_preprocess_pane_header(&$vars) {
+  $vars['title'] = drupal_get_title();
+  $vars['front_page'] = url();
+  $vars['logo'] = theme_get_setting('logo');
+  $vars['site_name'] = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
+  $vars['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
+  //$vars['secondary_menu'] = menu_secondary_menu();
+  $vars['secondary_menu'] = theme('links__system_secondary_menu', array(
+    'links' => $vars['secondary_menu'],
+    'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix', 'inline')),
+    'heading' => array('text' => 'Secondary menu', 'level' => 'h2', 'class' => array('element-invisible'))
+  ));
+}
+
+/**
+ * Override Pane Messages in Panels.
+ */
+function zen_preprocess_pane_messages(&$vars) {
+  $vars['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
+  $vars['messages'] = theme('status_messages');
+  $vars['tabs'] = menu_local_tabs();
+  $vars['help'] = theme('help');
+  $vars['action_links'] = menu_local_actions();
+}
+
+/**
+ * Override Pane Navigation in Panels.
+ */
+function zen_preprocess_pane_navigation(&$vars) {
+  //$vars['main_menu'] = menu_main_menu();
+  $vars['main_menu'] = theme('links__system_main_menu', array(
+    'links' => $vars['main_menu'],
+    'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix', 'inline')),
+    'heading' => array('text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'))
+  ));
+}
diff --git a/templates/pane-header.tpl.php b/templates/pane-header.tpl.php
new file mode 100644
index 0000000..fa5a0d3
--- /dev/null
+++ b/templates/pane-header.tpl.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * @file
+ *
+ * Theme implementation to display the header block on a Drupal page.
+ *
+ * This utilizes the following variables thata re normally found in
+ * page.tpl.php:
+ * - $front_page
+ * - $logo
+ * - $site_name
+ * - $site_slogan
+ * - $secondary_menu
+ *
+ * Additional items can be added via theme_preprocess_pane_header(). See
+ * template_preprocess_pane_header() for examples.
+ */
+?>
+<?php if (!empty($logo)): ?>
+  <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>
+<?php endif; ?>
+
+<?php if ($site_name || $site_slogan): ?>
+  <hgroup id="name-and-slogan">
+    <?php if ($site_name): ?>
+      <h1 id="site-name">
+        <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+      </h1>
+    <?php endif; ?>
+
+    <?php if (!empty($site_slogan)): ?>
+      <h2 id="site-slogan"><?php print $site_slogan; ?></h2>
+    <?php endif; ?>
+  </hgroup><!-- /#name-and-slogan -->
+<?php endif; ?>
+
+<?php if (!empty($secondary_menu)): ?>
+  <nav id="secondary-menu" role="navigation">
+    <?php print $secondary_menu; ?>
+  </nav>
+<?php endif; ?>
diff --git a/templates/pane-messages.tpl.php b/templates/pane-messages.tpl.php
new file mode 100644
index 0000000..2a69866
--- /dev/null
+++ b/templates/pane-messages.tpl.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * @file
+ *
+ * Theme implementation to display the messages area, which is normally
+ * included roughly in the content area of a page.
+ *
+ * This utilizes the following variables thata re normally found in
+ * page.tpl.php:
+ * - $breadcrumb
+ * - $messages
+ * - $tabs
+ * - $help
+ * - $action_links
+ *
+ * Additional items can be added via theme_preprocess_pane_messages(). See
+ * template_preprocess_pane_messages() for examples.
+ */
+?>
+<?php if (!empty($breadcrumb)): ?>
+  <div id="breadcrumb">
+    <?php print $breadcrumb; ?>
+  </div>
+<?php endif; ?>
+<?php print $messages; ?>
+<?php if (!empty($tabs)): ?>
+  <div class="tabs">
+    <?php print render($tabs); ?>
+  </div>
+<?php endif; ?>
+<?php print $help; ?>
+<?php if ($action_links): ?>
+  <ul class="action-links">
+    <?php print render($action_links); ?>
+  </ul>
+<?php endif; ?>
diff --git a/templates/pane-navigation.tpl.php b/templates/pane-navigation.tpl.php
new file mode 100644
index 0000000..c72d279
--- /dev/null
+++ b/templates/pane-navigation.tpl.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * @file
+ *
+ * Theme implementation to display the messages area, which is normally
+ * included roughly in the content area of a page.
+ *
+ * This utilizes the following variables thata re normally found in
+ * page.tpl.php:
+ * - $main_menu
+ *
+ * Additional items can be added via theme_preprocess_pane_messages(). See
+ * template_preprocess_pane_messages() for examples.
+ */
+?>
+<?php if (!empty($main_menu)): ?>
+  <nav id="main-menu" role="navigation">
+    <?php print $main_menu; ?>
+  </nav>
+<?php endif; ?>
diff --git a/templates/panels-pane.tpl.php b/templates/panels-pane.tpl.php
new file mode 100644
index 0000000..93dd113
--- /dev/null
+++ b/templates/panels-pane.tpl.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * @file panels-pane.tpl.php
+ * Main panel pane template
+ *
+ * Variables available:
+ * - $pane->type: the content type inside this pane
+ * - $pane->subtype: The subtype, if applicable. If a view it will be the
+ *   view name; if a node it will be the nid, etc.
+ * - $title: The title of the content
+ * - $content: The actual content
+ * - $links: Any links associated with the content
+ * - $more: An optional 'more' link (destination only)
+ * - $admin_links: Administrative links associated with the content
+ * - $feeds: Any feed icons or associated with the content
+ * - $display: The complete panels display object containing all kinds of
+ *   data including the contexts and all of the other panes being displayed.
+ */
+?>
+<?php if ($pane_prefix): ?>
+  <?php print $pane_prefix; ?>
+<?php endif; ?>
+<div class="<?php print $classes; ?>" <?php print $id; ?>>
+  <?php if ($admin_links): ?>
+    <?php print $admin_links; ?>
+  <?php endif; ?>
+
+  <?php print render($title_prefix); ?>
+  <?php if ($title): ?>
+    <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
+  <?php endif; ?>
+  <?php print render($title_suffix); ?>
+
+  <?php if ($feeds): ?>
+    <div class="feed">
+      <?php print $feeds; ?>
+    </div>
+  <?php endif; ?>
+
+  <div class="pane-content">
+    <?php print render($content); ?>
+  </div>
+
+  <?php if ($links): ?>
+    <div class="links">
+      <?php print $links; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($more): ?>
+    <div class="more-link">
+      <?php print $more; ?>
+    </div>
+  <?php endif; ?>
+</div>
+<?php if ($pane_suffix): ?>
+  <?php print $pane_suffix; ?>
+<?php endif; ?>
diff --git a/zen.info b/zen.info
index d05cf14..047fcbc 100644
--- a/zen.info
+++ b/zen.info
@@ -32,3 +32,6 @@ settings[zen_html5_respond_meta][] = html5
 settings[zen_html5_respond_meta][] = meta
 settings[zen_rebuild_registry]     = 0
 settings[zen_wireframes]           = 0
+
+; Add support for Panels Everywhere Page template
+plugins[panels][layouts] = layouts
