feat: drag the timeline with the mouse

This commit is contained in:
fromme committed 2026-11-12 11:14:25 +01:00
1 parent e976342c09
commit 9ba6529ee0
3 files changed
+95 -1

No files matched your search

@@ -70,7 +70,8 @@
{% else %}
<div class="timeline card mb-4"
style="--timeline-days: {{ calendar.days|length }}"
{{ stimulus_target('timeline-scroll', 'scroller') }}>
{{ stimulus_target('timeline-scroll', 'scroller') }}
{{ stimulus_action('timeline-scroll', 'startDrag', 'pointerdown')|stimulus_action('timeline-scroll', 'moveDrag', 'pointermove')|stimulus_action('timeline-scroll', 'endDrag', 'pointerup')|stimulus_action('timeline-scroll', 'endDrag', 'pointercancel')|stimulus_action('timeline-scroll', 'preventNativeDrag', 'dragstart') }}>
<div class="relative w-max min-w-full">
{# weekends, month boundaries and today, behind the bars #}
<div class="timeline-grid timeline-background" aria-hidden="true">
@@ -134,6 +135,7 @@
<li class="flex items-center gap-x-2"><span class="timeline-bar timeline-bar--pending w-10 h-5"></span> in Bewerbung oder Vertrag in Prüfung</li>
<li class="flex items-center gap-x-2"><span class="timeline-bar timeline-bar--open w-10 h-5"></span> offen, noch keine Bewerbung</li>
<li class="flex items-center gap-x-2"><span class="inline-block h-5 w-0.5 bg-brand-bright"></span> heute</li>
<li class="text-muted sm:ml-auto">Mit gedrückter Maustaste lässt sich die Zeitleiste verschieben</li>
</ul>
</div>
{% endblock %}