mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 03:32:15 +00:00
frontend: some changes
This commit is contained in:
3
crates/frontend/public/assets/style.css
Normal file
3
crates/frontend/public/assets/style.css
Normal file
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}RustiCal{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/frontend/assets/style.css" />
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Test</h1>
|
||||
<a href="/frontend/user/{{ owner }}">Back</a>
|
||||
{% let name = addressbook.displayname.to_owned().unwrap_or(addressbook.id.to_owned()) %}
|
||||
<h1>{{ name }}</h1>
|
||||
{% if let Some(description) = addressbook.description %}<p>{{ description }}</p>{% endif%}
|
||||
|
||||
<pre>{{ addressbook|yaml }}</pre>
|
||||
|
||||
<a href="/frontend/user/{{ addressbook.principal }}">Back</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Test</h1>
|
||||
{% let name = calendar.displayname.to_owned().unwrap_or(calendar.id.to_owned()) %}
|
||||
<h1>{{ name }}</h1>
|
||||
{% if let Some(description) = calendar.description %}<p>{{ description }}</p>{% endif%}
|
||||
|
||||
<pre>{{ calendar|yaml }}</pre>
|
||||
|
||||
<a href="/frontend/user/{{ calendar.principal }}">Back</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -48,6 +48,23 @@ li.collection-list-item {
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%if !deleted_calendars.is_empty() %}
|
||||
<h3>Deleted Calendars</h3>
|
||||
<ul>
|
||||
{% for calendar in deleted_calendars %}
|
||||
{% let color = calendar.color.to_owned().unwrap_or("red".to_owned()) %}
|
||||
<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 %}
|
||||
</span>
|
||||
<div class="color-chip"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h2>Addressbooks</h2>
|
||||
<ul>
|
||||
@@ -62,5 +79,20 @@ li.collection-list-item {
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%if !deleted_addressbooks.is_empty() %}
|
||||
<h3>Deleted Addressbooks</h3>
|
||||
<ul>
|
||||
{% for addressbook in deleted_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>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user