Optional applicant photo in CV header

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-03 14:39:13 +02:00
co-authored by Claude
parent e914dee855
commit 990a663cdd
3 changed files with 166 additions and 17 deletions
+34
View File
@@ -217,6 +217,40 @@
</button>
</form>
</section>
<!-- Applicant photo (Bewerberfoto) -->
<h2 class="text-xl font-bold text-gray-800 dark:text-white mt-10 mb-2">Bewerberfoto</h2>
<p class="text-sm text-gray-500 dark:text-gray-400 mb-6">
Lade optional dein Bewerbungsfoto (PNG/JPG, Hochformat) hoch. Es wird oben rechts im
Lebenslauf platziert; ohne Foto bleibt der Lebenslauf textlich wie bisher.
</p>
<section class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 mb-6">
<% if (hasFoto) { %>
<div class="flex items-center justify-between gap-4 mb-4">
<div class="rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700/40 p-3">
<img src="/bewerbungsfoto?t=<%= Date.now() %>" alt="Bewerberfoto" class="max-h-40 max-w-[120px] object-contain">
</div>
<form action="/bewerbungsfoto/delete" method="POST" onsubmit="return confirm('Bewerberfoto entfernen?');">
<button type="submit" class="text-sm text-red-600 hover:text-red-800 dark:text-red-400 hover:underline">Entfernen</button>
</form>
</div>
<% } else { %>
<p class="text-sm text-gray-500 dark:text-gray-400 mb-4">Noch kein Bewerberfoto hinterlegt.</p>
<% } %>
<form action="/bewerbungsfoto" method="POST" enctype="multipart/form-data"
class="border-t border-gray-200 dark:border-gray-700 pt-4 mt-2 flex flex-wrap items-end gap-3">
<div class="flex-1 min-w-[220px]">
<label class="block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1">Bewerberfoto (PNG/JPG, Hochformat)</label>
<input type="file" name="foto" accept="image/png,image/jpeg" required
class="w-full text-sm text-gray-700 dark:text-gray-300 file:mr-3 file:py-2 file:px-3 file:rounded-md file:border-0 file:bg-blue-600 file:text-white hover:file:bg-blue-700">
</div>
<button type="submit" class="px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-md transition-colors">
<%= hasFoto ? 'Ersetzen' : 'Hochladen' %>
</button>
</form>
</section>
</main>
<%- include('partials/footer') %>