Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
{#
|
||||
/**
|
||||
* @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.
|
||||
* - attributes: HTML attributes for the wrapper.
|
||||
* - 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.
|
||||
*
|
||||
* @see template_preprocess_aggregator_item()
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes.addClass('aggregator-item') }}>
|
||||
{{ title_prefix }}
|
||||
<h3 class="feed-item-title">
|
||||
<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 id="node-{{ node.id }}" class="section-{{ depth }}">
|
||||
<h1 class="book-heading">{{ title }}</h1>
|
||||
{{ content }}
|
||||
{{ children }}
|
||||
</article>
|
111
web/core/themes/classy/templates/content/comment.html.twig
Normal file
111
web/core/themes/classy/templates/content/comment.html.twig
Normal file
|
@ -0,0 +1,111 @@
|
|||
{#
|
||||
/**
|
||||
* @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()
|
||||
*/
|
||||
#}
|
||||
{% if threaded %}
|
||||
{{ attach_library('classy/indented') }}
|
||||
{% endif %}
|
||||
{%
|
||||
set classes = [
|
||||
'comment',
|
||||
'js-comment',
|
||||
status != 'published' ? status,
|
||||
comment.owner.anonymous ? 'by-anonymous',
|
||||
author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author',
|
||||
]
|
||||
%}
|
||||
<article{{ attributes.addClass(classes) }}>
|
||||
{#
|
||||
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 class="comment__meta">
|
||||
{{ user_picture }}
|
||||
<p class="comment__submitted">{{ 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="parent visually-hidden">{{ parent }}</p>
|
||||
{% endif %}
|
||||
|
||||
{{ permalink }}
|
||||
</footer>
|
||||
|
||||
<div{{ content_attributes.addClass('content') }}>
|
||||
{% if title %}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }}>{{ title }}</h3>
|
||||
{{ title_suffix }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</div>
|
||||
</article>
|
|
@ -0,0 +1,40 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display node links.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: Attributes for the UL containing the list of links.
|
||||
* - links: Links to be output.
|
||||
* Each link will have the following elements:
|
||||
* - title: The link text.
|
||||
* - href: The link URL. If omitted, the 'title' is shown as a plain text
|
||||
* item in the links list. If 'href' is supplied, the entire link is passed
|
||||
* to l() as its $options parameter.
|
||||
* - attributes: (optional) HTML attributes for the anchor, or for the <span>
|
||||
* tag if no 'href' is supplied.
|
||||
* - heading: (optional) A heading to precede the links.
|
||||
* - text: The heading text.
|
||||
* - level: The heading level (e.g. 'h2', 'h3').
|
||||
* - attributes: (optional) A keyed list of attributes for the heading.
|
||||
* If the heading is a string, it will be used as the text of the heading and
|
||||
* the level will default to 'h2'.
|
||||
*
|
||||
* Headings should be used on navigation menus and any list of links that
|
||||
* consistently appears on multiple pages. To make the heading invisible use
|
||||
* the 'visually-hidden' CSS class. Do not use 'display:none', which
|
||||
* removes it from screen readers and assistive technology. Headings allow
|
||||
* screen reader and keyboard only users to navigate to or skip the links.
|
||||
* See http://juicystudio.com/article/screen-readers-display-none.php and
|
||||
* http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
|
||||
*
|
||||
* @see template_preprocess_links()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if links %}
|
||||
<div class="node__links">
|
||||
{% include "links.html.twig" %}
|
||||
</div>
|
||||
{% endif %}
|
20
web/core/themes/classy/templates/content/mark.html.twig
Normal file
20
web/core/themes/classy/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') %}
|
||||
<span class="marker">{{ 'New'|t }}</span>
|
||||
{% elseif status is constant('MARK_UPDATED') %}
|
||||
<span class="marker">{{ 'Updated'|t }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
108
web/core/themes/classy/templates/content/node.html.twig
Normal file
108
web/core/themes/classy/templates/content/node.html.twig
Normal file
|
@ -0,0 +1,108 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override to display a node.
|
||||
*
|
||||
* Available variables:
|
||||
* - node: The node entity with limited access to object properties and methods.
|
||||
* Only method names starting with "get", "has", or "is" and a few common
|
||||
* methods such as "id", "label", and "bundle" are available. For example:
|
||||
* - node.getCreatedTime() will return the node creation timestamp.
|
||||
* - node.hasField('field_example') returns TRUE if the node bundle includes
|
||||
* field_example. (This does not indicate the presence of a value in this
|
||||
* field.)
|
||||
* - node.isPublished() will return whether the node is published or not.
|
||||
* Calling other methods, such as node.delete(), will result in an exception.
|
||||
* See \Drupal\node\Entity\Node for a full list of public properties and
|
||||
* methods for the node object.
|
||||
* - 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.
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'node',
|
||||
'node--type-' ~ node.bundle|clean_class,
|
||||
node.isPromoted() ? 'node--promoted',
|
||||
node.isSticky() ? 'node--sticky',
|
||||
not node.isPublished() ? 'node--unpublished',
|
||||
view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
|
||||
]
|
||||
%}
|
||||
{{ attach_library('classy/node') }}
|
||||
<article{{ attributes.addClass(classes) }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer class="node__meta">
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes.addClass('node__submitted') }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes.addClass('node__content') }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</article>
|
|
@ -0,0 +1,19 @@
|
|||
{#
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
#}
|
||||
{{ title_prefix }}
|
||||
{% if title %}
|
||||
<h1{{ title_attributes.addClass('page-title') }}>{{ title }}</h1>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
|
@ -0,0 +1,72 @@
|
|||
{#
|
||||
/**
|
||||
* @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()
|
||||
*/
|
||||
#}
|
||||
{{ attach_library('classy/search-results') }}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes.addClass('search-result__title') }}>
|
||||
<a href="{{ url }}">{{ title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
<div class="search-result__snippet-info">
|
||||
{% if snippet %}
|
||||
<p{{ content_attributes.addClass('search-result__snippet') }}>{{ snippet }}</p>
|
||||
{% endif %}
|
||||
{% if info %}
|
||||
<p class="search-result__info">{{ info }}</p>
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,41 @@
|
|||
{#
|
||||
/**
|
||||
* @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()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'taxonomy-term',
|
||||
'vocabulary-' ~ term.bundle|clean_class,
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.setAttribute('id', 'taxonomy-term-' ~ term.id).addClass(classes) }}>
|
||||
{{ title_prefix }}
|
||||
{% if not page %}
|
||||
<h2><a href="{{ url }}">{{ name }}</a></h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
<div class="content">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
Reference in a new issue