From 2154e6f02252576d8652e66f26fa4ae635d0f8ee Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 17 Nov 2022 17:43:00 -0700 Subject: Rework UI to have vertical menus --- templates/settings/_menu.html | 29 ++++++++++++++++++++++++++--- templates/settings/base.html | 7 +++++++ templates/settings/profile.html | 22 +++++++++++++--------- templates/settings/settings.html | 16 +++++++++------- 4 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 templates/settings/base.html (limited to 'templates/settings') diff --git a/templates/settings/_menu.html b/templates/settings/_menu.html index 4f71651..e2dc70b 100644 --- a/templates/settings/_menu.html +++ b/templates/settings/_menu.html @@ -1,5 +1,28 @@ diff --git a/templates/settings/base.html b/templates/settings/base.html new file mode 100644 index 0000000..d5efa69 --- /dev/null +++ b/templates/settings/base.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block title %}{% block subtitle %}{% endblock %} - Settings{% endblock %} + +{% block right_content %} + {% include "settings/_menu.html" %} +{% endblock %} diff --git a/templates/settings/profile.html b/templates/settings/profile.html index 1a7c29f..5c00557 100644 --- a/templates/settings/profile.html +++ b/templates/settings/profile.html @@ -1,18 +1,22 @@ -{% extends "base.html" %} +{% extends "settings/base.html" %} -{% block title %}Profile - Settings{% endblock %} +{% block subtitle %}Profile{% endblock %} {% block content %} - {% block menu %} - {% include "settings/_menu.html" %} - {% endblock %}
{% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} - {% endfor %} +
+ Details + {% include "forms/_field.html" with field=form.name %} + {% include "forms/_field.html" with field=form.summary %} +
+
+ Images + {% include "forms/_field.html" with field=form.icon preview=request.identity.icon.url %} + {% include "forms/_field.html" with field=form.image preview=request.identity.image.url %} +
- View Profile + View Profile
diff --git a/templates/settings/settings.html b/templates/settings/settings.html index 016eebb..a933627 100644 --- a/templates/settings/settings.html +++ b/templates/settings/settings.html @@ -1,15 +1,17 @@ -{% extends "base.html" %} +{% extends "settings/base.html" %} -{% block title %}{{ section.title }} - Settings{% endblock %} +{% block subtitle %}{{ section.title }}{% endblock %} {% block content %} - {% block menu %} - {% include "settings/_menu.html" %} - {% endblock %}
{% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} + {% for title, fields in fieldsets.items %} +
+ {{ title }} + {% for field in fields %} + {% include "forms/_field.html" %} + {% endfor %} +
{% endfor %}
-- cgit v1.2.3