Commit 89271513 authored by Dries's avatar Dries

- Some first theme Marvin improvements: better CSS, less tables.  Borrowed some from
  marvin_2k and styleswitcher.  More to come.
parent d33f3973
......@@ -7,11 +7,24 @@ body {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 76%;
}
a:link {
color: #656
}
a:visited {
color: #656
}
a:active {
color: #ccc
}
h1 {
font-size: 1.2em;
}
h2 {
background-color: #eaeaea;
border: solid 1px #777;
font-size: 1.1em;
margin: 0.5em 0em 0.5em 0em;
padding: 0.5em;
}
h3, h4, h5, h6 {
font-size: 1em;
......@@ -20,7 +33,7 @@ table {
width: 100%;
}
p {
margin: 0 0 1em 0;
margin: 0 1em 1em 0;
padding: 0;
}
img {
......@@ -50,20 +63,51 @@ table {
.calendar .row-week {
color: #aaa;
}
.item-list ul li {
list-style-image: url(images/bullet.png);
}
.path, .path a, .path a:visited {
color: #888;
}
.block {
margin-bottom: 10px;
font-size: 0.9em;
}
.block h2.title {
margin: 0;
}
.block .content {
border: solid 1px #777;
border-top: none;
margin: 0;
padding: 5px;
}
.node h2.title {
background-color: #fff;
border: solid 1px #999;
margin-top: 1em;
}
.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;
}
#forum .title {
font-weight: bold;
color: #404040;
padding-bottom: 1em;
}
a:link {
color: #656
}
a:visited {
color: #656
}
a:active {
color: #ccc
}
......@@ -57,7 +57,7 @@ function marvin_header() {
$output .= " <td style=\"vertical-align: top; width: 85%;\">\n";
$output .= theme("breadcrumb", drupal_get_breadcrumb());
$output .= "<h1>" . drupal_get_title() . "</h1>";
$output .= "<h2>" . drupal_get_title() . "</h2>";
if ($help = menu_get_active_help()) {
$output .= "<small>$help</small><hr />";
}
......@@ -71,43 +71,36 @@ function marvin_header() {
function marvin_node($node, $main = 0, $page = 0) {
if (module_exist("taxonomy")) {
$terms = taxonomy_link("taxonomy terms", $node);
}
if (count($terms)) {
$colspan = " colspan=\"2\"";
$output = "<div class=\"node\">\n";
if (!$page) {
$output .= "<h2 class=\"title\">". l($node->title, "node/view/$node->nid") ."</h2>\n";
}
$path = path_to_theme();
$output = "\n<!-- node: \"$node->title\" -->\n";
$output .= "<table cellpadding=\"0\" cellspacing=\"0\" style=\"border 0px; width: 100%;\">\n";
if ($page == 0) {
$output .= " <tr><td$colspan><img src=\"$path/images/drop.gif\" alt=\"\" title=\"\" /> &nbsp; <b>$node->title</b></td></tr>\n";
}
$output .= " <tr style=\"vertical-align: bottom;\"><td colspan=\"2\" style=\"background-color: #000000; width: 100%;\"><img src=\"$path/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" title=\"\" /></td></tr>\n";
$output .= " <tr><td><div style=\"color: #7c7c7c;\"><small>". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) ."</small></div></td>";
if ($colspan) {
$output .= "<td style=\"text-align: right; vertical-align: top;\"><small>". theme("links", $terms) ."</small></td>";
$output .= "<div class=\"submitted\">". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) ."</div>";
if (module_exist("taxonomy") && ($taxonomy = taxonomy_link("taxonomy terms", $node))) {
$output .= "<div class=\"taxonomy\">". theme("links", $taxonomy) ."</div>";
}
$output .= " </tr>\n";
$output .= " <tr><td$colspan>&nbsp;</td></tr>\n";
$output .= "<div class=\"content\">";
if ($main && $node->teaser) {
$output .= " <tr><td$colspan><p>$node->teaser</p></td></tr>\n";
$output .= $node->teaser;
}
else {
$output .= " <tr><td$colspan><p>$node->body</p></td></tr>\n";
$output .= $node->body;
}
$output .= " <tr><td$colspan>&nbsp;</td></tr>\n";
$output .= "</div>\n";
if ($links = link_node($node, $main)) {
$output .= " <tr><td$colspan>". theme("links", $links) ."</td></tr>\n";
$output .= "<div class=\"links\">". theme("links", $links) ."</div>\n";
}
$output .= "</table>\n";
$output .= "<br /><br />\n\n";
$output .= "</div>\n";
return $output;
}
function marvin_comment($comment, $link = "") {
......@@ -147,28 +140,7 @@ function marvin_comment($comment, $link = "") {
}
// Print bottom link(s):
$output .= " <tr><td style=\"background-color: #eaeaea; text-align: right;\">[ $link ]</td></tr>\n";
$output .= " </table>\n";
$output .= " </td>\n";
$output .= " </tr>\n";
$output .= "</table>\n";
$output .= "<br />\n\n";
return $output;
}
function marvin_block($block) {
return theme("box", $block->subject, $block->content);
}
function marvin_box($subject, $content, $region = "main") {
$output = "\n<!-- box: \"$subject\" -->\n";
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
$output .= " <tr>\n";
$output .= " <td>\n";
$output .= " <table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" style=\"width: 100%;\">\n";
$output .= " <tr><td style=\"background-color: #eaeaea; text-align: center;\"><div style=\"color: #404040;\"><b>$subject</b></div></td></tr>\n";
$output .= " <tr><td style=\"background-color: #ffffff; vertical-align: top;\">$content</td></tr>\n";
$output .= " <tr><td style=\"background-color: #eaeaea; text-align: right;\">$link</td></tr>\n";
$output .= " </table>\n";
$output .= " </td>\n";
$output .= " </tr>\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment