diff options
author | Andrew Godwin | 2022-11-12 23:21:52 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-12 23:21:52 -0700 |
commit | 30c208226e8eedeb6879f0b771ae9d5987d06aec (patch) | |
tree | 06e5a1b42c4250563d1784ad202d01b891e1a5d0 /templates | |
parent | 143a4a6e8c70557710d1b207a176f169d145ed1e (diff) | |
download | takahe-30c208226e8eedeb6879f0b771ae9d5987d06aec.tar.gz takahe-30c208226e8eedeb6879f0b771ae9d5987d06aec.tar.bz2 takahe-30c208226e8eedeb6879f0b771ae9d5987d06aec.zip |
Start having some sort of visual style
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 34 | ||||
-rw-r--r-- | templates/identity/_identity_menu.html | 5 | ||||
-rw-r--r-- | templates/identity/create.html | 1 | ||||
-rw-r--r-- | templates/identity/select.html | 17 |
4 files changed, 30 insertions, 27 deletions
diff --git a/templates/base.html b/templates/base.html index 2ff0f15..0f9edfb 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,36 +12,34 @@ </head> <body class="{% block body_class %}{% endblock %}"> - <header> - <h1> - <a href="/"> + <main> + <header> + <a class="logo" href="/"> <img src="{% static "img/icon-128.png" %}" width="32"> {{ config.site_name }} </a> - </h1> - <menu> - <li> - <a href="#"><i class="fa-solid fa-gear"></i></a> - </li> - <li> + <menu> {% if user.is_authenticated %} - <a href="/identity/select/"> + <a href="#"><i class="fa-solid fa-gear"></i> Settings</a> + <div class="gap"></div> + <a href="/identity/select/" class="identity"> {% if not request.identity %} - <img src="{% static "img/unknown-icon-128.png" %}" width="32" title="No identity selected"> + No Identity + <img src="{% static "img/unknown-icon-128.png" %}" title="No identity selected"> {% elif request.identity.icon_uri %} - <img src="{{ request.identity.icon_uri }}" width="32" title="{{ request.identity.handle }}"> + {{ request.identity.username }} <small>@{{ request.identity.domain_id }}</small> + <img src="{{ request.identity.icon_uri }}" title="{{ request.identity.handle }}"> {% else %} - <img src="{% static "img/unknown-icon-128.png" %}" width="32" title="{{ request.identity.handle }}"> + {{ request.identity.username }} <small>@{{ request.identity.domain_id }}</small> + <img src="{% static "img/unknown-icon-128.png" %}" title="{{ request.identity.handle }}"> {% endif %} </a> {% else %} - <a href="/auth/login/">Login</a> + <a href="/auth/login/"><i class="fa-solid fa-right-to-bracket"></i> Login</a> {% endif %} - </li> - </menu> - </header> + </menu> + </header> - <main> {% block content %} {% endblock %} </main> diff --git a/templates/identity/_identity_menu.html b/templates/identity/_identity_menu.html new file mode 100644 index 0000000..fff70cb --- /dev/null +++ b/templates/identity/_identity_menu.html @@ -0,0 +1,5 @@ +<nav> + <a href="/identity/select/" {% if identities %}class="selected"{% endif %}>Select Identity</a> + <a href="/identity/create/" {% if form %}class="selected"{% endif %}>Create Identity</a> + <a href="/auth/logout/">Logout</a> +</nav> diff --git a/templates/identity/create.html b/templates/identity/create.html index cbf0fb2..8e78e10 100644 --- a/templates/identity/create.html +++ b/templates/identity/create.html @@ -5,6 +5,7 @@ {% block title %}Create Identity{% endblock %} {% block content %} + {% include "identity/_identity_menu.html" %} <section class="modal identities"> <h1>Create Identity</h1> {% crispy form form.helper %} diff --git a/templates/identity/select.html b/templates/identity/select.html index ea4065c..d9959ab 100644 --- a/templates/identity/select.html +++ b/templates/identity/select.html @@ -4,17 +4,19 @@ {% block title %}Select Identity{% endblock %} {% block content %} - <section class="modal identities"> - <h1>Select Identity</h1> + {% include "identity/_identity_menu.html" %} + <section class="icon-menu"> {% for identity in identities %} <a class="option" href="{{ identity.urls.activate }}"> {% if identity.icon_uri %} - <img src="{{ identity.icon_uri }}" width="32"> + <img src="{{ identity.icon_uri }}"> {% else %} - <img src="{% static "img/unknown-icon-128.png" %}" width="32"> + <img src="{% static "img/unknown-icon-128.png" %}"> {% endif %} - {{ identity }} - <small>@{{ identity.handle }}</small> + <span class="handle"> + {{ identity.name_or_handle }} + <small>@{{ identity.handle }}</small> + </span> </a> {% empty %} <p class="option empty">You have no identities.</p> @@ -22,8 +24,5 @@ <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 %} |