summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnAlbin2007-11-27 23:30:34 (GMT)
committer JohnAlbin2007-11-27 23:30:34 (GMT)
commit2966340bacf23ab8f635a36dc6e1fcc4bc7b329e (patch)
treea59744ec81704bf9a230b977bc1c8ddf8131fec3
parentc6a2938301e52e07e97ae744b2a26252753d471b (diff)
Moved current regions and current layout.css and print.css stylesheets to zen_classic.
-rw-r--r--zen_classic/layout.css99
-rw-r--r--zen_classic/print.css68
-rw-r--r--zen_classic/template.php21
3 files changed, 186 insertions, 2 deletions
diff --git a/zen_classic/layout.css b/zen_classic/layout.css
new file mode 100644
index 0000000..cbe7b70
--- /dev/null
+++ b/zen_classic/layout.css
@@ -0,0 +1,99 @@
+/* $Id$ */
+
+/*
+ * LAYOUT STYLES
+ *
+ * Define CSS classes to create a table-free,
+ * 3-column, 2-column, or single column layout
+ * depending on whether blocks are enabled in the
+ * left or right columns.
+ */
+
+#container {
+ margin: 0 auto;
+ /*padding: 0 20px;*/
+ max-width: 1270px;
+}
+
+/* With 3 columns, require a minimum width of 1000px to ensure there is enough horizontal space. */
+body.two-sidebars {
+ /*min-width: 980px;*/
+}
+/* With 2 columsn, require a minimum width of 800px. */
+body.sidebar-left, body.sidebar-right {
+ /*min-width: 780px;*/
+}
+
+/* We must define 100% width to avoid the body being too narrow for near-empty pages */
+#main {
+ float: left;
+ width: 100%;
+}
+
+/* So we move the #main container over the sidebars to compensate */
+body.sidebar-left #main,
+body.two-sidebars #main {
+ margin-left: -210px;
+}
+body.sidebar-right #main,
+body.two-sidebars #main {
+ margin-right: -210px;
+}
+
+#squeeze {
+ position: relative;
+ padding: 0 1em;
+}
+
+/* And add blanks left and right for the sidebars to fill */
+body.sidebar-left #squeeze,
+body.two-sidebars #squeeze {
+ margin-left: 210px;
+}
+body.sidebar-right #squeeze,
+body.two-sidebars #squeeze {
+ margin-right: 210px;
+}
+
+/* We ensure the sidebars are still clickable using z-index */
+#container #sidebar-left {
+ width: 210px;
+}
+#container #sidebar-right {
+ width: 210px;
+}
+#container .sidebar {
+ margin: 0;
+ float: left;
+ z-index: 2;
+ position: relative;
+}
+
+/* Ensure long text or wide images don't break IE6 layout. */
+#page, #header, #footer, #squeeze, #container .sidebar {
+ _overflow: hidden;
+ _overflow-y: visible;
+ word-wrap: break-word; /* A very nice CSS3 property */
+}
+
+#container .sidebar .block {
+ margin: 0 0 1.5em 0;
+}
+
+#sidebar-left .block {
+ padding: 0 15px 0 0;
+}
+
+#sidebar-right .block {
+ padding: 0 0 0 15px;
+}
+
+.block .content {
+ margin: 0.5em 0;
+}
+
+#footer {
+ float: none;
+ clear: both;
+ margin: 4em 0 -3em;
+}
diff --git a/zen_classic/print.css b/zen_classic/print.css
new file mode 100644
index 0000000..5d9f744
--- /dev/null
+++ b/zen_classic/print.css
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* white background, black text, arial font, decent font size */
+body, node.content {
+ background-color: #fff;
+ color: #000;
+ font-family: Arial, Helvetica, "Bitstream Vera Sans", sans-serif;
+ font-size: 12pt;
+ width: 100%;
+}
+
+#page {
+ margin: 0;
+ width: 90%;
+}
+
+#squeeze {
+ margin: 0;
+ width: 100%;
+}
+
+/* underline all links */
+a:link, a:visited {
+ color: #520;
+ background: transparent;
+ text-decoration: underline !important;
+}
+
+/* don't underline header */
+#header a:link, #header a:visited {
+ text-decoration: none !important;
+}
+
+/* CSS2 selector to add visible href after links */
+#main a:link:after, #main a:visited:after,
+.content a:link:after, .content a:visited:after {
+ content: " (" attr(href) ") ";
+ font-size: 80%;
+ font-weight: normal;
+}
+
+/* don't float floating things */
+#main, #container .sidebar {
+ float: none;
+ width: 100%;
+}
+
+.submitted {
+ color: #000;
+ font-family: "Times New Roman", "Bitstream Vera Serif", Garamond, serif;
+ font-size: 10pt;
+}
+
+html body {
+ background: transparent;
+ width: auto;
+}
+
+/* Hide sidebars and nav elements */
+#skip-nav, #primary, #secondary, #sidebar-left, #sidebar-right, #search, #tabs, #menu, #mission, #footer-wrapper,
+.book-navigation, .tabs, .links, .breadcrumb, .taxonomy, .pager, .feed-icon, .forum-topic-navigation {
+ visibility: hidden;
+ display: none;
+}
+
+#logo-title {
+ margin: 20pt 20pt 0 20pt;
+}
diff --git a/zen_classic/template.php b/zen_classic/template.php
index 1419f81..c2eed4e 100644
--- a/zen_classic/template.php
+++ b/zen_classic/template.php
@@ -39,6 +39,23 @@ include_once './'. drupal_get_path('theme', 'zen') .'/template.php';
/**
+ * Declare the available regions implemented by this theme.
+ *
+ * @return
+ * An array of regions.
+ */
+function zen_classic_regions() {
+ return array(
+ 'left' => t('left sidebar'),
+ 'right' => t('right sidebar'),
+ 'content_top' => t('content top'),
+ 'content_bottom' => t('content bottom'),
+ 'header' => t('header'),
+ 'footer' => t('footer'),
+ );
+}
+
+/**
* Intercept template variables
*
* @param $hook
@@ -52,10 +69,10 @@ function zen_variables($hook, $vars) {
switch ($hook) {
case 'page':
// Add main Zen styles.
- drupal_add_css($vars['directory'] .'/layout.css', 'theme', 'all');
drupal_add_css($vars['directory'] .'/tabs.css', 'theme', 'all');
- drupal_add_css($vars['directory'] .'/print.css', 'theme', 'print');
// Then add styles for this sub-theme.
+ drupal_add_css($vars['subtheme_directory'] .'/layout.css', 'theme', 'all');
+ drupal_add_css($vars['subtheme_directory'] .'/print.css', 'theme', 'print');
drupal_add_css($vars['subtheme_directory'] .'/zen-classic.css', 'theme', 'all');
drupal_add_css($vars['subtheme_directory'] .'/icons.css', 'theme', 'all');
// Optionally add the fixed width CSS file.