Upload files to "frontend/components"
This commit is contained in:
parent
392bdfca2f
commit
7779eb279b
3 changed files with 56 additions and 0 deletions
18
frontend/components/Layout.jinja
Normal file
18
frontend/components/Layout.jinja
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{#def title="PointCloud Viewer", active_tab="" #}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr" data-theme="dark">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||||
|
</head>
|
||||||
|
<body class="bg-base-200 min-h-screen">
|
||||||
|
<Navbar active_tab="{{ active_tab }}" />
|
||||||
|
<div class="container mx-auto px-4 mt-6 max-w-7xl pb-10">
|
||||||
|
{{ content }}
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
frontend/components/Navbar.jinja
Normal file
36
frontend/components/Navbar.jinja
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{#def active_tab="" #}
|
||||||
|
<div class="navbar bg-base-100 shadow-md px-6 mb-2">
|
||||||
|
<div class="flex-1">
|
||||||
|
<span class="text-xl font-bold tracking-tight">☁️ PointCloud Viewer</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none gap-4 items-center">
|
||||||
|
<div
|
||||||
|
id="health-indicator"
|
||||||
|
hx-get="/health-check"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="innerHTML"
|
||||||
|
class="text-sm text-base-content/50"
|
||||||
|
>vérification…</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div role="tablist" class="tabs tabs-boxed mb-6 w-fit ml-4">
|
||||||
|
<a
|
||||||
|
role="tab"
|
||||||
|
class="tab {% if active_tab == 'upload' %}tab-active{% endif %}"
|
||||||
|
hx-get="/"
|
||||||
|
hx-target="#main-content"
|
||||||
|
hx-push-url="/"
|
||||||
|
>📤 Upload</a>
|
||||||
|
<a
|
||||||
|
role="tab"
|
||||||
|
class="tab {% if active_tab == 'admin' %}tab-active{% endif %}"
|
||||||
|
hx-get="/admin/list"
|
||||||
|
hx-target="#main-content"
|
||||||
|
hx-push-url="/admin"
|
||||||
|
>🗂️ Admin</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main-content" class="px-4">
|
||||||
|
{{ content }}
|
||||||
|
</div>
|
||||||
2
frontend/components/Spinner.jinja
Normal file
2
frontend/components/Spinner.jinja
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
{#def id="spinner" #}
|
||||||
|
<span id="{{ id }}" class="loading loading-spinner loading-md htmx-indicator"></span>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue