Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -15,13 +15,13 @@
#}
{% block content %}
{% if site_logo %}
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home" class="site-logo">
<a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home" class="site-logo">
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name %}
<div class="site-name">
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
<a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
</div>
{% endif %}
{% if site_slogan %}

View file

@ -10,6 +10,7 @@
* @see template_preprocess_file_managed_file()
*/
#}
{{ attach_library('classy/file') }}
{%
set classes = [
'js-form-managed-file',

View file

@ -10,6 +10,7 @@
* @see template_preprocess_file_widget()
*/
#}
{{ attach_library('classy/file') }}
<div{{ attributes }}>
{{ element }}
</div>

View file

@ -12,7 +12,7 @@
* - string classes: The classes of the captioned HTML tag.
*/
#}
<figure class="caption caption-{{ tag }}{%- if classes %} {{ classes }}{%- endif %}">
<figure role="group" class="caption caption-{{ tag }}{%- if classes %} {{ classes }}{%- endif %}">
{{ node }}
<figcaption>{{ caption }}</figcaption>
</figure>

View file

@ -10,6 +10,7 @@
* @see template_preprocess_image_widget()
*/
#}
{{ attach_library('classy/image-widget') }}
<div{{ attributes }}>
{% if data.preview %}
<div class="image-preview">

View file

@ -13,7 +13,7 @@
* @see template_preprocess_text_format_wrapper()
*/
#}
<div class="js-text-format-wrapper text-format-wrapper form-item">
<div class="js-text-format-wrapper text-format-wrapper js-form-item form-item">
{{ children }}
{% if description %}
{%

View file

@ -65,7 +65,7 @@
*/
#}
{% if threaded %}
{{ attach_library('classy/drupal.comment.threaded') }}
{{ attach_library('classy/indented') }}
{% endif %}
{%
set classes = [

View file

@ -0,0 +1,41 @@
{#
/**
* @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.
* - link_key: The link CSS class.
* - 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 %}

View file

@ -13,8 +13,8 @@
#}
{% if logged_in %}
{% if status is constant('MARK_NEW') %}
<span class="marker">{{ 'new'|t }}</span>
<span class="marker">{{ 'New'|t }}</span>
{% elseif status is constant('MARK_UPDATED') %}
<span class="marker">{{ 'updated'|t }}</span>
<span class="marker">{{ 'Updated'|t }}</span>
{% endif %}
{% endif %}

View file

@ -97,13 +97,7 @@
{% endif %}
<div{{ content_attributes.addClass('node__content') }}>
{{ content|without('links') }}
{{ content }}
</div>
{% if content.links %}
<div class="node__links">
{{ content.links }}
</div>
{% endif %}
</article>

View 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.addClass('page-title') }}>{{ title }}</h1>
{% endif %}
{{ title_suffix }}

View file

@ -56,7 +56,7 @@
* @see template_preprocess_search_result()
*/
#}
{{ attach_library('classy/search.results') }}
{{ attach_library('classy/search-results') }}
{{ title_prefix }}
<h3{{ title_attributes.addClass('search-result__title') }}>
<a href="{{ url }}">{{ title }}</a>

View file

@ -56,7 +56,7 @@
<div class="forum__icon forum-status-{{ forum.icon_class }}" title="{{ forum.icon_title }}">
<span class="visually-hidden">{{ forum.icon_title }}</span>
</div>
<div class="name"><a href="{{ forum.link }}">{{ forum.label }}</a></div>
<div class="forum__name"><a href="{{ forum.link }}">{{ forum.label }}</a></div>
{% if forum.description.value %}
<div class="forum__description">{{ forum.description.value }}</div>
{% endif %}

View file

@ -14,6 +14,7 @@
* @see template_preprocess_forums()
*/
#}
{{ attach_library('classy/forum') }}
{% if forums_defined %}
<div class="forum">
{{ forums }}

View file

@ -9,6 +9,7 @@
* - value: The content of the list element.
* - title: The title of the list.
* - list_type: The tag for list element ("ul" or "ol").
* - wrapper_attributes: HTML attributes to be applied to the list wrapper.
* - attributes: HTML attributes to be applied to the list.
* - empty: A message to display when there are no items. Allowed value is a
* string or render array.
@ -19,10 +20,11 @@
*/
#}
{% if context.list_style %}
{% set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{%- set wrapper_attributes = wrapper_attributes.addClass('item-list--' ~ context.list_style) %}
{%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{% endif %}
{%- if items or empty -%}
<div class="item-list">
{% if items or empty -%}
<div{{ wrapper_attributes.addClass('item-list') }}>
{%- if title is not empty -%}
<h3>{{ title }}</h3>
{%- endif -%}

View file

@ -1,16 +0,0 @@
{#
/**
* @file
* Theme override for displaying a tablesort indicator.
*
* Available variables:
* - style: Either 'asc' or 'desc', indicating the sorting direction.
*
* @see template_preprocess_tablesort_indicator()
*/
#}
{% if style == 'asc' -%}
<img src="{{ arrow_asc }}" width="13" height="13" alt="{{ 'sort ascending'|t }}" title="{{ 'sort ascending'|t }}" />
{% else -%}
<img src="{{ arrow_desc }}" width="13" height="13" alt="{{ 'sort descending'|t }}" title="{{ 'sort descending'|t }}" />
{% endif %}

View file

@ -22,7 +22,7 @@
{%
set classes = [
'field',
'field--name-' ~ field_name_class,
'field--name-' ~ field_name|clean_class,
'field--type-' ~ field_type|clean_class,
'field--label-' ~ label_display,
]

View file

@ -56,7 +56,7 @@
{% if multiple %}
<div{{ attributes.addClass(classes, 'field__items') }}>
{% for item in items %}
<div{{ item.attributes.addClass(classes, 'field__item') }}>{{ item.content }}</div>
<div{{ item.attributes.addClass('field__item') }}>{{ item.content }}</div>
{% endfor %}
</div>
{% else %}

View file

@ -11,4 +11,5 @@
* @see template_preprocess_file_link()
*/
#}
{{ attach_library('classy/file') }}
<span{{ attributes }}>{{ icon }} {{ link }}</span>

View file

@ -5,6 +5,7 @@
*
* Available variables
* - attributes: A list of HTML attributes for the details element.
* - errors: (optional) Any errors for this details element, may not be set.
* - title: (optional) The title of the element, may not be set.
* - description: (optional) The description of the element, may not be set.
* - children: (optional) The children of the element, may not be set.
@ -18,6 +19,11 @@
<summary{{ summary_attributes }}>{{ title }}</summary>
{%- endif -%}
<div class="details-wrapper">
{% if errors %}
<div class="form-item--error-message">
<strong>{{ errors }}</strong>
</div>
{% endif %}
{%- if description -%}
<div class="details-description">{{ description }}</div>
{%- endif -%}

View file

@ -11,17 +11,19 @@
*
* Available variables when there are multiple fields.
* - table: Table of field items.
* - description: Description text for the form element.
* - description: The description element containing the following properties:
* - content: The description content of the form element.
* - attributes: HTML attributes to apply to the description container.
* - button: "Add another item" button.
*
* @see template_preprocess_field_multiple_value_form()
*/
#}
{% if multiple %}
<div class="form-item">
<div class="js-form-item form-item">
{{ table }}
{% if description %}
<div class="description">{{ description }}</div>
{% if description.content %}
<div{{ description.attributes.addClass('description') }} >{{ description.content }}</div>
{% endif %}
{% if button %}
<div class="clearfix">{{ button }}</div>

View file

@ -22,6 +22,7 @@
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-wrapper',
'form-wrapper',

View file

@ -46,9 +46,11 @@
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-type-' ~ type|clean_class,
'form-type-' ~ type|clean_class,
'js-form-item-' ~ name|clean_class,
'form-item-' ~ name|clean_class,
title_display not in ['after', 'before'] ? 'form-no-label',
disabled == 'disabled' ? 'form-disabled',

View file

@ -7,9 +7,6 @@
* - logged_in: A flag indicating if user is logged in.
* - root_path: The root path of the current page (e.g., node, admin, user).
* - node_type: The content type for the current node, if the page is a node.
* - css: A list of CSS files for the current page.
* - head: Markup for the HEAD element (including meta tags, keyword tags, and
* so on).
* - head_title: List of text elements that make up the head_title variable.
* May contain or more of the following:
* - title: The title of the page.
@ -19,11 +16,9 @@
* - page: The rendered page markup.
* - page_bottom: Closing rendered markup. This variable should be printed after
* 'page'.
* - styles: HTML necessary to import all necessary CSS files in <head>.
* - scripts: HTML necessary to load JavaScript files and settings in <head>.
* - scripts_bottom: HTML necessary to load JavaScript files before closing
* <body> tag.
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
*
* @see template_preprocess_html()
*/
@ -39,10 +34,10 @@
<!DOCTYPE html>
<html{{ html_attributes }}>
<head>
{{ head }}
<head-placeholder token="{{ placeholder_token|raw }}">
<title>{{ head_title|safe_join(' | ') }}</title>
{{ styles }}
{{ scripts }}
<css-placeholder token="{{ placeholder_token|raw }}">
<js-placeholder token="{{ placeholder_token|raw }}">
</head>
<body{{ attributes.addClass(body_classes) }}>
<a href="#main-content" class="visually-hidden focusable skip-link">
@ -51,6 +46,6 @@
{{ page_top }}
{{ page }}
{{ page_bottom }}
{{ scripts_bottom }}
<js-bottom-placeholder token="{{ placeholder_token|raw }}">
</body>
</html>

View file

@ -26,11 +26,6 @@
* slogan has been disabled in theme settings.
*
* Page content (in order of occurrence in the default page.html.twig):
* - 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.
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
@ -56,32 +51,6 @@
<div class="layout-container">
<header role="banner">
{% if logo %}
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">
<img src="{{ logo }}" alt="{{ 'Home'|t }}"/>
</a>
{% endif %}
{% if site_name or site_slogan %}
<div class="name-and-slogan">
{# Use h1 when the content title is empty #}
{% if title %}
<strong class="site-name">
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
</strong>
{% else %}
<h1 class="site-name">
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
</h1>
{% endif %}
{% if site_slogan %}
<div class="site-slogan">{{ site_slogan }}</div>
{% endif %}
</div>{# ./name-and-slogan #}
{% endif %}
{{ page.header }}
</header>
@ -98,13 +67,6 @@
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
<div class="layout-content">
{{ page.highlighted }}
{{ title_prefix }}
{% if title %}
<h1>{{ title }}</h1>
{% endif %}
{{ title_suffix }}
{{ page.content }}
</div>{# /.layout-content #}

View file

@ -11,6 +11,7 @@
* - message: A string containing information to be displayed.
*/
#}
{{ attach_library('classy/progress') }}
<div class="progress" data-drupal-progress>
{% if label %}
<div class="progress__label">{{ label }}</div>

View file

@ -23,6 +23,7 @@
* @see template_preprocess_status_messages()
*/
#}
{{ attach_library('classy/messages') }}
{% block messages %}
{% for type, messages in message_list %}
{%

View file

@ -11,6 +11,11 @@
* - below: The book item child items.
* - title: The book link title.
* - url: The book link URL, instance of \Drupal\Core\Url.
* - is_expanded: TRUE if the link has visible children within the current
* book tree.
* - is_collapsed: TRUE if the link has children within the current book tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*/
#}
{% import _self as book_tree %}
@ -29,14 +34,22 @@
{% else %}
<ul class="menu">
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ book_tree.book_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
{% for item in items %}
{%
set classes = [
'menu-item',
item.is_expanded ? 'menu-item--expanded',
item.is_collapsed ? 'menu-item--collapsed',
item.in_active_trail ? 'menu-item--active-trail',
]
%}
<li{{ item.attributes.addClass(classes) }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ book_tree.book_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}

View file

@ -11,6 +11,11 @@
* - title: The menu link title.
* - url: The menu link url, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*/
#}
{% import _self as menus %}
@ -29,14 +34,22 @@
{% else %}
<ul class="menu">
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
{% for item in items %}
{%
set classes = [
'menu-item',
item.is_expanded ? 'menu-item--expanded',
item.is_collapsed ? 'menu-item--collapsed',
item.in_active_trail ? 'menu-item--active-trail',
]
%}
<li{{ item.attributes.addClass(classes) }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}

View file

@ -17,8 +17,8 @@
* items.pages contain the following elements:
* - href: URL with appropriate query parameters for the item.
* - attributes: A keyed list of HTML attributes for the item.
* - text: The visible text used for the item link, such as " previous"
* or "next ".
* - text: The visible text used for the item link, such as " Previous"
* or "Next ".
* - current: The page number of the current page.
* - ellipses: If there are more pages than the quantity allows, then an
* ellipsis before or after the listed pages may be present.
@ -38,7 +38,7 @@
<li class="pager__item pager__item--first">
<a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}"{{ items.first.attributes|without('href', 'title') }}>
<span class="visually-hidden">{{ 'First page'|t }}</span>
<span aria-hidden="true">{{ items.first.text|default(first'|t) }}</span>
<span aria-hidden="true">{{ items.first.text|default(First'|t) }}</span>
</a>
</li>
{% endif %}
@ -47,7 +47,7 @@
<li class="pager__item pager__item--previous">
<a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
<span class="visually-hidden">{{ 'Previous page'|t }}</span>
<span aria-hidden="true">{{ items.previous.text|default(' previous'|t) }}</span>
<span aria-hidden="true">{{ items.previous.text|default(' Previous'|t) }}</span>
</a>
</li>
{% endif %}
@ -80,7 +80,7 @@
<li class="pager__item pager__item--next">
<a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
<span class="visually-hidden">{{ 'Next page'|t }}</span>
<span aria-hidden="true">{{ items.next.text|default('next '|t) }}</span>
<span aria-hidden="true">{{ items.next.text|default('Next '|t) }}</span>
</a>
</li>
{% endif %}
@ -89,7 +89,7 @@
<li class="pager__item pager__item--last">
<a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}"{{ items.last.attributes|without('href', 'title') }}>
<span class="visually-hidden">{{ 'Last page'|t }}</span>
<span aria-hidden="true">{{ items.last.text|default('last »'|t) }}</span>
<span aria-hidden="true">{{ items.last.text|default('Last »'|t) }}</span>
</a>
</li>
{% endif %}