parent
d3364af395
commit
d219c136c0
@ -1,10 +1,6 @@
|
||||
{% extends "problem.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% extends "problem.html" %} {% block content %}
|
||||
|
||||
<h1>Error</h1>
|
||||
<p>
|
||||
Oops, something went wrong. Press the back button to try again.
|
||||
</p>
|
||||
<p>Oops, something went wrong. Press the back button to try again.</p>
|
||||
|
||||
{% endblock %}
|
||||
@ -1,48 +1,66 @@
|
||||
{% extends "main.html" %}
|
||||
{% extends "main.html" %} {% block title %} Items {% endblock %} {% block
|
||||
content %}
|
||||
|
||||
{% block title %} Items {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2 class="flex items-center text-4xl font-extrabold mb-4">
|
||||
{{item.name}}
|
||||
{% if !item.active %}
|
||||
<span class="bg-orchid-pink text-cerise border border-cerise text-2xl font-semibold me-2 px-2.5 py-0.5 rounded ms-2">
|
||||
<h2 class="mb-4 flex items-center text-4xl font-extrabold">
|
||||
{{item.name}} {% if !item.active %}
|
||||
<span
|
||||
class="me-2 ms-2 rounded border border-cerise bg-orchid-pink px-2.5 py-0.5 text-2xl font-semibold text-cerise"
|
||||
>
|
||||
Inactive
|
||||
</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
<section hx-get="/item/{{item_id}}/stats" hx-trigger="load" hx-swap="outerHTML"></section>
|
||||
<section
|
||||
hx-get="/item/{{item_id}}/stats"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></section>
|
||||
|
||||
{% if item.active %}
|
||||
<section class="mx-auto mb-5"
|
||||
x-data="{ negative_form_open: false, positive_form_open: false }">
|
||||
<section
|
||||
class="mx-auto mb-5"
|
||||
x-data="{ negative_form_open: false, positive_form_open: false }"
|
||||
>
|
||||
<div class="flex justify-evenly">
|
||||
<button class="text-slate-100 bg-paynes-gray hover:bg-dark-cyan focus:ring-4 focus:ring-dark-cyan font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 focus:outline-none"
|
||||
@click="negative_form_open = ! negative_form_open">
|
||||
<button
|
||||
class="mb-2 me-2 rounded-lg bg-paynes-gray px-5 py-2.5 text-sm font-medium text-slate-100 hover:bg-dark-cyan focus:outline-none focus:ring-4 focus:ring-dark-cyan"
|
||||
@click="negative_form_open = ! negative_form_open"
|
||||
>
|
||||
Minus
|
||||
</button>
|
||||
<button class="text-slate-100 bg-paynes-gray hover:bg-dark-cyan focus:ring-4 focus:ring-dark-cyan font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 focus:outline-none"
|
||||
@click="positive_form_open = ! positive_form_open">
|
||||
<button
|
||||
class="mb-2 me-2 rounded-lg bg-paynes-gray px-5 py-2.5 text-sm font-medium text-slate-100 hover:bg-dark-cyan focus:outline-none focus:ring-4 focus:ring-dark-cyan"
|
||||
@click="positive_form_open = ! positive_form_open"
|
||||
>
|
||||
Plus
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div x-show="negative_form_open" @click.outside="negative_form_open = false">
|
||||
<div hx-get="/item/{{item_id}}/adjustment/negative" hx-trigger="load" hx-swap="outerHTML"></div>
|
||||
<div
|
||||
hx-get="/item/{{item_id}}/adjustment/negative"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div x-show="positive_form_open" @click.outside="positive_form_open = false">
|
||||
<div hx-get="/item/{{item_id}}/adjustment/positive" hx-trigger="load" hx-swap="outerHTML"></div>
|
||||
<div
|
||||
hx-get="/item/{{item_id}}/adjustment/positive"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="mx-auto">
|
||||
<div hx-get="/item/{{item_id}}/adjustments" hx-trigger="load" hx-swap="outerHTML">
|
||||
</div>
|
||||
<div
|
||||
hx-get="/item/{{item_id}}/adjustments"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
@ -1,60 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<script src="/js/htmx.min.js"></script>
|
||||
<!--TODO Vendor this script -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script
|
||||
defer
|
||||
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"
|
||||
></script>
|
||||
<title>{% block title %}Title{% endblock %}</title>
|
||||
</head>
|
||||
<body class="bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100 min-h-screen">
|
||||
<header class="bg-space-cadet font-sans mb-4 mx-auto">
|
||||
<nav class="mx-auto max-w-7xl px-2 py-4 sm:px-6 lg:px-8 flex justify-between gap-2">
|
||||
</head>
|
||||
<body
|
||||
class="min-h-screen bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100"
|
||||
>
|
||||
<header class="mx-auto mb-4 bg-space-cadet font-sans">
|
||||
<nav
|
||||
class="mx-auto flex max-w-7xl justify-between gap-2 px-2 py-4 sm:px-6 lg:px-8"
|
||||
>
|
||||
<div>
|
||||
<a href="/home" class="rounded-md bg-english-violet px-3 py-2 text-sm font-medium text-white">
|
||||
<a
|
||||
href="/home"
|
||||
class="rounded-md bg-english-violet px-3 py-2 text-sm font-medium text-white"
|
||||
>
|
||||
Inventory App
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/overview"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||
<a
|
||||
href="/overview"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
|
||||
>
|
||||
Overview
|
||||
</a>
|
||||
<a href="/catalog"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||
<a
|
||||
href="/catalog"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
|
||||
>
|
||||
Catalog
|
||||
</a>
|
||||
<a href="/upload"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||
<a
|
||||
href="/upload"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
|
||||
>
|
||||
Upload
|
||||
</a>
|
||||
<a href="/reports"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||
<a
|
||||
href="/reports"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
|
||||
>
|
||||
Reports
|
||||
</a>
|
||||
<a href="/history"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||
<a
|
||||
href="/history"
|
||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
|
||||
>
|
||||
History
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100 mx-auto px-1">
|
||||
{% block content %}<p>Content Missing</p>{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
</header>
|
||||
<main
|
||||
class="mx-auto bg-slate-100 px-1 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100"
|
||||
>
|
||||
{% block content %}
|
||||
<p>Content Missing</p>
|
||||
{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
<!--
|
||||
<script>
|
||||
// Needed for nice bootstrap dropdowns
|
||||
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="dropdown"]');
|
||||
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
|
||||
</script>
|
||||
-->
|
||||
</footer>
|
||||
</body>
|
||||
--></footer>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,16 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<link rel="stylesheet" href="/css/pico.min.css">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<link rel="stylesheet" href="/css/pico.min.css" />
|
||||
<script src="/js/htmx.min.js"></script>
|
||||
<title>Problem</title>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
{% block content %}<p>Something went wrong</p>{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
{% block content %}
|
||||
<p>Something went wrong</p>
|
||||
{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in new issue