countdown-8.x-1.8/modules/countdown_field/templates/countdown-field.html.twig
modules/countdown_field/templates/countdown-field.html.twig
{#
/**
* @file
* Default theme implementation for a countdown field.
*
* Available variables:
* - library: The countdown library ID.
* - target_date: The target date/time in ISO-8601 format.
* - event_name: Optional event name.
* - event_url: Optional event URL.
* - finish_message: Message to display when countdown completes.
* - attributes: HTML attributes for the countdown container.
* - field_id: Unique field identifier.
* - delta: Field delta for multivalue fields.
* - has_event_link: Boolean indicating if event should be linked.
*
* @see template_preprocess_countdown_field()
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
{% if event_name %}
<div class="countdown-field-event">
{% if has_event_link and event_url %}
<a href="{{ event_url }}" class="countdown-field-event-link">{{ event_name }}</a>
{% else %}
<span class="countdown-field-event-name">{{ event_name }}</span>
{% endif %}
</div>
{% endif %}
<div class="countdown-display">
{# The countdown timer will be initialized here by JavaScript. #}
<div class="countdown-loading" aria-live="polite">
{{ 'Loading countdown timer...'|t }}
</div>
</div>
{% if finish_message %}
<div class="countdown-finish-message" style="display: none;" aria-live="polite">
{{ finish_message }}
</div>
{% endif %}
</div>
