diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 966134f5d755f5a8bbbd8d52f0f548f76ff17156..0593a3c7d69b907cd440312f4ee18c4a55f61c2c 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -92,7 +92,7 @@ function bartik_process_page(&$variables) { } /** - * Implements hook_preprocess_HOOK() for maintenance-page.tpl.php. + * Implements hook_preprocess_HOOK() for maintenance-page.html.twig. */ function bartik_preprocess_maintenance_page(&$variables) { // By default, site_name is set to Drupal if no db connection is available @@ -106,7 +106,7 @@ function bartik_preprocess_maintenance_page(&$variables) { } /** - * Implements hook_process_HOOK() for maintenance-page.tpl.php. + * Implements hook_process_HOOK() for maintenance-page.html.twig. */ function bartik_process_maintenance_page(&$variables) { $site_config = config('system.site'); @@ -124,6 +124,17 @@ function bartik_process_maintenance_page(&$variables) { } } +/** + * Implements hook_preprocess_HOOK() for node.html.twig. + */ +function bartik_preprocess_node(&$variables) { + // Remove the "Add new comment" link on teasers or when the comment form is + // displayed on the page. + if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) { + unset($variables['content']['links']['comment']['#links']['comment-add']); + } +} + /** * Implements theme_menu_tree(). */ diff --git a/core/themes/bartik/templates/comment-wrapper.tpl.php b/core/themes/bartik/templates/comment-wrapper.tpl.php deleted file mode 100644 index fd8dfa71d6b56b99aa3dd8efe77fa9e110ed1adc..0000000000000000000000000000000000000000 --- a/core/themes/bartik/templates/comment-wrapper.tpl.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/** - * @file - * Bartik's theme implementation to provide an HTML container for comments. - * - * Available variables: - * - $content: The array of content-related elements for the node. Use - * render($content) to print them all, or - * print a subset such as render($content['comment_form']). - * - $attributes: An instance of Attributes class that can be manipulated as an - * array and printed as a string. - * It includes the 'class' information, which includes: - * - comment-wrapper: The current template type, i.e., "theming hook". - * - $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. - * - * The following variables are provided for contextual information. - * - $node: Node entity the comments are attached to. - * The constants below the variables show the possible values and should be - * used for comparison. - * - $display_mode - * - COMMENT_MODE_FLAT - * - COMMENT_MODE_THREADED - * - * @see template_preprocess_comment_wrapper() - * - * @ingroup themeable - */ -?> -<section id="comments" <?php print $attributes; ?>> - <?php if ($content['comments'] && $node->type != 'forum'): ?> - <?php print render($title_prefix); ?> - <h2 class="title"><?php print t('Comments'); ?></h2> - <?php print render($title_suffix); ?> - <?php endif; ?> - - <?php print render($content['comments']); ?> - - <?php if ($content['comment_form']): ?> - <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2> - <?php print render($content['comment_form']); ?> - <?php endif; ?> -</section> diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..48fd39178ed4077b740bb72a5f40d3c941188d17 --- /dev/null +++ b/core/themes/bartik/templates/comment.html.twig @@ -0,0 +1,130 @@ +{# +/** + * @file + * Bartik's theme implementation for comments. + * + * Available variables: + * - author: Comment author. Can be a link or plain text. + * - content: The content-related items for the comment display. Use + * {{ content }} to print them all, or print a subset such as + * {{ 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. + * - submitted: Submission information created from author and created + * during template_preprocess_comment(). + * - user_picture: The comment author's profile picture. + * - signature: The comment author's signature. + * - status: Comment status. Possible values are: + * unpublished, published, or preview. + * - title: Comment title, linked to the comment. + * - attributes.class: List of classes that can be used to style contextually + * through CSS. The default values can be one or more of the following: + * - comment: The current template type; e.g., 'theming hook'. + * - by-anonymous: Comment by an unregistered user. + * - by-node-author: Comment by the author of the parent node. + * - preview: When previewing a new or edited comment. + * The following applies only to viewers who are registered users: + * - unpublished: An unpublished comment visible only to administrators. + * - by-viewer: Comment by the user currently viewing the page. + * - new: New comment since the last visit. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - content_attributes: List of classes for the styling of the comment content. + * + * These variables are provided to give context about the parent comment (if + * any): + * - comment_parent: Full parent comment entity (if any). + * - parent_author: Equivalent to author for the parent comment. + * - parent_created: Equivalent to created for the parent comment. + * - parent_changed: Equivalent to changed for the parent comment. + * - parent_title: Equivalent to title for the parent comment. + * - parent_permalink: Equivalent to permalink for the parent comment. + * - parent: A text string of parent comment submission information created from + * 'parent_author' and 'parent_created' during template_preprocess_comment(). + * This information is presented to help screen readers follow lengthy + * discussion threads. You can hide this from sighted users using the class + * element-invisible. + * + * These two variables are provided for context: + * - comment: Full comment object. + * - node: Node entity the comments are attached to. + * + * @see template_preprocess() + * @see template_preprocess_comment() + * + * @ingroup themeable + */ +#} +<article class="{{ attributes.class }} clearfix"{{ attributes }} role="article"> + + <header class="comment-header"> + + <div class="attribution"> + {{ user_picture }} + + <div class="submitted"> + <p class="commenter-name"> + {{ author }} + </p> + <p class="comment-time"> + {{ created }} + </p> + <p class="comment-permalink"> + {{ permalink }} + </p> + {# + // Indicate the semantic relationship between parent and child comments + // for accessibility. The list is difficult to navigate in a screen + // reader without this information. + #} + {% if parent %} + <p class="comment-parent element-invisible"> + {{ parent }} + </p> + {% endif %} + </div> + </div> <!-- /.attribution --> + + <div class="comment-text"> + <div class="comment-arrow"></div> + + {% if new %} + <span class="new">{{ new }}</span> + {% endif %} + + {{ title_prefix }} + <h3{{ title_attributes }}>{{ title }}</h3> + {{ title_suffix }} + </div> <!-- /.comment-text --> + + </header> <!-- /.comment-header --> + + <div{{ content_attributes }}> + {# We hide the links now so that we can render them later. #} + {% hide(content.links) %} + {{ content }} + + </div> <!-- /.content --> + + <footer class="comment-footer"> + {% if signature %} + <div class="user-signature clearfix"> + {{ signature }} + </div> + {% endif %} + + <nav> + {{ content.links }} + </nav> + </footer> <!-- /.comment-footer --> + +</article> diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php deleted file mode 100644 index a8c49243344156c643a168585bad19220b27a5f6..0000000000000000000000000000000000000000 --- a/core/themes/bartik/templates/comment.tpl.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -/** - * @file - * Bartik's theme implementation for comments. - * - * Available variables: - * - $author: Comment author. Can be a 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. - * - $submitted: Submission information created from $author and $created - * during template_preprocess_comment(). - * - $signature: Authors signature. - * - $status: Comment status. Possible values are: - * unpublished, published, or preview. - * - $title: Linked title. - * - $attributes: An instance of Attributes class that can be manipulated as an - * array and printed as a string. - * It includes the 'class' information, which includes: - * - comment: The current template type; e.g., 'theming hook'. - * - by-anonymous: Comment by an unregistered user. - * - by-node-author: Comment by the author of the parent node. - * - preview: When previewing a new or edited comment. - * The following applies only to viewers who are registered users: - * - unpublished: An unpublished comment visible only to administrators. - * - by-viewer: Comment by the user currently viewing the page. - * - new: New comment since the last 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 variables are provided to give context about the parent comment (if - * any): - * - $comment_parent: Full parent comment object (if any). - * - $parent_author: Equivalent to $author for the parent comment. - * - $parent_created: Equivalent to $created for the parent comment. - * - $parent_changed: Equivalent to $changed for the parent comment. - * - $parent_title: Equivalent to $title for the parent comment. - * - $parent_permalink: Equivalent to $permalink for the parent comment. - * - $parent: A text string of parent comment submission information created - * from $parent_author and $parent_created during - * template_preprocess_comment(). This information is presented to help - * screen readers follow lengthy discussion threads. You can hide this from - * sighted users using the class element-invisible. - * - * These two variables are provided for context: - * - $comment: Full comment object. - * - $node: Node entity the comments are attached to. - * - * @see template_preprocess() - * @see template_preprocess_comment() - * @see template_process() - * @see theme_comment() - * - * @ingroup themeable - */ -?> -<article class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article"> - - <header class="comment-header"> - - <div class="attribution"> - <?php print render($user_picture); ?> - - <div class="submitted"> - <p class="commenter-name"> - <?php print $author; ?> - </p> - <p class="comment-time"> - <?php print $created; ?> - </p> - <p class="comment-permalink"> - <?php print $permalink; ?> - </p> - <?php - // Indicate the semantic relationship between parent and child comments - // for accessibility. The list is difficult to navigate in a screen - // reader without this information. - if ($parent): - ?> - <p class="comment-parent element-invisible"> - <?php print $parent; ?> - </p> - <?php endif; ?> - </div> - </div> <!-- /.attribution --> - - <div class="comment-text"> - <div class="comment-arrow"></div> - - <?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); ?> - </div> <!-- /.comment-text --> - - </header> <!-- /.comment-header --> - - <div class="content"<?php print $content_attributes; ?>> - <?php - // We hide the comments and links now so that we can render them later. - hide($content['links']); - print render($content); - ?> - </div> <!-- /.content --> - - <footer class="comment-footer"> - <?php if ($signature): ?> - <div class="user-signature clearfix"> - <?php print $signature; ?> - </div> - <?php endif; ?> - - <nav> - <?php print render($content['links']); ?> - </nav> - </footer> <!-- /.comment-footer --> - -</article> diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..2d49784133d0ca08d58ce8ff0c2a4b86fcff52c3 --- /dev/null +++ b/core/themes/bartik/templates/maintenance-page.html.twig @@ -0,0 +1,66 @@ +{# +/** + * @file + * Bartik's theme implementation to display a single Drupal page while offline. + * + * All of the available variables are mirrored in page.html.twig. + * + * @see template_preprocess() + * @see template_preprocess_maintenance_page() + * @see bartik_process_maintenance_page() + * + * @ingroup themeable + */ + #} +<!DOCTYPE html> +<html lang="{{ language.langcode }}" dir="{{ language.dir }}"> +<head> + {{ head }} + <title>{{ head_title }}</title> + {{ styles }} + {{ scripts }} +</head> +<body class="{{ attributes.class }}"{{ attributes }}> + + <div id="skip-link"> + <a href="#main-content" class="element-invisible element-focusable">{{ 'Skip to main content'|t }}</a> + </div> + + <div id="page-wrapper"><div id="page"> + + <header id="header" role="banner"><div class="section clearfix"> + {% if site_name or site_slogan %} + <div id="name-and-slogan"{{ hide_site_name and hide_site_slogan ? ' class="element-invisible"' }}> + {% if site_name %} + <div id="site-name"{{ hide_site_name ? ' class="element-invisible"' }}> + <strong> + <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a> + </strong> + </div> + {% endif %} + {% if site_slogan %} + <div id="site-slogan"{{ hide_site_slogan ? ' class="element-invisible"' }}> + {{ site_slogan }} + </div> + {% endif %} + </div> <!-- /#name-and-slogan --> + {% endif %} + </div></header> <!-- /.section, /#header --> + + <div id="main-wrapper"><div id="main" class="clearfix"> + <main id="content" class="column" role="main"><section class="section"> + <a id="main-content"></a> + {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %} + {{ content }} + {% if messages %} + <div id="messages"><div class="section clearfix"> + {{ messages }} + </div></div> <!-- /.section, /#messages --> + {% endif %} + </section></main> <!-- /.section, /#content --> + </div></div> <!-- /#main, /#main-wrapper --> + + </div></div> <!-- /#page, /#page-wrapper --> + +</body> +</html> diff --git a/core/themes/bartik/templates/maintenance-page.tpl.php b/core/themes/bartik/templates/maintenance-page.tpl.php deleted file mode 100644 index 8e56378e36772a1db3dd6a44300548e784fa43c1..0000000000000000000000000000000000000000 --- a/core/themes/bartik/templates/maintenance-page.tpl.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/** - * @file - * Bartik's theme implementation to display a single Drupal page while offline. - * - * All of the available variables are mirrored in page.tpl.php. - * - * @see template_preprocess() - * @see template_preprocess_maintenance_page() - * @see bartik_process_maintenance_page() - * - * @ingroup themeable - */ -?> -<!DOCTYPE html> -<html lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>"> -<head> - <?php print $head; ?> - <title><?php print $head_title; ?></title> - <?php print $styles; ?> - <?php print $scripts; ?> -</head> -<body class="<?php print $attributes['class']; ?>" <?php print $attributes;?>> - - <div id="skip-link"> - <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a> - </div> - - <div id="page-wrapper"><div id="page"> - - <header id="header" role="banner"><div class="section clearfix"> - <?php if ($site_name || $site_slogan): ?> - <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>> - <?php if ($site_name): ?> - <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>> - <strong> - <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a> - </strong> - </div> - <?php endif; ?> - <?php if ($site_slogan): ?> - <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>> - <?php print $site_slogan; ?> - </div> - <?php endif; ?> - </div> <!-- /#name-and-slogan --> - <?php endif; ?> - </div></header> <!-- /.section, /#header --> - - <div id="main-wrapper"><div id="main" class="clearfix"> - <main id="content" class="column" role="main"><section class="section"> - <a id="main-content"></a> - <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?> - <?php print $content; ?> - <?php if ($messages): ?> - <div id="messages"><div class="section clearfix"> - <?php print $messages; ?> - </div></div> <!-- /.section, /#messages --> - <?php endif; ?> - </section></main> <!-- /.section, /#content --> - </div></div> <!-- /#main, /#main-wrapper --> - - </div></div> <!-- /#page, /#page-wrapper --> - -</body> -</html> diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..68a4a93378c4513b98638eedb5592755cd33884f --- /dev/null +++ b/core/themes/bartik/templates/node.html.twig @@ -0,0 +1,115 @@ +{# +/** + * @file + * Bartik's theme implementation to display a node. + * + * Available variables: + * - node: Full node entity. + * - type: The type of the node, for example, "page" or "article". + * - uid: The user ID of the node author. + * - created: Formatted creation date. Preprocess functions can reformat it by + * calling format_date() with the desired parameters on + * $variables['node']->created. + * - promote: Whether the node is promoted to the front page. + * - sticky: Whether the node is 'sticky'. Sticky nodes are ordered above + * other non-sticky nodes in teaser listings + * - status: Whether the node is published. + * - comment: A value representing the comment status of the current node. May + * be one of the following: + * - 0: The comment form and any existing comments are hidden. + * - 1: Comments are closed. No new comments may be posted, but existing + * comments are displayed. + * - 2: Comments are open on this node. + * - comment_count: Number of comments attached to the node. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ 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.html.twig. + * - date: Formatted creation date. Preprocess functions can reformat it by + * calling format_date() with the desired parameters on + * $variables['created']. + * - 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. + * - submitted: Submission information created from name and date during + * template_preprocess_node(). + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node-[type]: The current node type. For example, if the node is a + * "Article" it would result in "node-article". Note that the machine + * name will often be in a short form of the human readable label. + * - view-mode-[view_mode]: The View Mode of the node; for example, a teaser + * would result in: "view-mode-teaser", and full: "view-mode-full". + * - preview: Whether a node is in preview mode. + * The following are controlled through the node publishing options. + * - promoted: Appears on nodes promoted to the front page. + * - sticky: Appears on nodes ordered above other non-sticky nodes in teaser + * listings. + * - unpublished: Appears on unpublished nodes visible only to site admins. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - is_front: Flag for front. Will be true when presented on the front page. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * In field variables, each field instance attached to the node a corresponding + * variable is defined; for example, '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; for example, 'node.body.en', thus overriding any + * language negotiation rule that may have been applied previously. + * + * @see template_preprocess() + * @see template_preprocess_node() + * + * @ingroup themeable + */ +#} +<article id="node-{{ node.nid }}" class="{{ attributes.class}} clearfix"{{ attributes }} role="article"> + + <header> + {{ title_prefix }} + {% if not page %} + <h2{{ title_attributes }}> + <a href="{{ node_url }}">{{ label }}</a> + </h2> + {% endif %} + {{ title_suffix }} + + {% if display_submitted %} + <div class="meta submitted"> + {{ user_picture }} + {{ submitted }} + </div> + {% endif %} + </header> + + <div class="content clearfix"{{ content_attributes }}> + {# We hide the comments and links now so that we can render them later. #} + {% hide(content.comments) %} + {% hide(content.links) %} + {{ content }} + </div> + + {% if content.links %} + <footer class="link-wrapper"> + {{ content.links }} + </footer> + {% endif %} + + {{ content.comments }} + +</article> diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php deleted file mode 100644 index eb5cf17f7709b6c23b120709161e9665d336409f..0000000000000000000000000000000000000000 --- a/core/themes/bartik/templates/node.tpl.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -/** - * @file - * Bartik's theme implementation to display a node. - * - * Available variables: - * - $label: 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. Use render() when printing. - * - $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. - * - $submitted: Submission information created from $name and $date during - * template_preprocess_node(). - * - $attributes: An instance of Attributes class that can be manipulated as an - * array and printed as a string. - * It includes the 'class' information, which includes: - * - node: The current template type; for example, "theming hook". - * - node-[type]: The current node type. For example, if the node is a - * "Article" it would result in "node-article". Note that the machine - * name will often be in a short form of the human readable label. - * - view-mode-[view_mode]: The View Mode of the node; for example, "teaser" - * or "full". - * - preview: Nodes in preview mode. - * The following are controlled through the node publishing options. - * - promoted: Nodes promoted to the front page. - * - sticky: Nodes ordered above other non-sticky nodes in teaser - * listings. - * - 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 entity. Contains data that may not be safe. - * - $type: Node type; for example, page, article, 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. - * - * Node status variables: - * - $view_mode: View mode; for example, "teaser" or "full". - * - $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. - * - $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; for example, $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; for example, $node->body['en'], thus - * overriding any language negotiation rule that was previously applied. - * - * @see template_preprocess() - * @see template_preprocess_node() - * @see template_process() - * - * @ingroup themeable - */ -?> -<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article"> - - <header> - <?php print render($title_prefix); ?> - <?php if (!$page): ?> - <h2<?php print $title_attributes; ?>> - <a href="<?php print $node_url; ?>"><?php print $label; ?></a> - </h2> - <?php endif; ?> - <?php print render($title_suffix); ?> - - <?php if ($display_submitted): ?> - <div class="meta submitted"> - <?php print render($user_picture); ?> - <?php print $submitted; ?> - </div> - <?php endif; ?> - </header> - - <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']); - print render($content); - ?> - </div> - - <?php - // Remove the "Add new comment" link on the teaser page or if the comment - // form is being displayed on the same page. - if ($teaser || !empty($content['comments']['comment_form'])) { - unset($content['links']['comment']['#links']['comment-add']); - } - // Only display the footer if there are links. - $links = render($content['links']); - if ($links): - ?> - <footer class="link-wrapper"> - <?php print $links; ?> - </footer> - <?php endif; ?> - - <?php print render($content['comments']); ?> - -</article>