diff options
Diffstat (limited to 'management/templates')
| -rw-r--r-- | management/templates/base.html | 17 | ||||
| -rw-r--r-- | management/templates/dashboard.html | 16 | ||||
| -rw-r--r-- | management/templates/users.html | 32 |
3 files changed, 48 insertions, 17 deletions
diff --git a/management/templates/base.html b/management/templates/base.html index 0b9da11..7ba0adb 100644 --- a/management/templates/base.html +++ b/management/templates/base.html | |||
| @@ -1,7 +1,18 @@ | |||
| 1 | {% extends 'global.html' %} | 1 | {% extends 'global.html' %} |
| 2 | {% import 'macros.html' as ui %} | ||
| 2 | {% block template %} | 3 | {% block template %} |
| 3 | <nav> | 4 | <nav class="nav"> |
| 4 | <a href="/auth/logout/">Logout</a> | 5 | <div class="nav__brand">{{ ui.connector_icon(18) }} ttun</div> |
| 6 | <div class="nav__links"> | ||
| 7 | <a class="nav__link{% if request.url.path == '/management/dashboard/' %} nav__link--active{% endif %}" href="/management/dashboard/">Dashboard</a> | ||
| 8 | <a class="nav__link{% if request.url.path == '/management/users/' %} nav__link--active{% endif %}" href="/management/users/">Users</a> | ||
| 9 | </div> | ||
| 10 | <div class="nav__actions"> | ||
| 11 | {{ ui.status_badge('Session active', 'good') }} | ||
| 12 | <a class="nav__link" href="/auth/logout/">Sign out</a> | ||
| 13 | </div> | ||
| 5 | </nav> | 14 | </nav> |
| 6 | {% block content %}{% endblock %} | 15 | <div class="content"> |
| 16 | {% block content %}{% endblock %} | ||
| 17 | </div> | ||
| 7 | {% endblock %} | 18 | {% endblock %} |
diff --git a/management/templates/dashboard.html b/management/templates/dashboard.html index 201aa48..4babba9 100644 --- a/management/templates/dashboard.html +++ b/management/templates/dashboard.html | |||
| @@ -1,9 +1,13 @@ | |||
| 1 | {% extends 'base.html' %} | 1 | {% extends 'base.html' %} |
| 2 | |||
| 3 | {% block content %} | 2 | {% block content %} |
| 4 | <div> | 3 | <div class="content__header"> |
| 5 | <ul> | 4 | <span class="eyebrow">Dashboard</span> |
| 6 | <li><a href="/management/users/">Users</a></li> | 5 | <h1>Manage this server</h1> |
| 7 | </ul> | 6 | </div> |
| 8 | </div> | 7 | <div class="module-grid"> |
| 8 | <a class="module-card" href="/management/users/"> | ||
| 9 | <div class="module-card__title">Users</div> | ||
| 10 | <p class="module-card__desc">Manage who can sign in to this server.</p> | ||
| 11 | </a> | ||
| 12 | </div> | ||
| 9 | {% endblock %} | 13 | {% endblock %} |
diff --git a/management/templates/users.html b/management/templates/users.html index 272d2b4..3cf9103 100644 --- a/management/templates/users.html +++ b/management/templates/users.html | |||
| @@ -1,11 +1,27 @@ | |||
| 1 | {% extends 'base.html' %} | 1 | {% extends 'base.html' %} |
| 2 | |||
| 3 | {% block content %} | 2 | {% block content %} |
| 4 | <div> | 3 | <div class="content__header"> |
| 5 | <ul> | 4 | <span class="eyebrow">{{ users|length }} account{{ 's' if users|length != 1 else '' }}</span> |
| 6 | {% for user in users %} | 5 | <h1>Users</h1> |
| 7 | <li>{{ user.username }}</li> | 6 | </div> |
| 8 | {% endfor %} | 7 | <div class="table-wrap"> |
| 9 | </ul> | 8 | <table> |
| 10 | </div> | 9 | <thead> |
| 10 | <tr> | ||
| 11 | <th>Username</th> | ||
| 12 | <th>Email</th> | ||
| 13 | <th>Created</th> | ||
| 14 | </tr> | ||
| 15 | </thead> | ||
| 16 | <tbody> | ||
| 17 | {% for user in users %} | ||
| 18 | <tr> | ||
| 19 | <td>{{ user.username }}</td> | ||
| 20 | <td>{{ user.email }}</td> | ||
| 21 | <td class="muted">{{ user.created.strftime('%Y-%m-%d %H:%M') }}</td> | ||
| 22 | </tr> | ||
| 23 | {% endfor %} | ||
| 24 | </tbody> | ||
| 25 | </table> | ||
| 26 | </div> | ||
| 11 | {% endblock %} | 27 | {% endblock %} |
