From 522f710ea12f368b0905ea1d6b398b54a5888d4d Mon Sep 17 00:00:00 2001 From: Andrew Northall Date: Sun, 10 Dec 2023 00:32:19 +0000 Subject: [PATCH] Add user info panel to profile --- app/static/css/caves.app.css | 13 +++++++-- app/templates/logger/profile.html | 45 ++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/app/static/css/caves.app.css b/app/static/css/caves.app.css index 87666d2d..1ae4a109 100644 --- a/app/static/css/caves.app.css +++ b/app/static/css/caves.app.css @@ -511,8 +511,17 @@ main { User profile */ -#profileSidebar .friend-link { - color: var(--bs-body-color) !important; +dl.user-info dt, dl.user-info dd { + border-bottom: 1px solid var(--bs-border-color); + padding-top: 0.3rem; + padding-bottom: 0.3rem; +} + +dl.user-info dd { + margin-bottom: 0; +} +dl.user-info dt:last-of-type, dl.user-info dd:last-of-type { + border-bottom: none !important; } #searchInput.htmx-request { diff --git a/app/templates/logger/profile.html b/app/templates/logger/profile.html index 7bf6c23b..441a2ba0 100644 --- a/app/templates/logger/profile.html +++ b/app/templates/logger/profile.html @@ -22,7 +22,7 @@

{{ profile_user.name }}

{% endif %} {% if user_has_trips %} - {{ profile_user.trips.count }} trips on caves.app + {{ profile_user.trips.count }} trips · {{ profile_user.friends.all.count }} friends {% endif %} {% else %} @@ -58,6 +58,9 @@

{{ profile_user.name }}

{% endif %} +
@@ -83,6 +86,46 @@

{{ profile_user.name }}

{% endif %} + +
+
+
Name
+
{{ profile_user.name }}
+ +
Username
+
{{ profile_user.username }}
+ + {% if profile_user.location %} +
Location
+
{{ profile_user.location }}
+ {% endif %} + + {% if profile_user.country %} +
Country
+
{{ profile_user.country.name }}
+ {% endif %} + + {% if profile_user.clubs %} +
Clubs
+
{{ profile_user.clubs }}
+ {% endif %} + +
Friends
+
{{ profile_user.friends.all.count }}
+ +
Units
+
{{ profile_user.units }}
+ +
Timezone
+
{{ profile_user.timezone }}
+ +
Date joined
+
{{ profile_user.date_joined|date:"j F Y" }}
+ +
Account age
+
{{ profile_user.date_joined|timesince }}
+
+
{% endif %} {% else %}