fix: show contact e-mail and phone as visible links on the teamer contact page

This commit is contained in:
fromme committed 2026-11-12 11:25:30 +01:00
1 parent 981e9f2762
commit 852bffb073
1 file changed
+69 -57
+69 -57
View File
@@ -2,72 +2,84 @@
{% block title %}Kontakt{% endblock %}
{# e-mail and phone are always visible links, so they work on touch screens, by keyboard and without a photo #}
{% macro contact(contact) %}
<div class="flex flex-col items-center space-y-2 px-8 py-4 w-48 md:w-64">
<li class="card flex items-start gap-x-4 p-4">
{% if contact.photo %}
<div class="relative group">
<img src="{{ asset(contact.photo.filename | imagine_filter('contact')) }}"
class="w-40 md:w-48 h-auto border-2 border-primary rounded-full"
alt="{{ contact.name }}">
<div class="absolute top-0 left-0 inset-0 rounded-full flex flex-col items-center justify-center space-y-2 bg-primary/80 text-white invisible group-hover:visible">
{% if contact.email %}
<a href="mailto:{{ contact.email }}" title="E-Mail">
{{ icon('mail', 'w-8 h-8') }}
</a>
{% endif %}
{% if contact.phone %}
<a href="tel:{{ contact.phone }}" title="Telefon">
{{ icon('phone', 'w-8 h-8') }}
</a>
{% endif %}
</div>
</div>
<img src="{{ asset(contact.photo.filename | imagine_filter('contact')) }}"
class="h-20 w-20 shrink-0 rounded-full border-2 border-brand object-cover"
alt="">
{% else %}
<span class="flex h-20 w-20 shrink-0 items-center justify-center rounded-full bg-brand-light text-brand">
{{ icon('user', 'w-8 h-8') }}
</span>
{% endif %}
<div class="text-center">
<span class="font-bold">{{ contact.name }}</span>
{% if contact.category %}<br>{{ ('label.contact.category.' ~ contact.category) | trans }}{% endif %}
{% if contact.destination %}<br>{{ contact.destination }}{% endif %}
<div class="min-w-0">
<p class="font-bold">{{ contact.name }}</p>
{% if contact.category %}
<p class="text-muted">{{ ('label.contact.category.' ~ contact.category) | trans }}</p>
{% endif %}
{% if contact.destination %}
<p class="text-muted">{{ contact.destination }}</p>
{% endif %}
<div class="flex flex-col gap-y-1 pt-2">
{% if contact.email %}
<a href="mailto:{{ contact.email }}" class="inline-flex min-w-0 items-center gap-x-2 text-brand hover:text-brand-dark">
{{ icon('mail', 'w-4 h-4 shrink-0') }}
<span class="truncate">{{ contact.email }}</span>
</a>
{% endif %}
{% if contact.phone %}
<a href="tel:{{ contact.phone }}" class="inline-flex items-center gap-x-2 text-brand hover:text-brand-dark">
{{ icon('phone', 'w-4 h-4 shrink-0') }}
<span>{{ contact.phone }}</span>
</a>
{% endif %}
</div>
</div>
</div>
</li>
{% endmacro %}
{% macro contacts(contacts) %}
{% if contacts is not empty %}
<ul class="grid gap-4 sm:grid-cols-2 xl:grid-cols-3">
{% for contact in contacts %}
{{ _self.contact(contact) }}
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{% block content %}
<div class="max-w-screen-md mx-auto">
<h1 class="text-2xl font-bold pb-8">
Kontakt
</h1>
<p class="pb-4">
Hast du allgemeine Fragen zum Team-Sein bei E&amp;P Reisen, zur Benutzung von E&amp;P Team, zur Abrechnung
oder Ähnlichem? Dann schau mal in den FAQs nach, ob deine Frage dort beantwortet wird.
</p>
<p class="pb-4">
Ansonsten melde dich gerne beim Team Personalplanung!
</p>
<div class="pb-8">
<div class="flex justify-center flex-wrap items-start">
{% for contact in contacts.hr %}
{{ _self.contact(contact) }}
{% endfor %}
</div>
<h1 class="text-2xl font-bold pb-6">
Kontakt
</h1>
<section class="pb-10">
<h2 class="section-title pb-2">
Personalplanung
</h2>
<div class="max-w-prose pb-4">
<p class="pb-2">
Hast du allgemeine Fragen zum Team-Sein bei E&amp;P Reisen, zur Benutzung von E&amp;P Team, zur Abrechnung
oder Ähnlichem? Dann schau mal in den FAQs nach, ob deine Frage dort beantwortet wird.
</p>
<p>
Ansonsten melde dich gerne beim Team Personalplanung!
</p>
</div>
<p class="pb-4">
{{ _self.contacts(contacts.hr) }}
</section>
<section>
<h2 class="section-title pb-2">
Reise- und Hausmanagement
</h2>
<p class="max-w-prose pb-4">
Hast du nach Erhalt deiner Infomail (ein paar Tage vor deinem Einsatz) noch Fragen zu deinem Einsatz? Dann
kontaktiere deine zuständige Reise- oder Hausmanager:in. Alle vorherigen Fragen können über
<a href="mailto:[email protected]" class="underline">[email protected]</a> abgeklärt werden.
<a href="mailto:[email protected]" class="font-bold text-brand underline underline-offset-2 hover:text-brand-dark">[email protected]</a> abgeklärt werden.
</p>
<div class="pb-4">
<div class="flex justify-center flex-wrap items-start">
{% for contact in contacts.management %}
{{ _self.contact(contact) }}
{% endfor %}
</div>
</div>
<div class="pb-8">
<div class="flex justify-center flex-wrap items-start">
{% for contact in contacts.house_management %}
{{ _self.contact(contact) }}
{% endfor %}
</div>
</div>
</div>
{{ _self.contacts(contacts.management|merge(contacts.house_management)) }}
</section>
{% endblock %}