14 lines
1.0 KiB
Plaintext
14 lines
1.0 KiB
Plaintext
{% if context.now %}{% set today = context.now|date:"D"|lower %}{% endif %}
|
||
<aside data-block="coffee:hours_strip" class="my-4">
|
||
<ul class="coffee-card grid grid-cols-1 sm:grid-cols-2 md:grid-cols-7 gap-1 p-2 max-w-5xl mx-auto">
|
||
{% if not hours %}<li class="coffee-body text-sm text-muted-foreground italic px-3 py-2 col-span-full text-center">Add weekday hours to display the strip.</li>{% endif %}
|
||
{% for row in hours %}
|
||
<li class="coffee-body px-2 py-1 flex items-baseline gap-2 text-sm rounded-sm {% if row.day and row.day|lower|slice:":3" == today %}coffee-hours-today is-today today{% endif %}">
|
||
<span class="coffee-display font-semibold text-foreground w-12 shrink-0">{{ row.day }}</span>
|
||
{% if row.day and row.day|lower|slice:":3" == today %}<span class="coffee-body text-[10px] uppercase tracking-wider text-accent">{{ todayLabel|default:"Today" }}</span>{% endif %}
|
||
<span class="coffee-mono text-foreground">{% if row.open or row.close %}{{ row.open }} – {{ row.close }}{% else %}Closed{% endif %}</span>
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
</aside>
|