frontend: add carddav

This commit is contained in:
Lennart
2024-11-10 12:44:56 +01:00
parent d576d997c4
commit c199682a46
4 changed files with 79 additions and 14 deletions

View File

@@ -0,0 +1,9 @@
{% extends "layouts/default.html" %}
{% block imports %}
{% endblock %}
{% block content %}
<h1>Test</h1>
<a href="/frontend/user/{{ owner }}">Back</a>
{% endblock %}

View File

@@ -5,7 +5,7 @@
{% block content %}
<style>
li.calendar-list-item {
li.collection-list-item {
list-style: none;
display: grid;
margin: 12px;
@@ -31,12 +31,14 @@ li.calendar-list-item {
}
}
</style>
<h2>Welcome {{ user_id }}!</h2>
<h1>Welcome {{ user_id }}!</h1>
<h2>Calendars</h2>
<ul>
{% for calendar in calendars %}
{% let color = calendar.color.to_owned().unwrap_or("red".to_owned()) %}
<li class="calendar-list-item" style="--color: {{ color }}">
<a href="/frontend/user/{{ user_id }}/{{ calendar.id}}">
<li class="collection-list-item" style="--color: {{ color }}">
<a href="/frontend/user/{{ user_id }}/calendar/{{ calendar.id}}">
<span class="title">{{ calendar.displayname.to_owned().unwrap_or(calendar.id.to_owned()) }}</span>
<span class="description">
{% if let Some(description) = calendar.description %}{{ description }}{% endif %}
@@ -46,5 +48,19 @@ li.calendar-list-item {
</li>
{% endfor %}
</ul>
<h2>Addressbooks</h2>
<ul>
{% for addressbook in addressbooks %}
<li class="collection-list-item">
<a href="/frontend/user/{{ user_id }}/addressbook/{{ addressbook.id}}">
<span class="title">{{ addressbook.displayname.to_owned().unwrap_or(addressbook.id.to_owned()) }}</span>
<span class="description">
{% if let Some(description) = addressbook.description %}{{ description }}{% endif %}
</span>
</a>
</li>
{% endfor %}
</ul>
{% endblock %}