summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-17 08:21:42 -0700
committerAndrew Godwin2022-11-17 12:21:44 -0700
commitf5eafb0ca0af3ed064202abbe99bfbeef8bbb74d (patch)
treed01453e94f371956e7e989351b51e6ed6eb42541 /templates
parent7f8e792402b66dbb4a721be4f44306d528931b86 (diff)
downloadtakahe-f5eafb0ca0af3ed064202abbe99bfbeef8bbb74d.tar.gz
takahe-f5eafb0ca0af3ed064202abbe99bfbeef8bbb74d.tar.bz2
takahe-f5eafb0ca0af3ed064202abbe99bfbeef8bbb74d.zip
Add image/icon upload
Diffstat (limited to 'templates')
-rw-r--r--templates/activities/_post.html6
-rw-r--r--templates/base.html7
-rw-r--r--templates/identity/view.html7
-rw-r--r--templates/settings/_menu.html2
-rw-r--r--templates/settings/profile.html19
5 files changed, 29 insertions, 12 deletions
diff --git a/templates/activities/_post.html b/templates/activities/_post.html
index 9d8db3b..14b1cbf 100644
--- a/templates/activities/_post.html
+++ b/templates/activities/_post.html
@@ -2,11 +2,7 @@
{% load activity_tags %}
<div class="post" data-takahe-id="{{ post.id }}">
- {% if post.author.icon_uri %}
- <img src="{{post.author.icon_uri}}" class="icon">
- {% else %}
- <img src="{% static "img/unknown-icon-128.png" %}" class="icon">
- {% endif %}
+ <img src="{{ post.author.local_icon_url }}" class="icon">
<time>
{% if post.visibility == 0 %}
diff --git a/templates/base.html b/templates/base.html
index bce5e1b..616d5b6 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -44,11 +44,14 @@
{% if not request.identity %}
No Identity
<img src="{% static "img/unknown-icon-128.png" %}" title="No identity selected">
+ {% elif request.identity.icon %}
+ {{ request.identity.username }}
+ <img src="{{ request.identity.icon.url }}" title="{{ request.identity.handle }}">
{% elif request.identity.icon_uri %}
- {{ request.identity.username }} <small>@{{ request.identity.domain_id }}</small>
+ {{ request.identity.username }}
<img src="{{ request.identity.icon_uri }}" title="{{ request.identity.handle }}">
{% else %}
- {{ request.identity.username }} <small>@{{ request.identity.domain_id }}</small>
+ {{ request.identity.username }}
<img src="{% static "img/unknown-icon-128.png" %}" title="{{ request.identity.handle }}">
{% endif %}
</a>
diff --git a/templates/identity/view.html b/templates/identity/view.html
index e4118c9..c830fc5 100644
--- a/templates/identity/view.html
+++ b/templates/identity/view.html
@@ -9,11 +9,10 @@
</nav>
<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">
+ {% if identity.local_image_url %}
+ <img src="{{ identity.local_image_url }}" class="banner">
{% endif %}
+ <img src="{{ identity.local_icon_url }}" class="icon">
{% if request.identity %}
<form action="{{ identity.urls.action }}" method="POST" class="inline follow">
diff --git a/templates/settings/_menu.html b/templates/settings/_menu.html
index bdae143..4f71651 100644
--- a/templates/settings/_menu.html
+++ b/templates/settings/_menu.html
@@ -1,5 +1,5 @@
<nav>
- <a href="#" {% if section == "profile" %}class="selected"{% endif %}>Profile</a>
+ <a href="{% url "settings_profile" %}" {% if section == "profile" %}class="selected"{% endif %}>Profile</a>
<a href="#" {% if section == "interface" %}class="selected"{% endif %}>Interface</a>
<a href="#" {% if section == "filtering" %}class="selected"{% endif %}>Filtering</a>
</nav>
diff --git a/templates/settings/profile.html b/templates/settings/profile.html
new file mode 100644
index 0000000..1a7c29f
--- /dev/null
+++ b/templates/settings/profile.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}Profile - Settings{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "settings/_menu.html" %}
+ {% endblock %}
+ <form action="." method="POST" enctype="multipart/form-data" >
+ {% csrf_token %}
+ {% for field in form %}
+ {% include "forms/_field.html" %}
+ {% endfor %}
+ <div class="buttons">
+ <a href="{{ request.identity.urls.view }}" class="button secondary">View Profile</a>
+ <button>Save</button>
+ </div>
+ </form>
+{% endblock %}