Browse Source

2006-08-15 Initial version.

- http://blog.riff.org/2006_08_15_nested_a_drupal_theme_without_columns
- Abandoned on 2006-10-15.
- Unknown changes applied on 2007-12-24. Probably not much.
Frédéric G. MARAND 12 years ago
commit
b873db9de1
4 changed files with 318 additions and 0 deletions
  1. 214 0
      nested.css
  2. 10 0
      node.tpl.php
  3. 94 0
      page.tpl.php
  4. 0 0
      template.php

+ 214 - 0
nested.css

@@ -0,0 +1,214 @@
+/**
+ * Order of properties, for easier readability:
+ * 1 dimensions: width, height
+ * 2 layout: display, position, float, clear, text-align, vertical-align, visibility, z-index
+ * 3 spacing: margin*, padding*, overflow
+ * 4 colors: border*, *color
+ * 5 text: letter-spacing, line-height, white-space, word-spacing
+ * 6 fonts: font-family, font-weight, font-style, font-size, text-decoration, text-transform,
+ *
+ * Palette (unofficial names):
+ * Version 1: F7F7FF for backgrounds, E0E0EF for borders, black and white
+ * FF4C00 Orange
+ * 260DA3 Deep blue
+ * D8FF7F Almond
+ * B2FF00 Chartreuse
+ * 6458A3 Medium blue
+ */
+
+body {
+  background-color: white;
+  margin: 0.5%;
+  font-family: sans-serif;
+  }
+
+div#logo { /* top left of header */
+  float: left;
+  margin 0 0 0 0.5em;
+  }
+
+div#header { /* General header, full page width, contains #slogname and #menu */
+  width: 99%; /* of body */
+  margin: 0 0.5%; /* *2 + 99% = 100% of body */
+  overflow: hidden; /* so that #slogname is not clipped */
+  border-bottom: ridge #260DA3;
+  background-color: #6458A3;
+  }
+
+div#header div {
+  border: none ;
+  }
+
+div#slogname { /* site slogan and name, floated left */
+  float: left;
+  margin: 0 0 0 0.5em;
+  padding: 0 ;
+  }
+
+div#header a {
+  color: #D8FF7F;
+  text-decoration: none;
+  }
+
+div#slogname .site-name {
+  margin: 0;
+  font-size: 180% ;
+  font-weight: bolder;
+  }
+
+div#slogname .site-slogan {
+  color: #D8FF7F;
+  margin: 0 0 0.2em 0;
+  font-size: 120% ;
+  font-style: italic;
+  }
+
+div#menu { /* Primary+secondary links and search box, floated right */
+  float: right;
+  margin: 0 0.5em 0 0 ;
+  padding: 0.5em 0 0 0 ;
+  }
+
+div#primary {
+  margin-top: 0.1em;
+  margin-bottom: 0.1em;
+  }
+
+div#menu #search { /* Search block, when present in header only */
+  margin: 0.5em 0 0 0;
+  text-align: right;
+  }
+
+div#header-content { /* Central content in header */
+  overflow: hidden;
+  text-align: center;
+  }
+
+div#header-content h2 {
+  margin-top: 0; margin-bottom: 0;
+  font-size: 100%;
+  }
+
+div#content { /* main content area */
+  width: 99%;
+  margin: 0 0.5%;
+  overflow: hidden;
+  background-color: transparent;
+  }
+
+div#main {
+  margin: 0;
+  overflow: hidden;
+  }
+
+div#sidebar-left {
+  float: left;
+  margin: 0 0.5em 0.2em 0;
+  padding: 0 0 0.2em 0.2em;
+  border-right: ridge #260DA3;
+  border-bottom: ridge #260DA3;
+  background-color: #f7f7ff;
+  font-family: "arial narrow";
+  font-size: 90%;
+  /* letter-spacing: -1px; */
+  line-height: 90%;
+  }
+
+div#sidebar-right {
+  float: right;
+  margin: 0 0 0.2em 0.5em;
+  padding: 0 0.2em 0.2em 0.2em;
+  border-left: ridge #260DA3;
+  border-bottom: ridge #260DA3;
+  background-color: #f7f7ff;
+  font-family: "arial narrow";
+  /*font-size: 90%;  */
+  line-height: 90%;
+  width: 17em; /* kludge for the table in archive  module */
+  }
+
+div#footer {
+  padding: 0.2em;
+  border-top: ridge #260DA3;
+  background-color: #f7f7ff;
+  font-size: 80%;
+  }
+
+div#footer img {
+  height: 16px;
+  }
+
+div.block-archive {
+  width: 17em;
+  padding: 0.1em 0 0 0; // Prevents MSIE6 from not allocating enough height for H2
+  }
+
+div.block-archive content {
+  margin: 0 0 0 auto;
+  }
+
+.read-more {
+  background-color: #FF4C00;
+  color: white;
+  text-decoration: none;
+  padding: 0 0.5em 0.1em 0.5em;
+  }
+
+.calendar table {
+  width:14em ; /* 7 days a week, 1 to 31. Drupal.css defaults to 100% which is interpreted as 100 of the page instead of the container */
+  margin: 0 auto 0 auto;
+  text-align: center;
+  }
+
+.calendar table caption {
+  margin-bottom: 0.2em;
+  }
+
+.calendar .day-link {
+  background-color: #D8FF7F;
+  }
+
+div.node {
+  background-color: #e0e0ef;
+  margin: 0;
+  padding-bottom: 0.3em;
+  }
+
+div.tabs {
+  border-bottom: ridge #d8ff7f;
+  }
+
+div.profile {
+  clear: none;
+  }
+
+h2.title>* { /* titles for articles in lists: selecting the (inline) text within the h2 */
+  background-color: #D8FF7F;
+  border-bottom: ridge #B2FF00;
+  color: #6458A3;
+  padding: 0.2em 0.5em;
+  font-size: 80%;
+  text-decoration: none;
+  cursor: help;
+  }
+
+h1.title {
+  background-color: #efefef;
+  border-bottom: ridge #b2FF00;
+  }
+
+.codeblock {
+  border: 1px solid #CCC;
+  background-color: #EEE;
+  }
+
+pre.codeblock {
+  font-size: 80%;
+  padding: 0.5em;
+  margin: 0.5em;
+  border: #ccc inset thin;
+  }
+span.codeblock {
+  display: inline;
+  padding: 0 0.5em;
+  }

