{% if timer.id %}
{% set days = ((timer.end - "now"|date('U'))/60/60/24)|round(0, 'floor') %}
{% if (days % 10) in [2, 3, 4] and not((days % 100 in [11, 12, 13, 14])) %}
{% set days = days ~ ' ' ~ labels.get('plural-day-2')|raw ~ ' ' %}
{% elseif (days % 10) == 1 and days != 11 %}
{% set days = days ~ ' ' ~ labels.get('plural-day-1')|raw ~ ' ' %}
{% else %}
{% set days = days ~ ' ' ~ labels.get('plural-day-5')|raw ~ ' ' %}
{% endif %}
<div class="top-action" style="background: url('/pic/timerbg/{{ app.request.locale }}/{{ timer.id }}.jpg')"{% if timer.href %} data-href="{{ timer.href }}"{% endif %}>
<div class="container">
<div class="row">
<div class="col-md-8 col-xs-8 ta-1">
<div class="hidden-xs"><a href="{{ timer.href }}"><img src="/pic/timer/{{ app.request.locale }}/{{ timer.id }}.jpg" alt=""></a></div>
<div class="visible-xs"><a href="{{ timer.href }}">{{ timer.name }}</a></div>
</div>
<div class="col-md-4 col-xs-4 ta-2"><div class="timer"{{ timer.color ? (' style="color:#' ~ timer.color ~ '"')|raw : '' }} data-days="{{ days }}" data-data="{{ timer.end|date('Y/m/d H:i:s') }}"></div></div>
</div>
</div>
</div>
{% endif %}