Skip to content

Commit

Permalink
Theming annunces
Browse files Browse the repository at this point in the history
  • Loading branch information
gdetrez committed May 2, 2011
1 parent 598c2af commit b2d9cc0
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 1 deletion.
39 changes: 39 additions & 0 deletions css/nodes.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,42 @@
.preview .node /* Preview of the content before submitting new or updated content */ {
/* background-color: #ffffea; */ /* Drupal core uses a #ffffea background */
}


/* ANNOUNCES */
.announce {
position: relative;
padding: 72px 0px 0px 0px;
margin-bottom:24px;
}

.field-field-image-announcement {
position: absolute;
top:0;
left: 90px;
width:220px;
overflow: hidden;
}

.announce-inside {
background: #fcd116;
padding: 24px 24px 24px 330px;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 0 10px #999999;
}

.announce a.button {
color:white;
font-weight: bold;
display: block;
float:right;
background: maroon;
padding: 2px 5px 2px;
margin-bottom:18px;
position: relative;
top: -2px;
box-shadow: 0px 0px 10px #111;
border-radius: 5px;
text-align: center;

}
2 changes: 1 addition & 1 deletion fscons.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; The name and description of the theme used on the admin/build/themes page.
name = FSCONS theme
description = Read the <a href="http://drupal.org/node/629510">online docs</a> or the included README.txt on how to create a Zen sub-theme.
description = Drupal theme for FSCONS, the Free Society Conference and nordic summit

; The screenshot used on the admin/build/themes page.
screenshot = screenshot.png
Expand Down
84 changes: 84 additions & 0 deletions templates/node-announce.tpl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php
/**
* @file
* Theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: Node body or teaser depending on $teaser flag.
* - $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.
* - $terms: the themed list of taxonomy term links output from theme_links().
* - $display_submitted: whether submission information should be displayed.
* - $submitted: Themed submission information output from
* theme_node_submitted().
* - $links: Themed links like "Read more", "Add new comment", etc. output
* from theme_links().
* - $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.
* The following applies only to viewers who are registered users:
* - node-by-viewer: Node is authored by the user currently viewing the page.
*
* 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:
* - $build_mode: Build mode, e.g. 'full', 'teaser'...
* - $teaser: Flag for the teaser state (shortcut for $build_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.
*
* The following variable is deprecated and will be removed in Drupal 7:
* - $picture: This variable has been renamed $user_picture in Drupal 7.
*
* @see template_preprocess()
* @see template_preprocess_node()
* @see zen_preprocess()
* @see zen_preprocess_node()
* @see zen_process()
*/
?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix announce">
<div class="announce-inside clearfix">
<?php if (!$page && $title): ?>
<h2 class="title">
<a href="<?php print $node_url; ?>"><?php print $title; ?></a>
</h2>
<?php endif; ?>
<?php print $content; ?>
<a href="<?php print $field__announce_button_url[0]['safe'] ; ?>" class="button"><?php print $field__announce_button_label[0]['safe'] ; ?></a>
</div>
</div><!-- /.node -->
81 changes: 81 additions & 0 deletions templates/node-announcement.tpl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
/**
* @file
* Theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: Node body or teaser depending on $teaser flag.
* - $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.
* - $terms: the themed list of taxonomy term links output from theme_links().
* - $display_submitted: whether submission information should be displayed.
* - $submitted: Themed submission information output from
* theme_node_submitted().
* - $links: Themed links like "Read more", "Add new comment", etc. output
* from theme_links().
* - $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.
* The following applies only to viewers who are registered users:
* - node-by-viewer: Node is authored by the user currently viewing the page.
*
* 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:
* - $build_mode: Build mode, e.g. 'full', 'teaser'...
* - $teaser: Flag for the teaser state (shortcut for $build_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.
*
* The following variable is deprecated and will be removed in Drupal 7:
* - $picture: This variable has been renamed $user_picture in Drupal 7.
*
* @see template_preprocess()
* @see template_preprocess_node()
* @see zen_preprocess()
* @see zen_preprocess_node()
* @see zen_process()
*/
?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix">
<?php if (!$page && $title): ?>
<h2 class="title">
<a href="<?php print $node_url; ?>"><?php print $title; ?></a>
</h2>
<?php endif; ?>
<?php print $content; ?>
</div><!-- /.node -->
104 changes: 104 additions & 0 deletions templates/node.tpl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php
/**
* @file
* Theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: Node body or teaser depending on $teaser flag.
* - $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.
* - $terms: the themed list of taxonomy term links output from theme_links().
* - $display_submitted: whether submission information should be displayed.
* - $submitted: Themed submission information output from
* theme_node_submitted().
* - $links: Themed links like "Read more", "Add new comment", etc. output
* from theme_links().
* - $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.
* The following applies only to viewers who are registered users:
* - node-by-viewer: Node is authored by the user currently viewing the page.
*
* 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:
* - $build_mode: Build mode, e.g. 'full', 'teaser'...
* - $teaser: Flag for the teaser state (shortcut for $build_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.
*
* The following variable is deprecated and will be removed in Drupal 7:
* - $picture: This variable has been renamed $user_picture in Drupal 7.
*
* @see template_preprocess()
* @see template_preprocess_node()
* @see zen_preprocess()
* @see zen_preprocess_node()
* @see zen_process()
*/
?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix">
<?php print $user_picture; ?>

<?php if (!$page && $title): ?>
<h2 class="title"><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
<?php endif; ?>

<?php if ($unpublished): ?>
<div class="unpublished"><?php print t('Unpublished'); ?></div>
<?php endif; ?>

<?php if ($display_submitted || $terms): ?>
<div class="meta">
<?php if ($display_submitted): ?>
<span class="submitted">
<?php print $submitted; ?>
</span>
<?php endif; ?>

<?php if ($terms): ?>
<div class="terms terms-inline"><?php print $terms; ?></div>
<?php endif; ?>
</div>
<?php endif; ?>

<div class="content">
<?php print $content; ?>
</div>

<?php print $links; ?>
</div><!-- /.node -->

0 comments on commit b2d9cc0

Please sign in to comment.