diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme
index 6245b4d..6bdd8e2 100644
--- a/core/themes/bartik/bartik.theme
+++ b/core/themes/bartik/bartik.theme
@@ -78,7 +78,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
@@ -92,7 +92,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');
@@ -111,6 +111,23 @@ function bartik_process_maintenance_page(&$variables) {
}
/**
+ * Implements hook_preprocess_HOOK() for node.html.twig.
+ */
+function bartik_preprocess_node(&$variables) {
+ // Operate on a copy of links in order to preserve the original.
+ $links = $variables['content']['links'];
+
+ // Remove the "Add new comment" link on the teaser page or if the comment
+ // form is being displayed on the same page.
+ if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
+ unset($links['comment']['#links']['comment-add']);
+ }
+
+ // Render links to test if there is content present to display.
+ $variables['links'] = drupal_render($links);
+}
+
+/**
* Implements theme_menu_tree().
*/
function bartik_menu_tree($variables) {
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 fd8dfa7..0000000
--- a/core/themes/bartik/templates/comment-wrapper.tpl.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig
new file mode 100644
index 0000000..f783ec9
--- /dev/null
+++ b/core/themes/bartik/templates/comment.html.twig
@@ -0,0 +1,119 @@
+{#
+/**
+ * @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_var(content) to print them
+ * all, or print a subset such as render_var(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().
+ * - picture: Authors picture.
+ * - signature: Authors signature.
+ * - status: Comment status. Possible values are:
+ * unpublished, published, or 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; 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 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
+ */
+#}
+
+
+ {# /.comment-header #}
+
+
+ {# We hide the links now so that we can render them later. #}
+ {% hide(content.links) %}
+ {{ content }}
+
+
+
+ {# /.comment-footer #}
+
+
diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php
deleted file mode 100644
index a8c4924..0000000
--- a/core/themes/bartik/templates/comment.tpl.php
+++ /dev/null
@@ -1,135 +0,0 @@
-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
- */
-?>
- role="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 0000000..bd7f2a9
--- /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.tpl.php.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_maintenance_page()
+ * @see bartik_process_maintenance_page()
+ *
+ * @ingroup themeable
+ */
+ #}
+
+
+
+ {{ head }}
+ {{ head_title }}
+ {{ styles }}
+ {{ scripts }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if title %}{{ title }}
{% endif %}
+ {{ content }}
+ {% if messages %}
+
+ {% endif %}
+
+
+
+
+
+
+
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 8e56378..0000000
--- a/core/themes/bartik/templates/maintenance-page.tpl.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
->
-
-
-
-
-
-
-
diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig
new file mode 100644
index 0000000..09ec0a3
--- /dev/null
+++ b/core/themes/bartik/templates/node.html.twig
@@ -0,0 +1,111 @@
+{#
+/**
+ * @file
+ * Bartik's theme implementation to display a node.
+ *
+ * Available variables:
+ * - label: the title of the node.
+ * - content: 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 surrounding element.
+ * Attributes include the 'class' information, which contains:
+ * - 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: 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.
+ *
+ * Other variables:
+ * - node: Fully loaded node entity.
+ * - 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 as a Unix timestamp.
+ *
+ * Node status variables:
+ * - 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'.
+ * - promote: Flag for front page promotion state.
+ * - sticky: Flag for sticky post setting.
+ * - status: Flag for published status.
+ * - comment: State of comment settings for the node.
+ * - 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.
+ *
+ * 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
+ */
+#}
+
+
+
+
+
+ {# We hide the comments and links now so that we can render them later. #}
+ {% hide(content.comments) %}
+ {% hide(content.links) %}
+ {{ content }}
+
+
+ {% if links %}
+
+ {% endif %}
+
+ {{ content.comments }}
+
+
diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php
deleted file mode 100644
index eb5cf17..0000000
--- a/core/themes/bartik/templates/node.tpl.php
+++ /dev/null
@@ -1,121 +0,0 @@
-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
- */
-?>
- role="article">
-
-
-
-
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
-
-
-
-
-
-
-
-
-
-
{{ title }}
+ {{ title_suffix }} +