Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
|
@ -0,0 +1,24 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to present a feed item in an aggregator page.
|
||||
*
|
||||
* Available variables:
|
||||
* - url: URL to the originating feed item.
|
||||
* - title: Title of the feed item.
|
||||
* - content: All field items. Use {{ content }} to print them all,
|
||||
* or print a subset such as {{ content.field_example }}. Use
|
||||
* {{ content|without('field_example') }} to temporarily suppress the printing
|
||||
* of a given element.
|
||||
*
|
||||
* @see template_preprocess_aggregator_item()
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes }}>
|
||||
{{ title_prefix }}
|
||||
<h3>
|
||||
<a href="{{ url }}">{{ title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
{{ content }}
|
||||
</article>
|
|
@ -0,0 +1,20 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a single node in a printer-friendly outline.
|
||||
*
|
||||
* Available variables:
|
||||
* - node: Fully loaded node.
|
||||
* - depth: Depth of the current node inside the outline.
|
||||
* - title: Node title.
|
||||
* - content: Node content.
|
||||
* - children: All the child nodes recursively rendered through this file.
|
||||
*
|
||||
* @see template_preprocess_book_node_export_html()
|
||||
*/
|
||||
#}
|
||||
<article>
|
||||
<h1>{{ title }}</h1>
|
||||
{{ content }}
|
||||
{{ children }}
|
||||
</article>
|
100
core/themes/stable/templates/content/comment.html.twig
Normal file
100
core/themes/stable/templates/content/comment.html.twig
Normal file
|
@ -0,0 +1,100 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override 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 the following code to temporarily suppress
|
||||
* the printing of a given child element:
|
||||
* @code
|
||||
* {{ content|without('field_example') }}
|
||||
* @endcode
|
||||
* - 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.
|
||||
* - permalink: Comment permalink.
|
||||
* - submitted: Submission information created from author and created
|
||||
* during template_preprocess_comment().
|
||||
* - user_picture: The comment author's profile picture.
|
||||
* - status: Comment status. Possible values are:
|
||||
* unpublished, published, or preview.
|
||||
* - title: Comment title, linked to the comment.
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* The attributes.class may contain one or more of the following classes:
|
||||
* - comment: The current template type; e.g., 'theming hook'.
|
||||
* - by-anonymous: Comment by an unregistered user.
|
||||
* - by-{entity-type}-author: Comment by the author of the parent entity,
|
||||
* eg. by-node-author.
|
||||
* - 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.
|
||||
* - 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.
|
||||
* - title_attributes: Same as attributes, except applied to the main title
|
||||
* tag that appears in the template.
|
||||
* - threaded: A flag indicating whether the comments are threaded or not.
|
||||
*
|
||||
* 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
|
||||
* visually-hidden.
|
||||
*
|
||||
* These two variables are provided for context:
|
||||
* - comment: Full comment object.
|
||||
* - entity: Entity the comments are attached to.
|
||||
*
|
||||
* @see template_preprocess_comment()
|
||||
*/
|
||||
#}
|
||||
|
||||
<article{{ attributes.addClass('js-comment') }}>
|
||||
{#
|
||||
Hide the "new" indicator by default, let a piece of JavaScript ask the
|
||||
server which comments are new for the user. Rendering the final "new"
|
||||
indicator here would break the render cache.
|
||||
#}
|
||||
<mark class="hidden" data-comment-timestamp="{{ new_indicator_timestamp }}"></mark>
|
||||
|
||||
<footer>
|
||||
{{ user_picture }}
|
||||
<p>{{ submitted }}</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="visually-hidden">{{ parent }}</p>
|
||||
{% endif %}
|
||||
|
||||
{{ permalink }}
|
||||
</footer>
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{% if title %}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }}>{{ title }}</h3>
|
||||
{{ title_suffix }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</div>
|
||||
</article>
|
20
core/themes/stable/templates/content/mark.html.twig
Normal file
20
core/themes/stable/templates/content/mark.html.twig
Normal file
|
@ -0,0 +1,20 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a marker for new or updated content.
|
||||
*
|
||||
* Available variables:
|
||||
* - status: Number representing the marker status to display. Use the constants
|
||||
* below for comparison:
|
||||
* - MARK_NEW
|
||||
* - MARK_UPDATED
|
||||
* - MARK_READ
|
||||
*/
|
||||
#}
|
||||
{% if logged_in %}
|
||||
{% if status is constant('MARK_NEW') %}
|
||||
{{ 'New'|t }}
|
||||
{% elseif status is constant('MARK_UPDATED') %}
|
||||
{{ 'Updated'|t }}
|
||||
{% endif %}
|
||||
{% endif %}
|
90
core/themes/stable/templates/content/node.html.twig
Normal file
90
core/themes/stable/templates/content/node.html.twig
Normal file
|
@ -0,0 +1,90 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a node.
|
||||
*
|
||||
* Available variables:
|
||||
* - node: The node entity with limited access to object properties and methods.
|
||||
Only "getter" methods (method names starting with "get", "has", or "is")
|
||||
and a few common methods such as "id" and "label" are available. Calling
|
||||
other methods (such as node.delete) will result in an exception.
|
||||
* - 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
|
||||
* {{ content|without('field_example') }} to temporarily suppress the printing
|
||||
* of a given child element.
|
||||
* - author_picture: The node author user entity, rendered using the "compact"
|
||||
* view mode.
|
||||
* - metadata: Metadata for this node.
|
||||
* - date: Themed creation date field.
|
||||
* - author_name: Themed author name field.
|
||||
* - url: Direct URL of the current node.
|
||||
* - display_submitted: Whether submission information should be displayed.
|
||||
* - 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-[type]: The current node type. For example, if the node is an
|
||||
* "Article" it would result in "node--type-article". Note that the machine
|
||||
* name will often be in a short form of the human readable label.
|
||||
* - node--view-mode-[view_mode]: The View Mode of the node; for example, a
|
||||
* teaser would result in: "node--view-mode-teaser", and
|
||||
* full: "node--view-mode-full".
|
||||
* The following are controlled through the node publishing options.
|
||||
* - node--promoted: Appears on nodes promoted to the front page.
|
||||
* - node--sticky: Appears on nodes ordered above other non-sticky nodes in
|
||||
* teaser listings.
|
||||
* - node--unpublished: Appears on unpublished nodes visible only to site
|
||||
* admins.
|
||||
* - title_attributes: Same as attributes, except applied to the main title
|
||||
* tag that appears in the template.
|
||||
* - content_attributes: Same as attributes, except applied to the main
|
||||
* content tag that appears in the template.
|
||||
* - author_attributes: Same as attributes, except applied to the author of
|
||||
* the node tag that appears in the template.
|
||||
* - 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.
|
||||
* - 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.
|
||||
*
|
||||
* @see template_preprocess_node()
|
||||
*
|
||||
* @todo Remove the id attribute (or make it a class), because if that gets
|
||||
* rendered twice on a page this is invalid CSS for example: two lists
|
||||
* in different view modes.
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</article>
|
21
core/themes/stable/templates/content/page-title.html.twig
Normal file
21
core/themes/stable/templates/content/page-title.html.twig
Normal file
|
@ -0,0 +1,21 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for page titles.
|
||||
*
|
||||
* Available variables:
|
||||
* - title_attributes: HTML attributes for the page title element.
|
||||
* - title_prefix: Additional output populated by modules, intended to be
|
||||
* displayed in front of the main title tag that appears in the template.
|
||||
* - title: The page title, for use in the actual content.
|
||||
* - title_suffix: Additional output populated by modules, intended to be
|
||||
* displayed after the main title tag that appears in the template.
|
||||
*
|
||||
* @see template_preprocess_page_title()
|
||||
*/
|
||||
#}
|
||||
{{ title_prefix }}
|
||||
{% if title %}
|
||||
<h1{{ title_attributes }}>{{ title }}</h1>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
69
core/themes/stable/templates/content/search-result.html.twig
Normal file
69
core/themes/stable/templates/content/search-result.html.twig
Normal file
|
@ -0,0 +1,69 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for displaying a single search result.
|
||||
*
|
||||
* This template renders a single search result. The list of results is
|
||||
* rendered using '#theme' => 'item_list', with suggestions of:
|
||||
* - item_list__search_results__(plugin_id)
|
||||
* - item_list__search_results
|
||||
*
|
||||
* Available variables:
|
||||
* - url: URL of the result.
|
||||
* - title: Title of the result.
|
||||
* - snippet: A small preview of the result. Does not apply to user searches.
|
||||
* - info: String of all the meta information ready for print. Does not apply
|
||||
* to user searches.
|
||||
* - plugin_id: The machine-readable name of the plugin being executed,such
|
||||
* as "node_search" or "user_search".
|
||||
* - 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.
|
||||
* - info_split: Contains same data as info, but split into separate parts.
|
||||
* - info_split.type: Node type (or item type string supplied by module).
|
||||
* - info_split.user: Author of the node linked to users profile. Depends
|
||||
* on permission.
|
||||
* - info_split.date: Last update of the node. Short formatted.
|
||||
* - info_split.comment: Number of comments output as "% comments", %
|
||||
* being the count. (Depends on comment.module).
|
||||
* @todo The info variable needs to be made drillable and each of these sub
|
||||
* items should instead be within info and renamed info.foo, info.bar, etc.
|
||||
*
|
||||
* Other variables:
|
||||
* - title_attributes: HTML attributes for the title.
|
||||
* - content_attributes: HTML attributes for the content.
|
||||
*
|
||||
* Since info_split is keyed, a direct print of the item is possible.
|
||||
* This array does not apply to user searches so it is recommended to check
|
||||
* for its existence before printing. The default keys of 'type', 'user' and
|
||||
* 'date' always exist for node searches. Modules may provide other data.
|
||||
* @code
|
||||
* {% if (info_split.comment) %}
|
||||
* <span class="info-comment">
|
||||
* {{ info_split.comment }}
|
||||
* </span>
|
||||
* {% endif %}
|
||||
* @endcode
|
||||
*
|
||||
* To check for all available data within info_split, use the code below.
|
||||
* @code
|
||||
* <pre>
|
||||
* {{ dump(info_split) }}
|
||||
* </pre>
|
||||
* @endcode
|
||||
*
|
||||
* @see template_preprocess_search_result()
|
||||
*/
|
||||
#}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }}>
|
||||
<a href="{{ url }}">{{ title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
{% if snippet %}
|
||||
<p{{ content_attributes }}>{{ snippet }}</p>
|
||||
{% endif %}
|
||||
{% if info %}
|
||||
<p>{{ info }}</p>
|
||||
{% endif %}
|
33
core/themes/stable/templates/content/taxonomy-term.html.twig
Normal file
33
core/themes/stable/templates/content/taxonomy-term.html.twig
Normal file
|
@ -0,0 +1,33 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a taxonomy term.
|
||||
*
|
||||
* Available variables:
|
||||
* - url: URL of the current term.
|
||||
* - name: Name of the current term.
|
||||
* - content: Items for the content of the term (fields and description).
|
||||
* Use 'content' to print them all, or print a subset such as
|
||||
* 'content.description'. Use the following code to exclude the
|
||||
* printing of a given child element:
|
||||
* @code
|
||||
* {{ content|without('description') }}
|
||||
* @endcode
|
||||
* - attributes: HTML attributes for the wrapper.
|
||||
* - page: Flag for the full page state.
|
||||
* - term: The taxonomy term entity, including:
|
||||
* - id: The ID of the taxonomy term.
|
||||
* - bundle: Machine name of the current vocabulary.
|
||||
* - view_mode: View mode, e.g. 'full', 'teaser', etc.
|
||||
*
|
||||
* @see template_preprocess_taxonomy_term()
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes}}>
|
||||
{{ title_prefix }}
|
||||
{% if not page %}
|
||||
<h2><a href="{{ url }}">{{ name }}</a></h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
{{ content }}
|
||||
</div>
|
Reference in a new issue