sitewide_alerts-1.0.0/templates/site-alert--alert-bar.html.twig
templates/site-alert--alert-bar.html.twig
{#
/**
* @file
* Default view mode & theme implementation to display a site alert bar.
*
* Available variables:
* - site_alert: The site alert entity with limited access to object properties and methods.
* - site_alert_close: The site alert close button.
* - site_alert_type: The site alert type taxonomy term entity.
* - site_alert_type_icon: The site alert type icon.
* - site_alert_type_color: The site alert type color (hex code).
* - label: (optional) The title of the site alert.
* - content: All site alert 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.
* - attributes: HTML attributes for the containing 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_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".
*
* @see template_preprocess_site_alert()
*
* @ingroup themeable
*/
#}
{{ attach_library('sitewide_alerts/site_alert') }}
<div{{ attributes }}>
{{ title_prefix }}
{{ title_suffix }}
<div class="c-site-alert__container">
{{ site_alert_close }}
{{ site_alert_type_icon }}
<div{{ content_attributes}}>
{{ content|without('field_site_alert_type') }}
</div>
</div>
</div>
