Add basic menu to the web UI
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 -->
|
||||
|
||||
6
d2warehouse/app/templates/menu.html
Normal file
6
d2warehouse/app/templates/menu.html
Normal 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>
|
||||
Reference in New Issue
Block a user