Add basic menu to the web UI

This commit is contained in:
2025-10-02 00:36:03 +02:00
parent 1cb9ff63e7
commit 3e2c481f6f
6 changed files with 48 additions and 2 deletions

View File

@@ -271,6 +271,7 @@ def list_storage_category(stash_name: str, category: str):
"list_storage.html",
stash_name=stash_name,
storage_items=items,
category=category,
storage_count=lambda x: storage_count(x, stash_name),
)

View File

@@ -5,6 +5,25 @@ body {
color: rgb(240, 240, 240);
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
background-color: #444;
}
nav a {
display: block;
padding: 1rem 1.5rem;
text-decoration: none;
color: rgb(240, 240, 240);
}
nav a:hover {
background-color: #333;
}
.stash-tab {
display: grid;
grid-template-columns: repeat(5, 1fr);

View File

@@ -2,10 +2,19 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Shared Stash</title>
<title>Currency</title>
<link rel="stylesheet" href="/static/style.css" />
<head>
<body>
{% include "menu.html" %}
<nav>
<ul>
<li><a href="/storage/{{stash_name or 'softcore'}}">All</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/uniques">Uniques</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/sets">Sets</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/currency">Currency</a></li>
</ul>
</nav>
<div class="currencies">
<div>
<table>

View File

@@ -7,6 +7,7 @@
<script src="/static/helpers.js"></script>
<head>
<body>
{% include "menu.html" %}
<form action="/stash/{{stash_name}}/store" method="POST">
{% for tab in stash.tabs %}
{% set tabloop = loop %}

View File

@@ -2,10 +2,20 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Storage</title>
<title>Storage - {{category or 'all'}}</title>
<link rel="stylesheet" href="/static/style.css" />
<head>
<body>
{% include "menu.html" %}
<nav>
<ul>
<li><a href="/storage/{{stash_name or 'softcore'}}">All</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/uniques">Uniques</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/sets">Sets</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/misc">Misc</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}/currency">Currency</a></li>
</ul>
</nav>
<form action="/storage/{{stash_name}}/take" method="POST">
<div>
<!-- TODO: Include item.html -->

View File

@@ -0,0 +1,6 @@
<nav>
<ul>
<li><a href="/stash/{{stash_name or 'softcore'}}">Stash</a></li>
<li><a href="/storage/{{stash_name or 'softcore'}}">Storage</a></li>
</ul>
</nav>