mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
frontend: add carddav
This commit is contained in:
9
crates/frontend/public/templates/pages/addressbook.html
Normal file
9
crates/frontend/public/templates/pages/addressbook.html
Normal 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 %}
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user