Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176

This commit is contained in:
Pantheon Automation 2015-08-17 17:00:26 -07:00 committed by Greg Anderson
commit 9921556621
13277 changed files with 1459781 additions and 0 deletions

View file

@ -0,0 +1,23 @@
{% extends "@classy/block/block--search-form-block.html.twig" %}
{#
/**
* @file
* Bartik's theme implementation for a search form block. Extends Classy's
* search form block template.
*
* Available variables:
* - content: The content of this block.
* - content_attributes: A list of HTML attributes applied to the main content
* tag that appears in the template.
*
* @see template_preprocess_block()
* @see search_preprocess_block()
*
* @ingroup themeable
*/
#}
{% block content %}
<div{{ content_attributes.addClass('content', 'container-inline') }}>
{{ parent() }}
</div>
{% endblock %}

View file

@ -0,0 +1,34 @@
{% extends "block.html.twig" %}
{#
/**
* @file
* Bartik's theme implementation for a branding block.
*
* Each branding element variable (logo, name, slogan) is only available if
* enabled in the block configuration.
*
* Available variables:
* - site_logo: Logo for site as defined in Appearance or theme settings.
* - site_name: Name for site as defined in Site information settings.
* - site_slogan: Slogan for site as defined in Site information settings.
*/
#}
{% block content %}
{% if site_logo %}
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home" class="site-logo">
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name or site_slogan %}
<div class="site-branding-text">
{% if site_name %}
<strong class="site-name">
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
</strong>
{% endif %}
{% if site_slogan %}
<div class="site-slogan">{{ site_slogan }}</div>
{% endif %}
</div>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends "@classy/block/block--system-menu-block.html.twig" %}
{#
/**
* @file
* Bartik's theme implementation for a menu block.
*
* @ingroup themeable
*/
#}
{% set show_anchor = "show-" ~ attributes.id|clean_id %}
{% set hide_anchor = "hide-" ~ attributes.id|clean_id %}
{% block content %}
<div{{ content_attributes.addClass('content') }}>
{# When rendering a menu without label, render a menu toggle. #}
<div class="menu-toggle-target menu-toggle-target-show" id="{{ show_anchor }}"></div>
<div class="menu-toggle-target" id="{{ hide_anchor }}"></div>
<a class="menu-toggle" href="#{{ show_anchor }}">{{ 'Menu'|t }}</a>
<a class="menu-toggle menu-toggle--hide" href="#{{ hide_anchor }}">{{ 'Menu'|t }}</a>
{{ content }}
</div>
{% endblock %}

View file

@ -0,0 +1,56 @@
{#
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - module: The module that provided this block plugin.
* - cache: The cache settings.
* - Block plugin specific settings will also be stored here.
* - block - The full block entity.
* - label_hidden: The hidden block title value if the block was
* configured to hide the title ('label' is empty in this case).
* - module: The module that generated the block.
* - delta: An ID for the block, unique within each module.
* - region: The block region embedding the current block.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - 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.
* - 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_block()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'block',
'block-' ~ configuration.provider|clean_class,
]
%}
<div{{ attributes.addClass(classes) }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
<div{{ content_attributes.addClass('content') }}>
{{ content }}
</div>
{% endblock %}
</div>

View file

@ -0,0 +1,119 @@
{#
/**
* @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 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.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - content_attributes: List of classes for the styling of the comment content.
* - 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/drupal.comment.threaded') }}
{% endif %}
{%
set classes = [
'comment',
status != 'published' ? 'comment--' ~ status,
comment.owner.anonymous ? 'by-anonymous',
author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author',
'clearfix',
]
%}
<article role="article"{{ attributes.addClass(classes)|without('role') }}>
<header class="comment-header">
<div class="comment__attribution">
{{ user_picture }}
<div class="comment__submitted">
<p class="comment__author comment__submitted__data">{{ author }}</p>
<p class="comment__time comment__submitted__data">{{ created }}</p>
<p class="comment__permalink comment__submitted__data">{{ 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="visually-hidden">{{ parent }}</p>
{% endif %}
</div>
</div>
</header>
<div class="comment__text">
{#
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.
#}
<span class="hidden new" data-comment-timestamp="{{ new_indicator_timestamp }}"></span>
{% if title %}
{{ title_prefix }}
<h3{{ title_attributes }}>{{ title }}</h3>
{{ title_suffix }}
{% endif %}
<div{{ content_attributes.addClass('comment__content') }}>
{{ content|without('links') }}
</div>
<footer class="comment__footer">
{% if content.links %}
<nav>{{ content.links }}</nav>
{% endif %}
</footer>
</div>
</article>

View file

@ -0,0 +1,50 @@
{#
/**
* @file
* Bartik theme override for taxonomy term fields.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the label.
* - label: The label for the field.
* - content_attributes: HTML attributes for the content.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
* @see template_preprocess_field()
* @see bartik_preprocess_field()
*/
#}
{% set field_name_class = field_name|clean_class %}
{%
set classes = [
'field',
'field-' ~ entity_type|clean_class ~ '--' ~ field_name_class,
'field-name-' ~ field_name_class,
'field-type-' ~ field_type|clean_class,
'field-label-' ~ label_display,
'clearfix',
]
%}
{%
set title_classes = [
'field-label',
label_display == 'inline' ? 'inline',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if not label_hidden %}
<h3{{ title_attributes.addClass(title_classes) }}>{{ label }}</h3>
{% endif %}
<ul{{ content_attributes.addClass('links', 'field-items') }}>
{% for item in items %}
<li{{ item.attributes }}>{{ item.content }}</li>
{% endfor %}
</ul>
</div>

View file

@ -0,0 +1,48 @@
{#
/**
* @file
* Bartik's theme implementation to display a single Drupal page while offline.
*
* All available variables are mirrored in page.html.twig.
*
* @see template_preprocess_maintenance_page()
*/
#}
<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="visually-hidden"' }}>
{% if site_name %}
<div id="site-name"{{ hide_site_name ? ' class="visually-hidden"' }}>
<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="visually-hidden"' }}>
{{ site_slogan }}
</div>
{% endif %}
</div>
{% endif %}
</div>
</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 %}
{{ page.content }}
{{ page.highlighted }}
</section>
</main>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,101 @@
{#
/**
* @file
* Bartik's theme implementation to display a node.
*
* Available variables:
* - node: Full node entity.
* - id: The node ID.
* - bundle: The type of the node, for example, "page" or "article".
* - authorid: The user ID of the node author.
* - createdtime: Time the node was published formatted in Unix timestamp.
* - changedtime: Time the node was changed formatted in Unix timestamp.
* - 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()
*/
#}
{%
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,
'clearfix',
]
%}
<article{{ attributes.addClass(classes) }}>
<header>
{{ title_prefix }}
{% if not page %}
<h2{{ title_attributes.addClass('node__title') }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
{% if display_submitted %}
<div class="node__meta">
{{ author_picture }}
<span{{ author_attributes }}>
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
</span>
{{ metadata }}
</div>
{% endif %}
</header>
<div{{ content_attributes.addClass('node__content', 'clearfix') }}>
{{ content|without('comment', 'links') }}
</div>
{% if content.links %}
<div class="node__links">{{ content.links }}</div>
{% endif %}
{{ content.comment }}
</article>

View file

@ -0,0 +1,194 @@
{#
/**
* @file
* Bartik's theme implementation to display a single page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template normally located in the
* core/modules/system directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
* - logo: The url of the logo image, as defined in theme settings.
* - site_name: The name of the site. This is empty when displaying the site
* name has been disabled in the theme settings.
* - site_slogan: The slogan of the site. This is empty when displaying the site
* slogan has been disabled in theme settings.
* - hide_site_name: A flag indicating if the site name has been toggled off on
* the theme settings page. If hidden, the "visually-hidden" class is added
* to make the site name visually hidden, but still accessible.
* - hide_site_slogan: A flag indicating if the site slogan has been toggled off
* on the theme settings page. If hidden, the "visually-hidden" class is
* added to make the site slogan visually hidden, but still accessible.
*
* 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.
* - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
* view and edit tabs when displaying a node).
* - action_links: Actions local to the page, such as "Add menu" on the menu
* administration interface.
* - 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
* comment/reply/12345).
*
* Regions:
* - page.header: Items for the header region.
* - page.highlighted: Items for the highlighted region.
* - page.primary_menu: Items for the primary menu region.
* - page.secondary_menu: Items for the secondary menu region.
* - page.featured_top: Items for the featured top region.
* - page.help: Dynamic help text, mostly for admin pages.
* - page.content: The main content of the current page.
* - page.sidebar_first: Items for the first sidebar.
* - page.sidebar_second: Items for the second sidebar.
* - page.featured_bottom_first: Items for the first featured bottom region.
* - page.featured_bottom_second: Items for the second featured bottom region.
* - page.featured_bottom_third: Items for the third featured bottom region.
* - page.footer_first: Items for the first footer column.
* - page.footer_second: Items for the second footer column.
* - page.footer_third: Items for the third footer column.
* - page.footer_fourth: Items for the fourth footer column.
* - page.footer_fifth: Items for the fifth footer column.
* - page.breadcrumb: Items for the breadcrumb region.
*
* @see template_preprocess_page()
* @see bartik_preprocess_page()
* @see html.html.twig
*/
#}
<div id="page-wrapper">
<div id="page">
<header id="header" class="header" role="banner" aria-label="{{ 'Site header'|t}}">
<div class="section layout-container clearfix">
{{ page.secondary_menu }}
{% if logo %}
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home" id="logo">
<img src="{{ logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name or site_slogan %}
<div id="name-and-slogan"{% if hide_site_name and hide_site_slogan %} class="visually-hidden"{% endif %}>
{% if site_name %}
{% if title %}
<div id="site-name"{% if hide_site_name %} class="visually-hidden"{% endif %}>
<strong>
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
</strong>
</div>
{# Use h1 when the content title is empty #}
{% else %}
<h1 id="site-name"{% if hide_site_name %} class="visually-hidden" {% endif %}>
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
</h1>
{% endif %}
{% endif %}
{% if site_slogan %}
<div id="site-slogan"{% if hide_site_slogan %} class="visually-hidden"{% endif %}>
{{ site_slogan }}
</div>
{% endif %}
</div>
{% endif %}
{{ page.header }}
{{ page.primary_menu }}
</div>
</header>
{% if page.highlighted %}
<div class="highlighted">
<aside class="layout-container section clearfix" role="complementary">
{{ page.highlighted }}
</aside>
</div>
{% endif %}
{% if page.featured_top %}
<div class="featured-top">
<aside class="featured-top__inner section layout-container clearfix" role="complementary">
{{ page.featured_top }}
</aside>
</div>
{% endif %}
<div id="main-wrapper" class="layout-main-wrapper layout-container clearfix">
<div id="main" class="layout-main clearfix">
{{ page.breadcrumb }}
<main id="content" class="column main-content" role="main">
<section class="section">
<a id="main-content" tabindex="-1"></a>
{{ title_prefix }}
{% if title %}
<h1 class="title" id="page-title">
{{ title }}
</h1>
{% endif %}
{{ title_suffix }}
{% if tabs %}
<nav class="tabs" role="navigation" aria-label="{{ 'Tabs'|t }}">
{{ tabs }}
</nav>
{% endif %}
{{ page.help }}
{% if action_links %}
<ul class="action-links">{{ action_links }}</ul>
{% endif %}
{{ page.content }}
</section>
</main>
{% if page.sidebar_first %}
<div id="sidebar-first" class="column sidebar">
<aside class="section" role="complementary">
{{ page.sidebar_first }}
</aside>
</div>
{% endif %}
{% if page.sidebar_second %}
<div id="sidebar-second" class="column sidebar">
<aside class="section" role="complementary">
{{ page.sidebar_second }}
</aside>
</div>
{% endif %}
</div>
</div>
{% if page.featured_bottom_first or page.featured_bottom_second or page.featured_bottom_third %}
<div id="featured-bottom-wrapper">
<aside id="featured-bottom" class="section layout-container clearfix" role="complementary">
{{ page.featured_bottom_first }}
{{ page.featured_bottom_second }}
{{ page.featured_bottom_third }}
</aside>
</div>
{% endif %}
<footer class="site-footer">
<div class="layout-container">
{% if page.footer_first or page.footer_second or page.footer_third or page.footer_fourth %}
<div class="site-footer__top clearfix">
{{ page.footer_first }}
{{ page.footer_second }}
{{ page.footer_third }}
{{ page.footer_fourth }}
</div>
{% endif %}
{% if page.footer_fifth %}
<div class="site-footer__bottom">
{{ page.footer_fifth }}
</div>
{% endif %}
</div>
</footer>
</div>
</div>

View file

@ -0,0 +1,34 @@
{% extends "@classy/misc/status-messages.html.twig" %}
{#
/**
* @file
* Default theme implementation for status messages.
*
* Displays status, error, and warning messages, grouped by type.
*
* An invisible heading identifies the messages for assistive technology.
* Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html
* for info.
*
* Add an ARIA label to the contentinfo area so that assistive technology
* user agents will better describe this landmark.
*
* Available variables:
* - message_list: List of messages to be displayed, grouped by type.
* - status_headings: List of all status types.
* - display: (optional) May have a value of 'status' or 'error' when only
* displaying messages of that specific type.
*
* @see template_preprocess_status_messages()
*/
#}
{% block messages %}
{% if message_list is not empty %}
{{ attach_library('bartik/messages') }}
<div id="messages">
<div class="section clearfix">
{{ parent() }}
</div>
</div>
{% endif %}
{% endblock messages %}