mirror of
https://github.com/skoelle/icloud-contacts-sync.git
synced 2026-09-17 23:40:24 +00:00
300 lines
9.1 KiB
HTML
300 lines
9.1 KiB
HTML
<!-- Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) -->
|
||
<!-- Licensed under the MIT License. See LICENSE file in project root for details. -->
|
||
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||
<title>{{ contact.full_name or 'Kontakt' }} – Kontakte</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background: #f5f5f5;
|
||
color: #333;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.container {
|
||
max-width: 800px;
|
||
margin: 0 auto;
|
||
padding: 2rem 1rem;
|
||
}
|
||
|
||
h1 {
|
||
font-size: 1.5rem;
|
||
margin-bottom: 0.5rem;
|
||
color: #222;
|
||
}
|
||
|
||
.back-link {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 0.5rem;
|
||
color: #0066cc;
|
||
text-decoration: none;
|
||
font-size: 0.875rem;
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.back-link:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.contact-card {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 1rem 1.25rem;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||
}
|
||
|
||
.contact-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start;
|
||
gap: 1rem;
|
||
margin-bottom: 1.5rem;
|
||
padding-bottom: 1.5rem;
|
||
border-bottom: 1px solid #eee;
|
||
}
|
||
|
||
.contact-name {
|
||
font-size: 1.5rem;
|
||
font-weight: 600;
|
||
color: #222;
|
||
}
|
||
|
||
.contact-subtitle {
|
||
font-size: 0.875rem;
|
||
color: #666;
|
||
margin-top: 0.25rem;
|
||
}
|
||
|
||
.badge {
|
||
display: inline-block;
|
||
padding: 0.2rem 0.6rem;
|
||
border-radius: 4px;
|
||
font-size: 0.75rem;
|
||
font-weight: 500;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.badge-account {
|
||
background: #d1ecf1;
|
||
color: #0c5460;
|
||
}
|
||
|
||
.section {
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.section:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 0.75rem;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
color: #888;
|
||
margin-bottom: 0.75rem;
|
||
}
|
||
|
||
.section-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.5rem;
|
||
}
|
||
|
||
.section-item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 0.75rem;
|
||
background: #f8f9fa;
|
||
border-radius: 6px;
|
||
}
|
||
|
||
.section-item-label {
|
||
font-size: 0.75rem;
|
||
color: #888;
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
.section-item-value {
|
||
font-size: 0.875rem;
|
||
color: #333;
|
||
}
|
||
|
||
.section-item-value a {
|
||
color: #0066cc;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.section-item-value a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.birthday-highlight {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 0.5rem;
|
||
padding: 0.75rem;
|
||
background: #fff3cd;
|
||
border-radius: 6px;
|
||
font-size: 0.875rem;
|
||
color: #856404;
|
||
}
|
||
|
||
.notes-content {
|
||
padding: 0.75rem;
|
||
background: #f8f9fa;
|
||
border-radius: 6px;
|
||
font-size: 0.875rem;
|
||
color: #333;
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.tags {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 0.5rem;
|
||
}
|
||
|
||
.tag {
|
||
display: inline-block;
|
||
padding: 0.25rem 0.75rem;
|
||
background: #e7f3ff;
|
||
color: #0066cc;
|
||
border-radius: 20px;
|
||
font-size: 0.8rem;
|
||
}
|
||
|
||
.no-data {
|
||
color: #888;
|
||
font-style: italic;
|
||
font-size: 0.875rem;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<h1><a href="/" style="text-decoration:none;color:inherit;display:inline-flex;align-items:center;gap:0.4rem"><img src="/static/favicon.svg" alt="" style="height:1.5em;width:1.5em;vertical-align:middle">Kontakte</a></h1>
|
||
<a href="/search{% if search %}?search={{ search }}{% endif %}" class="back-link">← Zurück zur Liste</a>
|
||
|
||
<div class="contact-card">
|
||
<div class="contact-header">
|
||
<div>
|
||
<div class="contact-name">{{ contact.full_name or '(Kein Name)' }}</div>
|
||
{% if contact.organization or contact.job_title %}
|
||
<div class="contact-subtitle">
|
||
{% if contact.job_title %}{{ contact.job_title }}{% endif %}
|
||
{% if contact.job_title and contact.organization %} bei {% endif %}
|
||
{% if contact.organization %}{{ contact.organization }}{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
{% if is_admin and contact.account %}
|
||
<span class="badge badge-account">{{ contact.account }}</span>
|
||
{% endif %}
|
||
</div>
|
||
|
||
{% if contact.birthday %}
|
||
<div class="section">
|
||
<div class="birthday-highlight">
|
||
🎂 {{ contact.birthday }}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.emails %}
|
||
<div class="section">
|
||
<div class="section-title">E-Mail</div>
|
||
<div class="section-list">
|
||
{% for email in contact.emails %}
|
||
<div class="section-item">
|
||
<span class="section-item-label">{{ email.type }}</span>
|
||
<span class="section-item-value"><a href="mailto:{{ email.value }}">{{ email.value }}</a></span>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.phones %}
|
||
<div class="section">
|
||
<div class="section-title">Telefon</div>
|
||
<div class="section-list">
|
||
{% for phone in contact.phones %}
|
||
<div class="section-item">
|
||
<span class="section-item-label">{{ phone.type }}</span>
|
||
<span class="section-item-value"><a href="tel:{{ phone.value }}">{{ phone.value }}</a></span>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.addresses %}
|
||
<div class="section">
|
||
<div class="section-title">Adresse</div>
|
||
<div class="section-list">
|
||
{% for addr in contact.addresses %}
|
||
<div class="section-item">
|
||
<span class="section-item-label">{{ addr.type }}</span>
|
||
<span class="section-item-value">
|
||
{{ addr.street }}<br>
|
||
{% if addr.zip %}{{ addr.zip }} {% endif %}{{ addr.city }}<br>
|
||
{{ addr.region }}{% if addr.region and addr.country %}, {% endif %}{{ addr.country }}
|
||
</span>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.urls %}
|
||
<div class="section">
|
||
<div class="section-title">Website</div>
|
||
<div class="section-list">
|
||
{% for url in contact.urls %}
|
||
<div class="section-item">
|
||
<span class="section-item-label">{{ url.type }}</span>
|
||
<span class="section-item-value"><a href="{{ url.value }}" target="_blank">{{ url.value }}</a></span>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.categories %}
|
||
<div class="section">
|
||
<div class="section-title">Kategorien</div>
|
||
<div class="tags">
|
||
{% for cat in contact.categories %}
|
||
<span class="tag">{{ cat }}</span>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if contact.notes %}
|
||
<div class="section">
|
||
<div class="section-title">Notizen</div>
|
||
<div class="notes-content">{{ contact.notes }}</div>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|