mirror of
https://github.com/skoelle/icloud-contacts-sync.git
synced 2026-09-17 15:30:24 +00:00
218 lines
6.3 KiB
HTML
218 lines
6.3 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>Kontakte – {{ account_name }}</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;
|
||
scrollbar-gutter: stable both-edges;
|
||
}
|
||
|
||
.container {
|
||
max-width: 800px;
|
||
margin: 0 auto;
|
||
padding: 2rem 1rem;
|
||
}
|
||
|
||
h1 {
|
||
font-size: 1.5rem;
|
||
margin-bottom: 0.5rem;
|
||
color: #222;
|
||
}
|
||
|
||
.meta {
|
||
color: #666;
|
||
font-size: 0.875rem;
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.search-form {
|
||
display: flex;
|
||
gap: 0.5rem;
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.search-form input[type="text"] {
|
||
flex: 1;
|
||
padding: 0.75rem 1rem;
|
||
border: 1px solid #ddd;
|
||
border-radius: 6px;
|
||
font-size: 1rem;
|
||
background: #fff;
|
||
}
|
||
|
||
.search-form input[type="text"]:focus {
|
||
outline: none;
|
||
border-color: #0066cc;
|
||
}
|
||
|
||
.search-form button {
|
||
padding: 0.75rem 1.5rem;
|
||
background: #0066cc;
|
||
color: #fff;
|
||
border: none;
|
||
border-radius: 6px;
|
||
font-size: 1rem;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.search-form button:hover {
|
||
background: #0055aa;
|
||
}
|
||
|
||
.search-form a {
|
||
padding: 0.75rem 1rem;
|
||
background: #e0e0e0;
|
||
color: #333;
|
||
text-decoration: none;
|
||
border-radius: 6px;
|
||
font-size: 1rem;
|
||
}
|
||
|
||
.search-form a:hover {
|
||
background: #d0d0d0;
|
||
}
|
||
|
||
.contacts-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 1rem;
|
||
}
|
||
|
||
.contact-card {
|
||
display: block;
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 1rem 1.25rem;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||
text-decoration: none;
|
||
color: inherit;
|
||
transition: box-shadow 0.15s, transform 0.15s;
|
||
}
|
||
|
||
.contact-card:hover {
|
||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
.contact-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start;
|
||
gap: 1rem;
|
||
margin-bottom: 0.5rem;
|
||
}
|
||
|
||
.contact-name {
|
||
font-size: 1.125rem;
|
||
font-weight: 600;
|
||
color: #222;
|
||
}
|
||
|
||
.contact-organization {
|
||
font-size: 0.875rem;
|
||
color: #666;
|
||
margin-top: 0.25rem;
|
||
}
|
||
|
||
.contact-birthday {
|
||
font-size: 0.875rem;
|
||
color: #888;
|
||
margin-top: 0.25rem;
|
||
}
|
||
|
||
.contact-birthday::before {
|
||
content: "\1F382 ";
|
||
}
|
||
|
||
.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;
|
||
}
|
||
|
||
.no-contacts {
|
||
text-align: center;
|
||
color: #888;
|
||
padding: 3rem 1rem;
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||
}
|
||
</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>
|
||
<div class="meta">
|
||
Angemeldet als <strong>{{ current_user }}</strong>
|
||
{% if is_admin %}(Admin, sieht alle Accounts){% else %}(Account: {{ account_name }}){% endif %}
|
||
· {{ contacts|length }} Kontakte (max. 200 angezeigt)
|
||
</div>
|
||
|
||
<form class="search-form" method="get" action="/search">
|
||
<input type="text" name="search" value="{{ search }}" placeholder="Suche nach Name oder Organisation...">
|
||
<button type="submit">Suchen</button>
|
||
{% if search %}
|
||
<a href="/search">Zurücksetzen</a>
|
||
{% endif %}
|
||
</form>
|
||
|
||
<div class="contacts-list">
|
||
{% if contacts %}
|
||
{% for c in contacts %}
|
||
<a href="/contacts/{{ c.id }}{% if search %}?search={{ search }}{% endif %}" class="contact-card">
|
||
<div class="contact-header">
|
||
<div>
|
||
<div class="contact-name">{{ c.full_name or '(Kein Name)' }}</div>
|
||
{% if c.organization %}
|
||
<div class="contact-organization">{{ c.organization }}</div>
|
||
{% endif %}
|
||
{% if c.birthday %}
|
||
<div class="contact-birthday">{{ c.birthday }}</div>
|
||
{% endif %}
|
||
</div>
|
||
{% if is_admin and c.account %}
|
||
<span class="badge badge-account">{{ c.account }}</span>
|
||
{% endif %}
|
||
</div>
|
||
</a>
|
||
{% endfor %}
|
||
{% else %}
|
||
<div class="no-contacts">
|
||
{% if search %}
|
||
Keine Kontakte für "{{ search }}" gefunden.
|
||
{% else %}
|
||
Keine Kontakte vorhanden.
|
||
{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|