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

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