refactor: adding a little bit more polish to the admin dashboard, so it can be presented

This commit is contained in:
Gabor Körber 2024-01-15 22:38:07 +01:00
parent 7f3602233c
commit f83ae7be09
3 changed files with 45 additions and 8 deletions

BIN
static/admin/teddy_bear.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,11 +1,9 @@
<!DOCTYPE html>
{% set is_nav_sidebar_enabled = true %}
<html lang="{{ language_code|none('en-us') }}" dir="{{ LANGUAGE_BIDI|yesno('rtl,ltr,auto') }}">
<head>
<title>{% block title %}{{ title|none('Admiral') }}{% endblock %}</title>
<!-- You MUST include jQuery 3.4+ before Fomantic -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css">
@ -13,7 +11,6 @@
<link rel="stylesheet" type="text/css" href="/static/admin/admin.css">
{% block dark_mode_vars %}<!-- would contain css for dark mode in django. -->{% endblock %}
{% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %}
@ -35,24 +32,30 @@
<i class="content icon"></i>
</a>
<div class="item active" id="branding">
<div class="item" id="branding">
{% block branding %}Miniweb{% endblock %}
</div>
{% block usertools %}
{% endblock usertools %}
<div class="right menu">
{% block usertools %}
<div class="item">Documentation</div>
<div class="icon item"><i class="tools link icon"></i></div>
{% endblock usertools %}
<div class="item">
<a class="ui blue image label">
<img src="/images/avatar/small/person.jpg">
<img src="/static/admin/teddy_bear.png">
Person
<div class="detail">Admin</div>
</a>
</div>
<div class="icon item">
<i class="power icon" style="float: none;"></i>
<form id="logout-form" method="post" action="{{ url('admin:logout') }}">
<i class="power link icon" style="float: none;"></i>
</form>
</div>
</div>

View File

@ -6,8 +6,42 @@
<p>This is the example placeholder that should become the welcoming dashboard for the admin.
It should show various statistics and also a detailed overview of all your models.
This Dashboard however has a low priority to be completed, so I started filling it with whatever
came into my mind.
</p>
</div>
</div>
</div>
</div>
<div class="ui page grid">
<div class="three column row">
<div class="column">
<h2 class="ui header">Axum</h2>
<p>Selecting from all the backend frameworks in rust, axum seemed like the most logical choice. While there
are plenty of good frameworks available, axum being close to tokio allows to rely on the most famous
async framework, which also powers great other crates like tower and hyper.</p>
<a class="ui small icon button" href="https://github.com/tokio-rs/axum" target="_blank">More Details <i
class="angle double right icon"></i></a>
</div>
<div class="column">
<h2 class="ui header">Jumbotron</h2>
<p>A jumbotron is a big box which is used for calling extra attention to some special content. The above
element was achieved by making use of Fomantic's messaging component. Click the button below for
information on Fomantic's message syntax.</p>
<a class="ui small icon button" href="https://fomantic-ui.com/collections/message.html" target="_blank">More
Details <i class="angle double right icon"></i></a>
</div>
<div class="column">
<h2 class="ui header">Django Admin</h2>
<p>Django was the inspiration to make this, but it has since changed into it's own project, where I have to
learn more frontend work. I like Django in python, even though there are more modern frameworks
available, because usually web projects end up using most of the framework anyway, so it is only one
dependency to maintain. Also, the most important thing in Django is the Admin, which I here try to
reproduce.</p>
<a class="ui small icon button" href="https://www.djangoproject.com/" target="_blank">More
Details <i class="angle double right icon"></i></a>
</div>
</div>
</div>