diff --git a/crates/frontend/public/assets/style.css b/crates/frontend/public/assets/style.css index b6deae5..6b84498 100644 --- a/crates/frontend/public/assets/style.css +++ b/crates/frontend/public/assets/style.css @@ -1,3 +1,17 @@ +:root { + --background-color: #FFF; + --background-darker: #EEE; + --primary-color: #2F2FE1; + --primary-color-dark: color-mix(in srgb, var(--primary-color), #000000 80%); + --text-on-primary-color: #FFF; + /* --color-red: #FE2060; */ + --color-red: #EE1D59; +} + +html { + background-color: var(--background-color); +} + body { font-family: sans-serif; margin: 0 auto; @@ -48,20 +62,6 @@ header { align-items: center; } -:root { - --background-color: #FFF; - --background-darker: #EEE; - --primary-color: #2F2FE1; - --primary-color-dark: color-mix(in srgb, var(--primary-color), #000000 80%); - --text-on-primary-color: #FFF; - /* --color-red: #FE2060; */ - --color-red: #EE1D59; -} - -html { - background-color: var(--background-color); -} - button, .button { border: none; @@ -109,13 +109,13 @@ table { box-shadow: 4px 2px 12px -6px black; border-collapse: collapse; overflow-x: scroll; - display: block; - width: fit-content; + width: 100%; td, th { padding: 8px; border: 1px solid black; + width: max-content; } th { diff --git a/crates/frontend/public/templates/components/addressbooks_section.html b/crates/frontend/public/templates/components/addressbooks_section.html new file mode 100644 index 0000000..409fd2f --- /dev/null +++ b/crates/frontend/public/templates/components/addressbooks_section.html @@ -0,0 +1,56 @@ +
+

Addressbooks

+ + {%if !deleted_addressbooks.is_empty() %} +

Deleted Addressbooks

+ + {% endif %} + + + +
diff --git a/crates/frontend/public/templates/components/calendars_section.html b/crates/frontend/public/templates/components/calendars_section.html new file mode 100644 index 0000000..8499d2b --- /dev/null +++ b/crates/frontend/public/templates/components/calendars_section.html @@ -0,0 +1,72 @@ +
+

Calendars

+ + {%if !deleted_calendars.is_empty() %} +

Deleted Calendars

+ + {% endif %} + + +
diff --git a/crates/frontend/public/templates/components/profile_section.html b/crates/frontend/public/templates/components/profile_section.html new file mode 100644 index 0000000..5b94c20 --- /dev/null +++ b/crates/frontend/public/templates/components/profile_section.html @@ -0,0 +1,58 @@ +
+

Profile

+ + {% let groups = user.memberships_without_self() %} + {% if groups.len() > 0 %} +

Groups

+ + {% endif %} + +

App tokens

+ + + + + + + {% for app_token in app_tokens %} + + + + + + {% endfor %} + + + + + +
NameCreated at
{{ app_token.name }} + {% if let Some(created_at) = app_token.created_at %} + {{ chrono_humanize::HumanTime::from(created_at.to_owned()) }} + {% endif %} + +
+ +
+
+
+ + +
+
+ + {% if is_apple %} + + {% endif %} +
+ {% if let Some(hostname) = davx5_hostname %} + Configure + in DAVx5 + {% endif %} +
diff --git a/crates/frontend/public/templates/pages/user.html b/crates/frontend/public/templates/pages/user.html index 7a45c1b..cb009ef 100644 --- a/crates/frontend/public/templates/pages/user.html +++ b/crates/frontend/public/templates/pages/user.html @@ -11,183 +11,9 @@

Welcome {{ user.id }}!

-
-

Profile

+{% include "components/profile_section.html" %} +{% include "components/calendars_section.html" %} +{% include "components/addressbooks_section.html" %} -

Groups

- - -

App tokens

- - - - - - - {% for app_token in app_tokens %} - - - - - - {% endfor %} - - - - - -
NameCreated at
{{ app_token.name }} - {% if let Some(created_at) = app_token.created_at %} - {{ chrono_humanize::HumanTime::from(created_at.to_owned()) }} - {% endif %} - -
- -
-
-
- - -
-
- - {% if is_apple %} - - {% endif %} -
- {% if let Some(hostname) = davx5_hostname %} - Configure in DAVx5 - {% endif %} -
- -
-

Calendars

- -{%if !deleted_calendars.is_empty() %} -

Deleted Calendars

- -{% endif %} - - -
- -
-

Addressbooks

- -{%if !deleted_addressbooks.is_empty() %} -

Deleted Addressbooks

- -{% endif %} - - - -
{% endblock %}