annotate core/themes/bartik/templates/block.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Default theme implementation to display a block.
Chris@0 5 *
Chris@0 6 * Available variables:
Chris@0 7 * - plugin_id: The ID of the block implementation.
Chris@0 8 * - label: The configured label of the block if visible.
Chris@0 9 * - configuration: A list of the block's configuration values.
Chris@0 10 * - label: The configured label for the block.
Chris@0 11 * - label_display: The display settings for the label.
Chris@0 12 * - provider: The module or other provider that provided this block plugin.
Chris@0 13 * - Block plugin specific settings will also be stored here.
Chris@0 14 * - content: The content of this block.
Chris@0 15 * - attributes: array of HTML attributes populated by modules, intended to
Chris@0 16 * be added to the main container tag of this template.
Chris@0 17 * - id: A valid HTML ID and guaranteed unique.
Chris@0 18 * - title_attributes: Same as attributes, except applied to the main title
Chris@0 19 * tag that appears in the template.
Chris@0 20 * - content_attributes: Same as attributes, except applied to the main content
Chris@0 21 * tag that appears in the template.
Chris@0 22 * - title_prefix: Additional output populated by modules, intended to be
Chris@0 23 * displayed in front of the main title tag that appears in the template.
Chris@0 24 * - title_suffix: Additional output populated by modules, intended to be
Chris@0 25 * displayed after the main title tag that appears in the template.
Chris@0 26 *
Chris@0 27 * @see template_preprocess_block()
Chris@0 28 *
Chris@0 29 * @ingroup themeable
Chris@0 30 */
Chris@0 31 #}
Chris@0 32 {%
Chris@0 33 set classes = [
Chris@0 34 'block',
Chris@0 35 'block-' ~ configuration.provider|clean_class,
Chris@0 36 'block-' ~ plugin_id|clean_class,
Chris@0 37 ]
Chris@0 38 %}
Chris@0 39 <div{{ attributes.addClass(classes) }}>
Chris@0 40 {{ title_prefix }}
Chris@0 41 {% if label %}
Chris@0 42 <h2{{ title_attributes }}>{{ label }}</h2>
Chris@0 43 {% endif %}
Chris@0 44 {{ title_suffix }}
Chris@0 45 {% block content %}
Chris@0 46 <div{{ content_attributes.addClass('content') }}>
Chris@0 47 {{ content }}
Chris@0 48 </div>
Chris@0 49 {% endblock %}
Chris@0 50 </div>