Permalink
Browse files

Styles cleanup and rudimentary IE6 png support.

  • Loading branch information...
1 parent 902baeb commit 9766d56cc5ca8c5d12fd470a75f52497af0937fb @yhahn yhahn committed Aug 12, 2009
Showing with 86 additions and 29 deletions.
  1. +9 −0 page.tpl.php
  2. +60 −27 style.css
  3. +17 −2 template.php
View
@@ -3,6 +3,11 @@
<head>
<?php print $head ?>
<?php print $styles ?>
+
+ <!--[if lt IE 7]>
+ <style type="text/css" media="all"><?php print $styles_ie6 ?></style>
+ <![endif]-->
+
<title><?php print $head_title ?></title>
</head>
<body <?php print drupal_attributes($attr) ?>>
@@ -33,6 +38,10 @@
<?php if ($site_name): ?><h1 class='site-name'><?php print $site_name ?></h1><?php endif; ?>
</div>
+ <div id='utility'>
+ <?php if (!empty($breadcrumb)) print $breadcrumb ?>
+ </div>
+
<div id='page'>
<?php if ($title || $tabs): ?>
<div class='page-header'>
View
@@ -1,7 +1,7 @@
body {
- background:#011220 url(images/sea.png) 0% 0% repeat-x fixed;
+ background:#011220 url(images/sea.jpg) 0% 0% repeat-x fixed;
color:#333;
- font:15px/25px "Helvetica Neue",Arial,Helvetica,sans-serif;
+ font:13px/20px "Helvetica Neue",Arial,Helvetica,sans-serif;
}
a {
@@ -18,8 +18,8 @@ a {
body.one-sidebar #root { width:960px; }
#sidebar {
- -moz-border-radius-topright:10px;
- -moz-border-radius-bottomright:10px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomright:5px;
font-size:13px;
line-height:20px;
@@ -33,8 +33,8 @@ a {
}
#main {
- -moz-border-radius:20px;
- -moz-border-radius:20px;
+ -moz-border-radius:10px;
+ -moz-border-radius:10px;
background:url(images/mask.png);
width:740px;
}
@@ -62,11 +62,6 @@ body.fluid #sidebar { width:20%; }
/**
- * Prose text =========================================================
- */
-p { margin:0px 0px 25px; }
-
-/**
* Branding ===========================================================
*/
#branding { padding:0px 10px 0px; }
@@ -102,7 +97,8 @@ p { margin:0px 0px 25px; }
#branding div.primary ul.links a {
-moz-border-radius:10px;
- background:#111;
+ -webkit-border-radius:10px;
+ background:url(images/mask.png);
padding:0px 15px;
}
@@ -116,14 +112,33 @@ p { margin:0px 0px 25px; }
}
/**
- * Page ===============================================================
+ * Breadcrumb =========================================================
*/
-#page {
- -moz-border-radius:5px;
- background:#fff;
+#utility {
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -webkit-border-top-left-radius:5px;
+ -webkit-border-top-right-radius:5px;
+
+ color:#ccc;
+ background:url(images/mask.png);
+ padding:0px 5px;
+ line-height:30px;
+ font-weight:300;
+ text-transform:lowercase;
+ }
+
+#utility a {
+ margin:0px 5px;
+ color:#fff;
}
/**
+ * Page ===============================================================
+ */
+#page { background:#fff; }
+
+/**
* Tabs ===============================================================
*/
div.page-header { padding:10px 20px; }
@@ -236,14 +251,16 @@ div.left div.admin-panel { margin-right:10px; }
background:url(images/close.png) no-repeat;
}
+ #growl div.autoclose span.close { display:none; }
+
#growl div.messages {
- -moz-border-radius:10px;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+
margin:5px 0px;
background:#eff;
opacity:.9;
padding:20px;
-
- cursor:pointer;
}
#growl div.error { background:#fee; }
@@ -291,7 +308,6 @@ dl dd {
#sidebar a { color:#adf; }
#sidebar a:hover { color:#fff; }
-
#sidebar div.block {
padding:10px 10px 10px 0px;
-moz-border-radius-topleft:5px;
@@ -301,10 +317,10 @@ dl dd {
}
#sidebar div.block h2.block-title {
- padding:5px 10px 4px;
- margin:0px 0px 1px;
- background:url(images/mask.png);
- font-size:13px;
+ padding:0px 10px 10px;
+ background:url(images/dots.png) 0px 100% repeat-x;
+ font-size:18px;
+ font-weight:300;
}
/* Menu blocks */
@@ -319,8 +335,8 @@ dl dd {
}
#sidebar ul.menu a.active {
- background:#fff;
- color:#333;
+ background:url(images/mask.png);
+ color:#fff;
}
#sidebar ul.menu li li a {
@@ -339,6 +355,23 @@ div.block ul.menu li li li li li li li li a { padding-left:80px; }
/**
* Nodes ==============================================================
*/
+div.node {
+ padding:0px 0px 19px;
+ margin:0px 0px 20px;
+ border-bottom:1px solid #ddd;
+ }
+
+ div.node-page {
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+h2.node-title {
+ font-weight:300;
+ font-size:18px;
+ }
+
div.node-links,
div.node-submitted {
color:#666;
@@ -361,7 +394,7 @@ div.node-links ul.links {
div.node div.field { margin:0px 0px 10px; }
-div.prose { line-height:25px; }
+div.prose { line-height:20px; }
/**
* Pagers =============================================================
View
@@ -6,6 +6,7 @@
function singular_preprocess_page(&$vars) {
include_once(drupal_get_path('theme', 'singular') .'/styles.inc');
$vars['styles'] .= singular_style_css(singular_get_style_info());
+ $vars['styles_ie6'] = singular_style_ie6();
$settings = theme_get_settings('singular');
if (!empty($settings['layout'])) {
@@ -18,8 +19,12 @@ function singular_preprocess_page(&$vars) {
*/
function singular_preprocess_node(&$vars) {
$node = menu_get_object();
- if ($node === $vars['node'] && !isset($_GET['print'])) {
- unset($vars['title']);
+ if ($node === $vars['node']) {
+ $vars['attr']['class'] .= ' node-page';
+
+ if (!isset($_GET['print'])) {
+ unset($vars['title']);
+ }
}
}
@@ -45,6 +50,16 @@ function singular_style_css($info) {
}
/**
+ * PNG transparency compatibility for IE6.
+ */
+function singular_style_ie6() {
+ $mask_path = base_path() . path_to_theme() . '/images/mask.png';
+ $property = "background:transparent; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='{$mask_path}');";
+ $linkfix = "position:relative;";
+ return "#sidebar ul.menu a { height:1%; } #main,#utility,#sidebar,#branding div.primary ul.links a,#sidebar ul.menu a.active { $property } #main a,#utility a,#sidebar a,#branding div.primary ul.links a,#sidebar ul.menu a.active { $linkfix }";
+}
+
+/**
* Override of theme_status_message().
*/
function singular_status_messages($display = NULL) {

0 comments on commit 9766d56

Please sign in to comment.