-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format templates to follow Drupal practices
- Loading branch information
1 parent
91957c0
commit 32b3ce8
Showing
5 changed files
with
108 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{# | ||
/** | ||
* @file localgov_alert_banner.html.twig | ||
* Default theme implementation to present Alert banner data. | ||
* | ||
* This template is used when viewing Alert banner pages. | ||
* | ||
* | ||
* Available variables: | ||
* - content: A list of content items. Use 'content' to print all content, or | ||
* - attributes: HTML attributes for the container element. | ||
* - display_title: Boolean indicating if alert banner title should be displayed | ||
* - remove_hide_link: Boolean indicating if the link to close the banner should be hidden | ||
* - type_of_alert: Type of alert banner | ||
* | ||
* @see template_preprocess_localgov_alert_banner() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
|
||
{{ attach_library('localgov_alert_banner/alert_banner') }} | ||
|
||
{% set has_link = content.link.0 is not empty %} | ||
{% set type_of_alert = type_of_alert|split('--')[1]|clean_class %} | ||
{% set classes = [ | ||
'js-localgov-alert-banner', | ||
'localgov-alert-banner', | ||
type_of_alert ? 'localgov-alert-banner--' ~ type_of_alert, | ||
is_front ? 'localgov-alert-banner--homepage', | ||
has_link ? 'localgov-alert-banner--has-link' : 'localgov-alert-banner--no-link' | ||
] | ||
%} | ||
|
||
<article {{ attributes.addClass(classes) }} role="alert"> | ||
{# Begin Wrapper #} | ||
<div class="localgov-alert-banner__wrapper"> | ||
{# Begin Inner #} | ||
<div class="localgov-alert-banner__inner"> | ||
{# Begin Content #} | ||
<div class="localgov-alert-banner__content"> | ||
{% if display_title %} | ||
<h2 class="localgov-alert-banner__title"> | ||
{{ content.title }} | ||
</h2> | ||
{% endif %} | ||
|
||
{% if content.short_description.0['#text'] %} | ||
<div class="localgov-alert-banner__body"> | ||
{{ content.short_description }} | ||
</div> | ||
{% endif %} | ||
|
||
{% if has_link %} | ||
<div class="localgov-alert-banner--content-link">{{ content.link }}</div> | ||
{% endif %} | ||
</div> {# End Content #} | ||
|
||
{% if not remove_hide_link %} | ||
<div class="localgov-alert-banner__actions"> | ||
<div class="localgov-alert-banner__dismiss"> | ||
<button class="localgov-alert-banner__close js-localgov-alert-banner__close" aria-label="{{ 'Hide alert'|t }}">{{ 'Hide'|t }}</button> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> {# End Inner #} | ||
</div> {# End Wrapper #} | ||
</article> |
This file was deleted.
Oops, something went wrong.