refactor: re-structure frontend code

This commit is contained in:
Alexander Navarro 2025-02-19 12:44:09 -03:00
parent 6b7642b693
commit 3e0dd79217
11 changed files with 101 additions and 7 deletions

View file

@ -0,0 +1,22 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="@mini-strap/core" />
<link rel="stylesheet" href="../css/style.css" />
<title>
{% block title %}Axum web service!{% endblock %}
</title>
</head>
<body>
{% include "partials/header.html" %}
<main>
<nav class="msp-d-sm-none msp-d-flex msp-justify-content-end">
<button class="msp-offcanvas-toggle" data-msp-target="#main-offcanvas">Toggle</button>
</nav>
{% block content %}{% endblock %}
</main>
</body>
</html>

View file

@ -0,0 +1,21 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/style.css" />
<title>
{% block title %}Axum web service!{% endblock %}
</title>
</head>
<body>
{% include "partials/header.html" %}
<main>
<nav class="msp-d-sm-none msp-d-flex msp-justify-content-end">
<button class="msp-offcanvas-toggle" data-msp-target="#main-offcanvas">Toggle</button>
</nav>
{% block content %}{% endblock %}
</main>
</body>
</html>

View file

View file

@ -0,0 +1,34 @@
<aside id="main-offcanvas" class="msp-offcanvas msp-offcanvas-sm">
<div class="msp-offcanvas-backdrop msp-offcanvas-toggle"
data-msp-target="#main-offcanvas"></div>
<div class="msp-offcanvas-content">
<div class="msp-offcanvas-body">
<ul class="msp-list-unstyle msp-accordion">
<li>
<a href="/">Overview</a>
</li>
{% for page in global_routes %}
<li class="msp-accordion-item">
<a class="msp-accordion-header" href="{{ page.path }}">{{ page.text }}</a>
{% if page.subpages.length > 0 %}
}
<div class="msp-accordion-collapse">
<ul class="msp-list-unstyle msp-accordion-content">
{% for subpage in page.subpages %}
<li class="">
<a href="{{ subpage.path }}">{{ subpage.text }}</a>
</li>
{% endfor %}
</ul>
</div>
{
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</aside>