summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author@himerus2010-12-27 11:58:42 -0500
committer@himerus2010-12-27 11:58:42 -0500
commit5e103d51f27a8534f239ace8a1144d16634d871f (patch)
tree5c9c8e493089909bbd6b0e9c2647e7784904f8c3
parent00db8d77d2065ed2ea28be2f059badfba3d3b53c (diff)
making some general modifications to replicate the 7.x-1.x version of Gamma
-rw-r--r--css/gamma.css503
-rw-r--r--js/gamma.js12
-rw-r--r--preprocess/preprocess-comment.inc9
-rw-r--r--preprocess/preprocess-html.inc1
-rw-r--r--preprocess/preprocess-node.inc28
-rw-r--r--template.php21
-rwxr-xr-xtemplates/node.tpl.php22
-rw-r--r--templates/page.tpl.php18
8 files changed, 587 insertions, 27 deletions
diff --git a/css/gamma.css b/css/gamma.css
index 6e9f16b..e3b5b67 100644
--- a/css/gamma.css
+++ b/css/gamma.css
@@ -14,12 +14,20 @@
#zones-content {
background: transparent url('../i/body-bottom-bg-454545.png') repeat-x bottom left;
}
-#content-container {
+
+
+#zones-content-background {
+ width: 960px;
+ margin: 0 auto;
+ padding: 10px 0;
background: #EEE;
border-radius: 0 0 15px 15px;
-moz-border-radius: 0 0 15px 15px;
-webkit-border-radius: 0 0 15px 15px;
}
+#location-container {
+ background: #EEE;
+}
#zones-below {
background: #454545;
}
@@ -61,17 +69,21 @@
}
#region-menu ul.main-menu li a {
padding: 10px 15px;
- background-color: #FFF;
+ background-color: #8D8C8C;
+ color: #EEE;
+ border: 0;
}
#region-menu ul.main-menu li a:hover,
+#region-menu ul.main-menu li.hover a,
#region-menu ul.main-menu li.active-trail a,
#region-menu ul.main-menu li.active a {
- background-color: #EEE;
+ background-color: #DDD;
+ color: #454545;
}
#region-menu ul.main-menu li ul {
border: 1px solid #454545;
border-top: 0px;
- background: #EEE;
+ background: #454545;
}
#region-menu ul.main-menu li ul li ul {
position: relative;
@@ -80,13 +92,24 @@
display: block;
border: 0;
}
+#region-menu ul.secondary-items li {
+ margin-left: 0;
+}
+#region-menu ul.secondary-items li a {
+ margin-left: 0;
+ border-bottom: 1px solid #EEE;
+}
#region-menu ul.secondary-items li a {
color: #454545;
+ background: #DDD;
min-width: 200px;
display: block;
background-image: url('../i/bullet-454545.png');
background-repeat: no-repeat;
}
+#region-menu ul.secondary-items li a:hover {
+ background-color: #EEE;
+}
#region-menu ul.secondary-items li.has-subitems > a {
/* background-image: url('../i/bullet-open-454545.png'); */
}
@@ -95,22 +118,27 @@
}
#region-menu ul.main-menu li ul li a {
padding: 5px 10px 5px 24px;
- background-position: 4px 7px;
+ background-position: 4px 8px;
}
#region-menu ul.main-menu li ul li ul li a {
padding-left: 48px;
- background-position: 24px 7px;
+ background-position: 24px 8px;
}
#region-menu ul.main-menu li ul li ul li ul li a {
padding-left: 72px;
- background-position: 48px 7px;
+ background-position: 48px 8px;
}
#region-menu ul.main-menu li ul li ul li ul li ul li a {
padding-left: 96px;
- background-position: 72px 7px;
+ background-position: 72px 8px;
}
#region-menu ul.main-menu li ul li ul li ul li ul li ul li a {
padding-left: 120px;
+ background-position: 96px 8px;
+}
+#region-menu ul.main-menu li ul li ul li ul li ul li ul li ul li a {
+ padding-left: 144px;
+ background-position: 120px 8px;
}
#region-menu ul.main-menu li ul li {
font-size: 16px;
@@ -142,3 +170,462 @@
-webkit-border-radius: 0;
}
/* End Primary Nav & Dropdowns */
+
+/* Add rounded corners to default node/comment links */
+div.links ul.links li a {
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+
+
+
+
+/* Menu Blocks #################################################### */
+/* Main Content Area menu blocks/lists */
+.menu-block .item-list ul li {
+ display: block;
+}
+.menu-block ul.menu,
+.menu-block div.item-list ul {
+ font-size: 12px;
+ margin: 0;
+ padding: 0;
+}
+.menu-block ul.menu li,
+.menu-block div.item-list ul li {
+ margin: 0;
+ padding: 0;
+ width: auto;
+ margin-top: 1px;
+ list-style-type: none;
+ list-style-image: none;
+}
+
+
+.menu-block ul.menu li a,
+.menu-block div.item-list ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 32px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.more-link {
+ text-transform: lowercase;
+}
+.menu-block .more-link a {
+ text-decoration: none;
+ display: block;
+ width: auto;
+ padding: 2px 4px;
+ margin-top: 1px;
+}
+ .menu-block ul.menu li ul li a,
+ .menu-block div.item-list ul li ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 64px;
+ }
+ .menu-block ul.menu li ul li ul li a,
+ .menu-block div.item-list ul li ul li ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 96px;
+ }
+
+/* Custom Link colors for "menu blocks" */
+.menu-block a:link,
+.menu-block a:visited {
+ color: #545454;
+}
+
+.menu-block a:hover {
+ color: #454545;
+}
+
+.menu-block a:active,
+.menu-block a.active {
+ color: #545454;
+}
+
+/* Main Content Area menu blocks/lists */
+.menu-block ul.menu li a,
+.menu-block div.item-list ul li a {
+ background: #DDD url('../i/bullet-454545.png') no-repeat 6px 8px;
+}
+.menu-block .more-link a {
+ background: #DDD;
+}
+.menu-block .more-link a:hover {
+ background: #EEE;
+}
+ .menu-block ul.menu li ul li a,
+ .menu-block div.item-list ul li ul li a {
+ background: #DDD url('../i/bullet-454545.png') no-repeat 32px 8px;
+ }
+ .menu-block ul.menu li ul li ul li a,
+ .menu-block div.item-list ul li ul li ul li a {
+ background: #DDD url('../i/bullet-454545.png') no-repeat 64px 8px;
+ }
+ .menu-block ul.menu li a:hover,
+ .menu-block div.item-list ul li a:hover {
+ background-color: #EEE;
+ }
+
+
+/* Footer Region menu blocks/lists */
+#gamma-footer-wrapper .menu-block ul.menu,
+#gamma-footer-wrapper .menu-block div.item-list ul {
+ font-size: 12px;
+ margin: 0;
+ padding: 0;
+}
+#gamma-footer-wrapper .menu-block ul.menu li,
+#gamma-footer-wrapper .menu-block div.item-list ul li {
+ margin: 0;
+ padding: 0;
+ margin-top: 1px;
+ list-style-type: none;
+ list-style-image: none;
+}
+#gamma-footer-wrapper .menu-block ul.menu li a,
+#gamma-footer-wrapper .menu-block div.item-list ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 32px;
+}
+#gamma-footer-wrapper .menu-block .more-link a {
+ text-decoration: none;
+ display: block;
+ padding: 2px 4px;
+}
+ #gamma-footer-wrapper .menu-block ul.menu li ul li a,
+ #gamma-footer-wrapper .menu-block div.item-list ul li ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 64px;
+ }
+ #gamma-footer-wrapper .menu-block ul.menu li ul li ul li a,
+ #gamma-footer-wrapper .menu-block div.item-list ul li ul li ul li a {
+ text-decoration: none;
+ display: block;
+ padding: 8px 4px 8px 96px;
+ }
+
+
+/* Footer Region menu blocks/lists */
+#gamma-footer-wrapper .menu-block ul.menu li a,
+#gamma-footer-wrapper .menu-block div.item-list ul li a {
+ color: #EEE;
+ background: #5c5c5c url('../i/bullet-DDD.png') no-repeat 6px 8px;
+}
+#gamma-footer-wrapper .more-link a {
+ color: #EEE;
+}
+#gamma-footer-wrapper .menu-block .more-link a {
+ color: #EEE;
+ background: #5c5c5c;
+}
+#gamma-footer-wrapper .menu-block .more-link a:hover {
+ background: #545454;
+}
+ #gamma-footer-wrapper .menu-block ul.menu li ul li a,
+ #gamma-footer-wrapper .menu-block div.item-list ul li ul li a {
+ background: #5c5c5c url('../i/bullet-DDD.png') no-repeat 32px 8px;
+ }
+ #gamma-footer-wrapper .menu-block ul.menu li ul li ul li a,
+ #gamma-footer-wrapper .menu-block div.item-list ul li ul li ul li a {
+ background: #5c5c5c url('../i/bullet-DDD.png') no-repeat 64px 8px;
+ }
+#gamma-footer-wrapper .menu-block ul.menu li a:hover,
+#gamma-footer-wrapper .menu-block div.item-list ul li a:hover {
+ background-color: #545454;
+}
+
+#postscript-wrapper .block .content {
+ background: #EEE;
+ padding: 10px;
+}
+#postscript-wrapper .menu-block .content {
+ background: transparent;
+ padding: 0;
+}
+
+/* Fix for user bar menus... */
+#user-container .menu-block ul.menu li,
+#user-container .menu-block div.item-list ul li {
+ margin-top: 0;
+}
+#user-container .menu-block ul.menu li a,
+#user-container .menu-block div.item-list ul li a {
+ text-decoration: none;
+ display: inline-block;
+ background: none;
+ padding: 4px 5px;
+}
+#user-container .menu-block ul.menu li a:hover {
+ text-decoration: underline;
+}
+
+
+
+
+
+
+
+/* Rounded Top left & Right for block headers. */
+.block h2 {
+ border-radius: 8px 8px 0 0;
+ -moz-border-radius: 8px 8px 0 0;
+ -webkit-border-radius: 8px 8px 0 0;
+ min-height: 36px;
+ font-size: 18px;
+ padding: 6px 12px;
+ padding-bottom: 0;
+}
+.block h2 {
+ background: #454545;
+ color: #EEE;
+}
+
+#gamma-footer-wrapper .block h2 {
+ background: #DDD;
+ color: #454545;
+}
+.node h2,
+.block-omega-tools h2 {
+ background: transparent;
+ color: #454545;
+ padding: 0;
+}
+.node h2.node-title {
+ font-size: 32px;
+ font-weight: normal;
+}
+.node h2.node-title a {
+ text-decoration: none;
+}
+.node .comment-wrapper h2.title {
+ background: #454545;
+ color: #EEE;
+}
+
+.node,
+.content-zone .block {
+ border-bottom: 5px solid #454545;
+ margin-bottom: 10px;
+ clear: both;
+}
+.content-zone #block-system-main {
+ border-bottom: 0;
+}
+
+
+
+/* Node Info Bar */
+
+/* Node INFO */
+.node-info,
+.comment-info {
+ padding: 0;
+ text-align: right;
+ margin-bottom: 10px;
+}
+.user-picture {
+ float: left;
+ clear: none;
+ margin: 0;
+ padding: 0;
+}
+.user-picture img {
+ text-decoration: none;
+ display: block;
+ margin: 0;
+ padding: 0;
+ height: auto;
+ line-height: 0.5em;
+}
+.submitted,
+.terms {
+ margin: 2px 5px 0 10px;
+}
+
+.copyright {
+ font-size: 11px;
+}
+.copyright p {
+ margin: 0;
+}
+
+/* TERM DISPLAY */
+.field-type-taxonomy-term-reference .field-items {
+ float: none;
+}
+
+.field-label-inline .field-label,
+.field-label-inline .field-items,
+.node-info .field-label,
+.node-info .field-items {
+ float: none;
+ display: inline;
+}
+.node-info .field-label {
+ display: none;
+}
+.node-info .field-items {
+ margin-left: 0;
+ text-align: right;
+ list-style-type: none;
+ list-style-position: outside;
+}
+
+.node-info ul.field-items li {
+ padding: 0 5px;
+ display: inline;
+ list-style: none;
+}
+.node-info ul.field-items li.last {
+ border-right: 0;
+}
+
+/** Node Lists */
+.node .content ul li {
+ background-image: url('../i/bullet-454545.png');
+}
+
+/** Node Links */
+#region-content .node div.links ul.links a {
+ border: 1px solid #DDD;
+}
+#region-content .node div.links ul.links a:hover {
+ border: 1px solid #8d8c8c;
+}
+
+
+/* Term Display (node.tpl.php) */
+.node-info .field-items li {
+ border-right: 1px solid #454545;
+}
+.node-info .field-items li.last {
+ border-right: 0;
+}
+
+/* From Code Filter Module */
+div.codeblock {
+ background-color: #DDD;
+ display: block;
+}
+
+
+
+
+
+
+
+blockquote {
+ border: 3px solid #8d8c8c;
+ background: #DDD url('../i/quote-bg.png') no-repeat 5px 5px;
+}
+blockquote {
+ display: block;
+ font-style: italic;
+ font-size: 11px;
+ margin-bottom: 10px;
+ padding: 10px 20px 10px 75px;
+}
+.node blockquote p {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+
+
+
+
+h1,
+h1.page-title
+.node h2,
+.node h2 a {
+ color: #0073ba;
+}
+
+.node h2 a:hover {
+ color: #165d8f;
+}
+.comment h3,
+.comment h3 a {
+ color: #EEE;
+}
+.comment h3 {
+ background: #8d8c8c;
+}
+.comment:hover h3 {
+ background: #454545;
+}
+.comment-by-node-author h3 {
+ background: #0073ba;
+ color: #EEE;
+}
+
+.node-info,
+.comment-info {
+ background: #DDD;
+}
+
+.comment .content {
+ background: #FFF;
+}
+
+.comment h3 a:hover {
+ color: #DDD;
+}
+
+#footer-header h2 {
+ color: #EEE;
+}
+
+#footer-wrapper {
+ color: #DDD;
+}
+
+hr {
+ background: #454545;
+}
+
+
+dl dt {
+ background: #8D8C8C;
+ color: #EEE;
+ border: 1px solid #454545;
+ border-bottom: 0;
+}
+dl dt:hover {
+ background: #454545;
+}
+dl dd {
+ border: 1px solid #454545;
+}
+dl dt a,
+dl dt a:visited,
+dl dt a:link,
+dl dt a:hover {
+ color: #eee;
+}
+
+fieldset {
+ border:1px solid #DDD;
+} \ No newline at end of file
diff --git a/js/gamma.js b/js/gamma.js
index 7a7ffca..650b84d 100644
--- a/js/gamma.js
+++ b/js/gamma.js
@@ -31,10 +31,22 @@
}
/*
+ // commented out for now; was working on an alternative method to show the
+ // secondary/tertiary/etc. menus in a way other than flyouts.
$("#region-menu ul.main-menu > li ul li.has-subitems > a").click(function(){
$(this).next('ul').slideDown('slow');
return false;
});
*/
+
+ // make the top level menu item remain in a hover state while on a submenu in the dropdown
+ $('#region-menu ul.main-menu > li ul').hover(function(){
+ // hover in
+ $(this).parent('li').addClass('hover');
+ }, function(){
+ // hover out
+ $(this).parent('li').removeClass('hover');
+ });
+
});
})(jQuery); \ No newline at end of file
diff --git a/preprocess/preprocess-comment.inc b/preprocess/preprocess-comment.inc
new file mode 100644
index 0000000..2f8fe0d
--- /dev/null
+++ b/preprocess/preprocess-comment.inc
@@ -0,0 +1,9 @@
+<?php
+// $Id: preprocess-comment.inc,v 1.1.2.1 2010/08/03 14:47:32 himerus Exp $
+/**
+ * @file
+preprocess-block.inc is an alternate location for storage on items
+ * to be ran during hook_preprocess_comment.
+ */
+// Create a cleaner "submited by" variable.
+$vars['submitted'] = t('Posted by ') . $vars['author'] . t(' on') . ' ' . $vars['created']; \ No newline at end of file
diff --git a/preprocess/preprocess-html.inc b/preprocess/preprocess-html.inc
index b18928f..edd0847 100644
--- a/preprocess/preprocess-html.inc
+++ b/preprocess/preprocess-html.inc
@@ -9,4 +9,3 @@
// add jQuery UI elements to make the primary menu pop
drupal_add_js('misc/ui/jquery.effects.core.min.js');
drupal_add_js('misc/ui/jquery.effects.bounce.min.js');
-//$vars['scripts'] = drupal_get_js(); \ No newline at end of file
diff --git a/preprocess/preprocess-node.inc b/preprocess/preprocess-node.inc
new file mode 100644
index 0000000..2e40433
--- /dev/null
+++ b/preprocess/preprocess-node.inc
@@ -0,0 +1,28 @@
+<?php
+// $Id: preprocess-node.inc,v 1.1.2.1 2010/08/03 14:47:32 himerus Exp $
+/**
+ * @file
+ * preprocess-block.inc is an alternate location for storage on items
+ * to be ran during hook_preprocess_node.
+ */
+
+/**
+ * @todo - make this term manipulation a setting in node display specific theme settings.
+ */
+foreach ($vars['content'] AS $item) {
+ if (isset($item['#field_type'])) {
+ $term_fields = '';
+ if ($item['#field_type'] == 'taxonomy_term_reference') {
+ //krumo($item);
+ $field_name = $item['#field_name'];
+ // $term_fields will hold the HTML data from any term_reference field, and be rendered separately in node.tpl.php
+ $term_fields .= render($item);
+ // hide this "term" element from rendering in $content
+ hide($vars['content'][$field_name]);
+ }
+ }
+}
+$vars['terms'] = $term_fields;
+
+// Create a cleaner "submited by" variable.
+$vars['submitted'] = t('Posted by ') . $vars['name'] . t(' on') . ' ' . format_date($vars['created'], 'short');
diff --git a/template.php b/template.php
index 6daae43..f7d41a1 100644
--- a/template.php
+++ b/template.php
@@ -22,3 +22,24 @@ function gamma_theme(&$existing, $type, $theme, $path) {
//$hooks = omega_theme($existing, $type, $theme, $path);
return $hooks;
}
+
+function gamma_field__taxonomy_term_reference($variables) {
+ $output = '';
+
+ // Render the label, if it's not hidden.
+ if (!$variables['label_hidden']) {
+ $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
+ }
+
+ // Render the items.
+ $output .= ($variables['element']['#label_display'] == 'inline') ? '<ul class="links inline taxonomy-terms">' : '<ul class="links taxonomy-terms">';
+ foreach ($variables['items'] as $delta => $item) {
+ $output .= '<li class="taxonomy-term-reference-' . $delta . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</li>';
+ }
+ $output .= '</ul>';
+
+ // Render the top-level DIV.
+ $output = '<div class="' . $variables['classes'] . (!in_array('clearfix', $variables['classes_array']) ? ' clearfix' : '') . '">' . $output . '</div>';
+
+ return $output;
+}
diff --git a/templates/node.tpl.php b/templates/node.tpl.php
index 3a1ff54..79dd8b9 100755
--- a/templates/node.tpl.php
+++ b/templates/node.tpl.php
@@ -1,5 +1,5 @@
<?php
-// $Id: node.tpl.php,v 1.1.2.1 2010/10/27 20:43:39 himerus Exp $
+// $Id: node.tpl.php,v 1.1.2.1 2010/08/03 14:47:32 himerus Exp $
/**
* @file
@@ -79,32 +79,34 @@
?>
<div<?php print $attributes; ?>>
- <?php print $user_picture; ?>
-
<?php print render($title_prefix); ?>
<?php if (!$page && $title): ?>
<h2 <?php print $title_attributes; ?>><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>
<?php print render($title_suffix); ?>
- <?php if ($display_submitted):?>
- <div class="submitted"><?php print $date; ?> -- <?php print $name; ?></div>
- <?php endif; ?>
-
-
+
<div class="content clearfix"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
+ //hide($content['field_node_terms']);
print render($content);
?>
</div>
-
+ <div class="clearfix node-info">
+ <?php print $user_picture; ?>
+ <?php if ($display_submitted):?>
+ <div class="submitted"><?php print $submitted; ?></div>
+ <?php endif; ?>
+ <?php if (!empty($terms)): ?>
+ <div class="terms"><?php print $terms; ?></div>
+ <?php endif; ?>
+ </div>
<div class="clearfix">
<?php if (!empty($content['links'])): ?>
<div class="links"><?php print render($content['links']); ?></div>
<?php endif; ?>
-
<?php print render($content['comments']); ?>
</div>
</div> \ No newline at end of file
diff --git a/templates/page.tpl.php b/templates/page.tpl.php
index 7f61194..2433353 100644
--- a/templates/page.tpl.php
+++ b/templates/page.tpl.php
@@ -13,14 +13,16 @@
<div id="zones-content">
<div id="zones-content-inner" class="clearfix">
- <?php print $content_zone; ?>
- <?php if (isset($messages)): ?>
- <div id="message-container" class="container-<?php print $default_container_width; ?> clearfix">
- <div class="grid-<?php print $default_container_width; ?>">
- <?php print $messages; ?>
- </div>
- </div><!-- /.container-xx -->
- <?php endif; ?>
+ <div id="zones-content-background" class="clearfix">
+ <?php if (isset($messages)): ?>
+ <div id="message-container" class="container-<?php print $default_container_width; ?> clearfix">
+ <div class="grid-<?php print $default_container_width; ?>">
+ <?php print $messages; ?>
+ </div>
+ </div><!-- /.container-xx -->
+ <?php endif; ?>
+ <?php print $content_zone; ?>
+ </div>
</div>
</div>