summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhimerus2011-02-14 00:32:25 +0000
committerhimerus2011-02-14 00:32:25 +0000
commit50bf10a81e93f3b9877851c874925f76366b60e7 (patch)
tree42c55d1cb5c9c51e9611b49c9c9be94e6a67f55e
parent78221726340f1788f1e73a15564840f8f5a48601 (diff)
update Gamma to play nice with HTML5 and Omega beta1
-rw-r--r--templates/comment.tpl.php65
-rw-r--r--templates/html.tpl.php9
-rwxr-xr-xtemplates/node.tpl.php88
-rw-r--r--templates/page.tpl.php16
4 files changed, 33 insertions, 145 deletions
diff --git a/templates/comment.tpl.php b/templates/comment.tpl.php
index 5f442b9..b69981e 100644
--- a/templates/comment.tpl.php
+++ b/templates/comment.tpl.php
@@ -5,67 +5,21 @@
* @file
* Default theme implementation for comments.
*
- * Available variables:
- * - $author: Comment author. Can be link or plain text.
- * - $content: An array of comment items. Use render($content) to print them all, or
- * print a subset such as render($content['field_example']). Use
- * hide($content['field_example']) to temporarily suppress the printing of a
- * given element.
- * - $created: Formatted date and time for when the comment was created.
- * Preprocess functions can reformat it by calling format_date() with the
- * desired parameters on the $comment->created variable.
- * - $changed: Formatted date and time for when the comment was last changed.
- * Preprocess functions can reformat it by calling format_date() with the
- * desired parameters on the $comment->changed variable.
- * - $new: New comment marker.
- * - $permalink: Comment permalink.
- * - $picture: Authors picture.
- * - $signature: Authors signature.
- * - $status: Comment status. Possible values are:
- * comment-unpublished, comment-published or comment-preview.
- * - $title: Linked title.
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the following:
- * - comment: The current template type, i.e., "theming hook".
- * - comment-by-anonymous: Comment by an unregistered user.
- * - comment-by-node-author: Comment by the author of the parent node.
- * - comment-preview: When previewing a new or edited comment.
- * The following applies only to viewers who are registered users:
- * - comment-unpublished: An unpublished comment visible only to administrators.
- * - comment-by-viewer: Comment by the user currently viewing the page.
- * - comment-new: New comment since last the visit.
- * - $title_prefix (array): An array containing additional output populated by
- * modules, intended to be displayed in front of the main title tag that
- * appears in the template.
- * - $title_suffix (array): An array containing additional output populated by
- * modules, intended to be displayed after the main title tag that appears in
- * the template.
- *
- * These two variables are provided for context:
- * - $comment: Full comment object.
- * - $node: Node object the comments are attached to.
- *
- * Other variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- *
* @see template_preprocess()
* @see template_preprocess_comment()
* @see template_process()
* @see theme_comment()
*/
?>
-<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
-
+<article class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<?php if ($new): ?>
<span class="new"><?php print $new ?></span>
<?php endif; ?>
-
- <?php print render($title_prefix); ?>
- <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
- <?php print render($title_suffix); ?>
-
+ <header>
+ <?php print render($title_prefix); ?>
+ <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
+ <?php print render($title_suffix); ?>
+ </header>
<div class="content"<?php print $content_attributes; ?>>
<?php
@@ -79,10 +33,9 @@
</div>
<?php endif; ?>
</div>
- <div class="clearfix comment-info">
+ <footer class="clearfix comment-info">
<?php print $picture; ?>
<div class="submitted"><?php print $submitted; ?></div>
<?php print render($content['links']) ?>
- </div>
-
-</div>
+ </footer>
+</article>
diff --git a/templates/html.tpl.php b/templates/html.tpl.php
index 2d7f626..2e8dcf1 100644
--- a/templates/html.tpl.php
+++ b/templates/html.tpl.php
@@ -33,15 +33,14 @@
* @see template_preprocess_html()
* @see template_process()
*/
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
- "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"
- <?php print $rdf_namespaces; ?>>
-<head profile="<?php print $grddl_profile; ?>">
+?><?php print $doctype; ?>
+<html lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>"<?php print $rdf->version . $rdf->namespaces; ?>>
+<head<?php print $rdf->profile; ?>>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
+ <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body class="<?php print $classes; ?>" <?php print $attributes;?>>
<div id="skip-link">
diff --git a/templates/node.tpl.php b/templates/node.tpl.php
index 8420f6d..76d2ddb 100755
--- a/templates/node.tpl.php
+++ b/templates/node.tpl.php
@@ -5,85 +5,20 @@
* @file
* Default theme implementation to display a node.
*
- * Available variables:
- * - $title: the (sanitized) title of the node.
- * - $content: An array of node items. Use render($content) to print them all,
- * or print a subset such as render($content['field_example']). Use
- * hide($content['field_example']) to temporarily suppress the printing of a
- * given element.
- * - $user_picture: The node author's picture from user-picture.tpl.php.
- * - $date: Formatted creation date. Preprocess functions can reformat it by
- * calling format_date() with the desired parameters on the $created variable.
- * - $name: Themed username of node author output from theme_username().
- * - $node_url: Direct url of the current node.
- * - $display_submitted: whether submission information should be displayed.
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the
- * following:
- * - node: The current template type, i.e., "theming hook".
- * - node-[type]: The current node type. For example, if the node is a
- * "Blog entry" it would result in "node-blog". Note that the machine
- * name will often be in a short form of the human readable label.
- * - node-teaser: Nodes in teaser form.
- * - node-preview: Nodes in preview mode.
- * The following are controlled through the node publishing options.
- * - node-promoted: Nodes promoted to the front page.
- * - node-sticky: Nodes ordered above other non-sticky nodes in teaser
- * listings.
- * - node-unpublished: Unpublished nodes visible only to administrators.
- * - $title_prefix (array): An array containing additional output populated by
- * modules, intended to be displayed in front of the main title tag that
- * appears in the template.
- * - $title_suffix (array): An array containing additional output populated by
- * modules, intended to be displayed after the main title tag that appears in
- * the template.
- *
- * Other variables:
- * - $node: Full node object. Contains data that may not be safe.
- * - $type: Node type, i.e. story, page, blog, etc.
- * - $comment_count: Number of comments attached to the node.
- * - $uid: User ID of the node author.
- * - $created: Time the node was published formatted in Unix timestamp.
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
- * teaser listings.
- * - $id: Position of the node. Increments each time it's output.
- *
- * Node status variables:
- * - $view_mode: View mode, e.g. 'full', 'teaser'...
- * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
- * - $page: Flag for the full page state.
- * - $promote: Flag for front page promotion state.
- * - $sticky: Flags for sticky post setting.
- * - $status: Flag for published status.
- * - $comment: State of comment settings for the node.
- * - $readmore: Flags true if the teaser content of the node cannot hold the
- * main body content.
- * - $is_front: Flags true when presented in the front page.
- * - $logged_in: Flags true when the current user is a logged-in member.
- * - $is_admin: Flags true when the current user is an administrator.
- *
- * Field variables: for each field instance attached to the node a corresponding
- * variable is defined, e.g. $node->body becomes $body. When needing to access
- * a field's raw values, developers/themers are strongly encouraged to use these
- * variables. Otherwise they will have to explicitly specify the desired field
- * language, e.g. $node->body['en'], thus overriding any language negotiation
- * rule that was previously applied.
- *
* @see template_preprocess()
* @see template_preprocess_node()
* @see template_process()
*/
?>
-<div<?php print $attributes; ?>>
-
- <?php print render($title_prefix); ?>
+<article<?php print $attributes; ?>>
+
<?php if (!$page && $title): ?>
- <h2 <?php print $title_attributes; ?>><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
+ <header>
+ <?php print render($title_prefix); ?>
+ <h2 <?php print $title_attributes; ?>><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
+ <?php print render($title_suffix); ?>
+ </header>
<?php endif; ?>
- <?php print render($title_suffix); ?>
<div class="content clearfix"<?php print $content_attributes; ?>>
<?php
@@ -95,10 +30,10 @@
?>
</div>
<?php if (!empty($content['links'])): ?>
- <div class="links"><?php print render($content['links']); ?></div>
+ <nav class="links"><?php print render($content['links']); ?></nav>
<?php endif; ?>
<?php if($user_picture || $display_submitted || $terms): ?>
- <div class="clearfix node-info">
+ <footer class="clearfix node-info">
<?php print $user_picture; ?>
<?php if (isset($display_submitted)):?>
<div class="submitted"><?php print $submitted; ?></div>
@@ -106,10 +41,9 @@
<?php if (isset($terms)): ?>
<div class="terms"><?php print $terms; ?></div>
<?php endif; ?>
- </div>
+ </footer>
<?php endif; ?>
<div class="clearfix">
-
<?php print render($content['comments']); ?>
</div>
-</div> \ No newline at end of file
+</article> \ No newline at end of file
diff --git a/templates/page.tpl.php b/templates/page.tpl.php
index c388fe0..3106a62 100644
--- a/templates/page.tpl.php
+++ b/templates/page.tpl.php
@@ -7,11 +7,11 @@
*/
?>
<div id="page" class="clearfix">
- <?php if (isset($zones_above)): ?>
- <div id="zones-above" class="clearfix"><?php print $zones_above; ?></div>
+ <?php if (isset($page['zones_above'])): ?>
+ <header id="zones-above" class="clearfix"><?php print render($page['zones_above']); ?></header>
<?php endif; ?>
- <div id="zones-content">
+ <section id="zones-content">
<div id="zones-content-inner" class="clearfix">
<div id="zones-content-background" class="clearfix">
<?php if (isset($messages)): ?>
@@ -21,12 +21,14 @@
</div>
</div><!-- /.container-xx -->
<?php endif; ?>
- <?php print $content_zone; ?>
+ <?php if (isset($page['content_zone'])): ?>
+ <?php print render($page['content_zone']); ?>
+ <?php endif; ?>
</div>
</div>
- </div>
+ </section>
- <?php if (isset($zones_below)): ?>
- <div id="zones-below" class="clearfix"><?php print $zones_below; ?></div>
+ <?php if (isset($page['zones_below'])): ?>
+ <footer id="zones-below" class="clearfix"><?php print render($page['zones_below']); ?></footer>
<?php endif; ?>
</div><!-- /#page -->