+ 10 - 0
node.tpl.php

@@ -0,0 +1,10 @@
+  <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
+    <?php if ($picture) {
+      print $picture;
+    }?>
+    <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
+    <span class="submitted"><?php print $submitted?></span>
+    <span class="taxonomy"><?php print $terms?></span>
+    <div class="content"><?php print $content?></div>
+    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
+  </div>

+ 94 - 0
page.tpl.php

@@ -0,0 +1,94 @@
+<!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"
+  lang="<?php print $language ?>"
+  xml:lang="<?php print $language ?>">
+<!--
+  | Copyright 2006 Frederic G. MARAND
+  | Licensed under the GPL version 2.0
+  -->
+  <head>
+    <title><?php print $head_title ?></title>
+    <?php print $head ?>
+    <?php print $styles ?>
+    <script type="text/javascript"><?php /*  avoid Flash of Unstyle Content in IE */ ?></script>
+    <link rel="stylesheet" type="text/css" href="/themes/nested/nested.css" />
+    </head>
+
+  <body>
+    <div id="bodyguard">
+      <div id="header">
+        <div id="logo"><?php
+          if ($logo)
+            {
+            echo '<a href="' . $base_path . '" title="' . t('Home') . '">'
+              . '<img src="' . $logo . '" alt="' . t('Home') . "\" /></a>\n";
+            }
+          ?>
+          </div>
+        <div id="slogname"><?php
+          if ($site_name)   { echo '<h1 class="site-name">' . l($site_name, $base_url) . "</h1>\n"; }
+          if ($site_slogan) { echo "<div class=\"site-slogan\">$site_slogan</div>\n"; }
+          ?>
+          </div>
+        <div id="menu"><?php
+          if (isset($primary_links))
+            {
+            echo '<div id="primary">'
+               . theme('links', $primary_links)
+               . "</div>\n" ;
+            }
+          if (isset($secondary_links))
+            {
+            echo '<div id="secondary">'
+               . theme('links', $secondary_links)
+               . "</div>\n" ;
+            }
+          echo $search_box;
+          ?>
+          </div>
+        <?php
+        if ($header)
+          {
+          echo '<div id="header-content">' . $header . '</div>';
+          }
+        ?>
+        </div><!--/header-->
+      <div id="content">
+        <div id="main">
+          <?php
+          if ($sidebar_left)
+            {
+            echo "<div id=\"sidebar-left\">$sidebar_left</div>\n";
+            }
+          if ($sidebar_right)
+            {
+            echo "<div id=\"sidebar-right\">$sidebar_right</div>\n";
+            }
+          if ($mission)
+            {
+            echo "<div id=\"mission\">$mission</div>\n" ;
+            }
+          echo $breadcrumb;
+          if ($title)
+            {
+            echo "<h1 class=\"title\">$title</h1>\n";
+            }
+          if ($tabs)
+            {
+            echo "<div class=\"tabs\">$tabs</div>\n";
+            }
+          echo "$help\n";
+          echo "$messages\n";
+          echo "$content\n";
+          ?>
+          </div>
+        </div>
+      </div><!-- main div-->
+    <div id="footer">
+      <?php echo $footer_message ?>
+      </div>
+    <?php print $closure ?>
+    </body>
+  </html>

+ 0 - 0
template.php