bootstrap_components_toolkit-1.0.0/templates/bootstrap-alert.html.twig

templates/bootstrap-alert.html.twig
{#
/**
 * @file
 * Theme template for Bootstrap Alert, an extension of Bootstrap Alert
 *
 * Available variables:
 * - content: The message content. Mandatory.
 * - type: One of "primary", "secondary", "info", "light", "dark", "warning",
 *     "success" or "danger"
 * - dismissible: boolean indicating wether to show a closing button
 */
#}

{% set component_base = 'alert' %}
{% set attributes = safe_create_attribute(attributes) %}
{%
  set merged_classes = [
    component_base,
    type ? [ component_base, type] | join('-') : component_base ~ 'primary',
    dismissible ? component_base ~ '-dismissible'
  ] | merge(classes ? classes : [])
%}

<div{{ attributes.addClass(merged_classes) }} role="alert">
  <div class="{{ component_base }}-content">
    {% block alert_content %}
      {{ alert_content }}
    {% endblock %}
  </div>
  {% if dismissible %}
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
  {% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc