diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-12-15 20:47:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-12-15 20:47:18 +0000 |
commit | 4a526ca752c676692bb301669b0bf507211369d3 (patch) | |
tree | a94aa7efda1d2b3c1d09191bf1a338a029f167af | |
parent | eadda128aa5490f25087ff988a6f86932cf203af (diff) | |
download | brdo-4a526ca752c676692bb301669b0bf507211369d3.tar.gz brdo-4a526ca752c676692bb301669b0bf507211369d3.tar.bz2 |
- Added a new theme derived from Kristjan's styleswitcher theme.
-rw-r--r-- | themes/chameleon/chameleon.theme | 140 | ||||
-rw-r--r-- | themes/chameleon/default.css | 100 | ||||
-rw-r--r-- | themes/chameleon/images/druplicon-watermark.png | bin | 0 -> 2454 bytes | |||
-rw-r--r-- | themes/chameleon/images/marvin-bullet.png | bin | 0 -> 210 bytes | |||
-rw-r--r-- | themes/chameleon/images/pure-background.gif | bin | 0 -> 594 bytes | |||
-rw-r--r-- | themes/chameleon/marvin.css | 103 | ||||
-rw-r--r-- | themes/chameleon/pure.css | 75 |
7 files changed, 418 insertions, 0 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme new file mode 100644 index 000000000..4ed275139 --- /dev/null +++ b/themes/chameleon/chameleon.theme @@ -0,0 +1,140 @@ +<?php + +// $Id$ + +function chameleon_help($section) { + + $output = ''; + + switch ($section) { + case 'admin/system/themes#description': + $output = t('A fast PHP theme with different stylesheets.'); + break; + } + + return $output; +} + +function chameleon_settings() { + + /* + ** Compile a list of the available style sheets: + */ + + $fd = opendir('themes/chameleon'); + while ($file = readdir($fd)) { + if (strstr($file, 'css') && $file != 'default.css') { + $files["themes/chameleon/$file"] = "themes/chameleon/$file"; + } + } + + $output = form_select(t('CSS stylesheet'), 'chameleon_stylesheet', variable_get('chameleon_stylesheet', 'themes/chameleon/default.css'), $files, t('Selecting a different stylesheet will change the look and feel of your site.')); + + return $output; +} + +function chameleon_header($title = "") { + + $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; + $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n"; + $output .= "<head>\n"; + $output .= " <title>". ($title ? $title ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n"; + $output .= theme_head(); + $output .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"themes/chameleon/default.css\" />\n"; + $output .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"". variable_get("chameleon_stylesheet", "themes/chameleon/default.css") ."\" />\n"; + $output .= "</head>"; + $output .= "<body ". theme_onload_attribute() .">\n"; + $output .= " <div id=\"header\">"; + $output .= " <h1 class=\"title\">". l(variable_get("site_name", "drupal"), ""). "</h1>"; + $output .= " </div>\n"; + + $output .= " <table>\n"; + $output .= " <tr>\n"; + + if ($blocks = theme_blocks("left")) { + $output .= " <td id=\"sidebar-left\">$blocks</td>\n"; + } + + $output .= " <td id=\"main\">\n"; + + if ($title = drupal_get_title()) { + $output .= theme("breadcrumb", drupal_get_breadcrumb()); + $output .= "<h2>$title</h2>"; + } + + if ($help = menu_get_active_help()) { + $output .= "<small>$help</small><hr />"; + } + + if ($message = drupal_get_message()) { + $output .= "<b>". t("Status") ."</b>: ". $message->message ."<hr />"; + } + + return $output; +} + +function chameleon_node($node, $main = 0, $page = 0) { + + $output = "<div class=\"node\">\n"; + + if (!$page) { + $output .= " <h2 class=\"title\">". ($main ? l($node->title, "node/view/$node->nid") : $node->title) ."</h2>\n"; + } + + $output .= " <div class=\"content\">\n"; + + if ($main && $node->teaser) { + $output .= $node->teaser; + } + else { + $output .= $node->body; + } + + $output .= " </div>\n"; + + $submitted = array(t("By %author at %date", array('%author' => format_name($node), '%date' => format_date($node->created, 'small')))); + + if (module_exist('taxonomy')) { + $terms = taxonomy_link("taxonomy terms", $node); + } + + if ($links = link_node($node, $main)) { + $output .= " <div class=\"links\">". theme('links', array_merge($submitted, $terms, $links)) ."</div>\n"; + } + + $output .= "</div>\n"; + + return $output; +} + +function chameleon_comment($comment, $link = "") { + + $date = array(format_date($comment->timestamp, 'small')); + $links = array($link); + + $output = "<div class=\"comment\">\n"; + $output .= " <h3 class=\"title\">". $comment->subject ."</h3>\n"; + $output .= " <div class=\"content\">". $comment->comment ."</div>\n"; + $output .= " <div class=\"links\">". theme('links', array_merge($date, $links)) ."</div>\n"; + $output .= "</div>\n"; + + return $output; +} + +function chameleon_footer() { + + $output = " </td>\n"; + + if ($blocks = theme_blocks("right")) { + $output .= " <td id=\"sidebar-right\">$blocks</td>\n"; + } + + $output .= " </tr>\n"; + $output .= " </table>\n"; + $output .= theme_closure(); + $output .= " </body>\n"; + $output .= "</html>\n"; + + return $output; +} +?> diff --git a/themes/chameleon/default.css b/themes/chameleon/default.css new file mode 100644 index 000000000..180f86ac7 --- /dev/null +++ b/themes/chameleon/default.css @@ -0,0 +1,100 @@ +/* $Id$ */ + +/* HTML tags */ +a, a:link, a:active { + font-weight: bold; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +body { + margin: 0; + padding: 3em; + font-family: arial, helvetica, sans-serif; + font-size: .9em; + line-height: 1.3em; +} +blockquote { + font-style: italic; +} +table { + margin: 0; + padding: .5em; + border-collapse: collapse; +} +hr { + height: 1px; + border: 1px solid gray; +} +code, pre { + font-size: 1em; +} +pre { + font-size: 0.8em; + padding: 1em; + background: #eee; +} +li { + padding-bottom: .3em; +} +img { + border: 0; +} +h1, h2, h3, h4, h5, h6 { + margin-bottom: .25em; +} +h1 { + font-size: 1.3em; +} +h2 { + font-size: 1.2em; +} +h3 { + font-size: 1.1em; +} +h4, h5, h6 { + font-size: 1em; +} +p { + margin: 0 0 .5em 0; +} +br { + line-height: 0.6em; +} + +/* regions */ +#header { + margin-bottom: 2em; +} +#sidebar-left, #sidebar-right { + vertical-align: top; + padding: 10px; +} +#main { + padding-left: 1em; + padding-right: 1em; + vertical-align: top; + width: 60%; +} + +/* region-specific tags */ +.title { + margin: 0 0 .25em 0; +} +.content { + margin: 0 0 .5em 0; +} +.links { + font-size: 0.8em; + line-height: 1.25em; +} +.block { + width: 180px; +} + +/* modules definitions */ +.form-item textarea { + font-size: 1em; +} + diff --git a/themes/chameleon/images/druplicon-watermark.png b/themes/chameleon/images/druplicon-watermark.png Binary files differnew file mode 100644 index 000000000..4f91cd380 --- /dev/null +++ b/themes/chameleon/images/druplicon-watermark.png diff --git a/themes/chameleon/images/marvin-bullet.png b/themes/chameleon/images/marvin-bullet.png Binary files differnew file mode 100644 index 000000000..937c8ed05 --- /dev/null +++ b/themes/chameleon/images/marvin-bullet.png diff --git a/themes/chameleon/images/pure-background.gif b/themes/chameleon/images/pure-background.gif Binary files differnew file mode 100644 index 000000000..13e3631da --- /dev/null +++ b/themes/chameleon/images/pure-background.gif diff --git a/themes/chameleon/marvin.css b/themes/chameleon/marvin.css new file mode 100644 index 000000000..4a2403057 --- /dev/null +++ b/themes/chameleon/marvin.css @@ -0,0 +1,103 @@ +/* $Id$ */ +body { + background: #fff url(images/druplicon-watermark.png) no-repeat top right; +} +a:link { + color: #656 +} +a:visited { + color: #656 +} +a:active { + color: #ccc +} +h2 { + background-color: #eaeaea; + border: solid 1px #777; + font-size: 1.1em; + margin: 0.5em 0em 0.5em 0em; + padding: 0.5em; +} +h2.title { + background-color: #fff; + border: solid 1px #888; + margin-top: 1em; +} +p { + margin: 0 1em 1em 0; + padding: 0; +} +img { + border-width: 0; +} +table { + font-size: 1em; +} +#main { + width: 80%; +} +.block { + margin-bottom: 10px; + font-size: 0.9em; +} +.block .content { + border: solid 1px #888; + border-top: none; + margin: 0; + padding: 5px; +} +.block h2.title { + margin: 0; +} + +.calendar .day-today { + background-color: #ccc; +} +.calendar .day-selected { + background-color: #bbb; +} +.calendar .header-month { + background-color: #ddd; +} +.calendar .header-week { + background-color: #ccc; +} +.calendar .day-blank { + background-color: #ddd; +} +.calendar .day-link a { + color: #000; +} +.calendar .row-week { + color: #aaa; +} +.comment { + border: solid 1px #777; + margin: 0.5em 0 0.5em 0; + padding: 0.5em; +} +.item-list ul li { + list-style-image: url(images/marvin-bullet.png); +} +.path, .path a, .path a:visited { + color: #888; +} +.node .submitted { + color: #7c7c7c; + font-size: 0.9em; + float: left; + padding: 0.5em 0em 0.5em 1em; +} +.node .taxonomy { + color: #7c7c7c; + font-size: 0.9em; + float: right; +} +.node .content { + clear: both; + padding-left: 1em; +} +.node .links { + padding: 1em; +} + diff --git a/themes/chameleon/pure.css b/themes/chameleon/pure.css new file mode 100644 index 000000000..bd2422310 --- /dev/null +++ b/themes/chameleon/pure.css @@ -0,0 +1,75 @@ +/* $Id$ */ + +/* HTML styles */ + +a, a:link, a:active { + color: #930; +} +a:visited { + color: #630; +} +body { + padding: 5em 0 0 3em; + background-image: url(images/pure-background.gif); + background-repeat: repeat-x; + font-family: tahoma, verdana, arial, helvetica; + border-top: 10px solid gray; +} +ul { + list-style-type: disc; +} + +/* Regions */ + +#main { + width: 500px; +} +#sidebar-left { + border-right: 1px solid gray; +} +#sidebar-right { + border-left: 1px solid gray; +} +#header .title { + font-size: 2em; + font-weight: bold; +} +#header .title a, +#header .title a:link, +#header .title a:visited, +#header .title a:active { + text-decoration: none; + color: #aaa; +} +#header .title a:hover { + color: #930; +} +.item-list ul li { + list-style: square; +} +.node .title { + font-size: 1.2em; +} +.node .title a, +.node .title a:link, +.node .title a:active, +.node .title a:visited { + text-decoration: none; + font-weight: normal; +} +.node .title a:hover { + text-decoration: underline; +} +.links { + margin: 1em 0 3em 0; + text-align: right; + } +.comment .content, .block .content, .menu { + font-size: 0.9em; +} +.block { + padding-bottom: 1em; +} +.block .title { + font-size: 1em; +} |