From 56de2362a01089c8a5ca3c6e1affcade00ffdfce Mon Sep 17 00:00:00 2001
From: Andrew Godwin
Date: Sat, 5 Nov 2022 20:10:39 -0600
Subject: Some user icon stuff

---
 templates/identity/select.html | 14 +++++++++++++-
 templates/identity/view.html   |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)

(limited to 'templates/identity')

diff --git a/templates/identity/select.html b/templates/identity/select.html
index f5be401..dae1ca1 100644
--- a/templates/identity/select.html
+++ b/templates/identity/select.html
@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load static %}
 
 {% block title %}Select Identity{% endblock %}
 
@@ -6,12 +7,23 @@
     <section class="modal identities">
         <h1>Select Identity</h1>
         {% for identity in identities %}
-            <a class="option" href="{{ identity.urls.activate }}">{{ identity }}</a>
+            <a class="option" href="{{ identity.urls.activate }}">
+                {% if identity.icon_uri %}
+                    <img src="{{ identity.icon_uri }}" width="32">
+                {% else %}
+                    <img src="{% static "img/unknown-icon-128.png" %}" width="32">
+                {% endif %}
+                {{ identity }}
+                <small>@{{ identity.short_handle }}</small>
+            </a>
         {% empty %}
             <p class="option empty">You have no identities.</p>
         {% endfor %}
         <a href="/identity/create/" class="option new">
             <i class="fa-solid fa-plus"></i> Create a new identity
         </a>
+        <a href="/auth/logout/" class="option new">
+            <i class="fa-solid fa-right-from-bracket"></i> Logout
+        </a>
     </section>
 {% endblock %}
diff --git a/templates/identity/view.html b/templates/identity/view.html
index 68bb7a3..deb7ae5 100644
--- a/templates/identity/view.html
+++ b/templates/identity/view.html
@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load static %}
 
 {% block title %}{{ identity }}{% endblock %}
 
@@ -6,6 +7,8 @@
     <h1 class="identity">
         {% if identity.icon_uri %}
             <img src="{{identity.icon_uri}}" class="icon">
+        {% else %}
+            <img src="{% static "img/unknown-icon-128.png" %}" class="icon">
         {% endif %}
         {{ identity }} <small>{{ identity.handle }}</small>
     </h1>
-- 
cgit v1.2.3