feat: adopt E&P corporate design in admin
This commit is contained in:
1 parent
55378b2bbc
commit
c660bd68de
36 files changed
+866
-544
No files matched your search
@@ -1,9 +1,15 @@
|
||||
{% set weekdays = ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] %}
|
||||
<div class="space-y-4 mb-4">
|
||||
{% set rows = [
|
||||
{label: 'Preis', key: 'hasPrice', color: 'bg-brand-mid', legend: 'Preiskonfigurationen'},
|
||||
{label: 'Verpfl.', key: 'hasBoard', color: 'bg-emerald-600', legend: 'Verpflegungsleistungen'},
|
||||
{label: 'Zusatzl.', key: 'hasAdditional', color: 'bg-amber-500', legend: 'optionale Zusatzleistungen'},
|
||||
{label: 'n. v.', key: 'isBlocked', color: 'bg-red-700', legend: 'nicht verfügbar'},
|
||||
] %}
|
||||
<div class="divide-y divide-line">
|
||||
{% for month in months %}
|
||||
{% set totalCols = month.firstDow + (month.days | length) %}
|
||||
<div>
|
||||
<div class="text-sm font-semibold mb-1">{{ month.label }}</div>
|
||||
<div class="px-5 py-4">
|
||||
<h3 class="mb-2 text-xs font-bold uppercase tracking-wide text-brand">{{ month.label }}</h3>
|
||||
<div class="overflow-x-auto">
|
||||
<div class="w-max">
|
||||
<div class="flex">
|
||||
@@ -11,11 +17,11 @@
|
||||
{% for col in 0..(totalCols - 1) %}
|
||||
{% set dow = col % 7 %}
|
||||
<div class="w-6 text-center">
|
||||
<span class="block text-xs leading-none {{ dow >= 5 ? 'text-red-400' : 'text-gray-300' }}">{{ weekdays[dow] }}</span>
|
||||
<span class="block text-[10px] leading-4 {{ dow >= 5 ? 'font-bold text-red-700' : 'text-muted' }}">{{ weekdays[dow] }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="flex mb-0.5">
|
||||
<div class="mb-1 flex">
|
||||
<div class="w-20 shrink-0"></div>
|
||||
{% if month.firstDow > 0 %}
|
||||
{% for i in 1..month.firstDow %}
|
||||
@@ -24,20 +30,16 @@
|
||||
{% endif %}
|
||||
{% for dayNum, day in month.days %}
|
||||
<div class="w-6 text-center">
|
||||
<span class="{{ html_classes('block text-xs leading-none cursor-default', {'font-bold text-secondary': day.isToday, 'text-gray-500': not day.isToday}) }}"
|
||||
<span class="{{ html_classes('mx-auto block w-5 cursor-default text-xs leading-5', {'bg-brand font-bold text-white': day.isToday, 'text-ink': not day.isToday}) }}"
|
||||
{% if day.isToday %}title="heute"{% endif %}
|
||||
{% if day.tooltip %}{{ stimulus_controller('tooltip', {'content': day.tooltip}) }}{% endif %}
|
||||
>{{ dayNum }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% for row in [
|
||||
{label: 'Preis', key: 'hasPrice', color: 'bg-blue-500'},
|
||||
{label: 'Verpfl.', key: 'hasBoard', color: 'bg-green-500'},
|
||||
{label: 'Zusatzl.', key: 'hasAdditional', color: 'bg-amber-500'},
|
||||
{label: 'n. v.', key: 'isBlocked', color: 'bg-red-500'},
|
||||
] %}
|
||||
<div class="flex items-center mt-0.5">
|
||||
<div class="w-20 shrink-0 text-xs text-gray-500">{{ row.label }}</div>
|
||||
{% for row in rows %}
|
||||
<div class="mt-0.5 flex items-center">
|
||||
<div class="w-20 shrink-0 text-xs text-muted">{{ row.label }}</div>
|
||||
{% if month.firstDow > 0 %}
|
||||
{% for i in 1..month.firstDow %}
|
||||
<div class="w-6 px-px"><div class="h-3"></div></div>
|
||||
@@ -45,7 +47,7 @@
|
||||
{% endif %}
|
||||
{% for dayNum, day in month.days %}
|
||||
<div class="w-6 px-px">
|
||||
<div class="h-3 {{ attribute(day, row.key) ? row.color : 'bg-gray-100' }}"></div>
|
||||
<div class="h-3 {{ attribute(day, row.key) ? row.color : 'bg-page' }}"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -55,17 +57,10 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-6 gap-y-2 mb-4 text-sm text-gray-600">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-4 h-3 bg-blue-500"></span> Preiskonfigurationen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-4 h-3 bg-green-500"></span> Verpflegungsleistungen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-4 h-3 bg-amber-500"></span> optionale Zusatzleistungen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-4 h-3 bg-red-500"></span> nicht verfügbar
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-6 gap-y-2 border-t border-line px-5 py-3 text-xs text-muted">
|
||||
{% for row in rows %}
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block h-3 w-4 {{ row.color }}" aria-hidden="true"></span> {{ row.legend }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -1,17 +1,23 @@
|
||||
<div id="calendar-wrapper">
|
||||
<twig:calendar:grid :months="months"/>
|
||||
<div class="flex items-center justify-between mt-4">
|
||||
<button class="button button--secondary button--small"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: prevMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
← {{ prevLabel }}
|
||||
</button>
|
||||
<button class="button button--secondary button--small"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: nextMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
{{ nextLabel }} →
|
||||
</button>
|
||||
{#- The card is the swap target, so the month navigation replaces the whole calendar -#}
|
||||
<section id="calendar-wrapper" class="card" aria-labelledby="calendar-title">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4 border-b border-line px-5 py-3">
|
||||
<h2 id="calendar-title" class="section-title">Kalender</h2>
|
||||
<div class="flex gap-2">
|
||||
<button type="button"
|
||||
class="btn-tool"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: prevMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
← {{ prevLabel }}
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn-tool"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: nextMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
{{ nextLabel }} →
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<twig:calendar:grid :months="months"/>
|
||||
</section>
|
||||
Reference in new issue
Block a user