Add: Header bar style
Add minimal boostrap css to top-bar
This commit is contained in:
parent
23af7e0a02
commit
5c10cdcef5
6314
static/js/bootstrap.bundle.js
vendored
Normal file
6314
static/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
static/js/bootstrap.bundle.js.map
Normal file
1
static/js/bootstrap.bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
7
static/js/bootstrap.bundle.min.js
vendored
Normal file
7
static/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/js/bootstrap.bundle.min.js.map
Normal file
1
static/js/bootstrap.bundle.min.js.map
Normal file
File diff suppressed because one or more lines are too long
4447
static/js/bootstrap.esm.js
vendored
Normal file
4447
static/js/bootstrap.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
static/js/bootstrap.esm.js.map
Normal file
1
static/js/bootstrap.esm.js.map
Normal file
File diff suppressed because one or more lines are too long
7
static/js/bootstrap.esm.min.js
vendored
Normal file
7
static/js/bootstrap.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/js/bootstrap.esm.min.js.map
Normal file
1
static/js/bootstrap.esm.min.js.map
Normal file
File diff suppressed because one or more lines are too long
4494
static/js/bootstrap.js
vendored
Normal file
4494
static/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
static/js/bootstrap.js.map
Normal file
1
static/js/bootstrap.js.map
Normal file
File diff suppressed because one or more lines are too long
7
static/js/bootstrap.min.js
vendored
Normal file
7
static/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/js/bootstrap.min.js.map
Normal file
1
static/js/bootstrap.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -6,10 +6,12 @@
|
||||
<title>CSV Preview</title>
|
||||
{% include 'favicon.html' %}
|
||||
<script src="{{ url_for('static', filename='js/edited_csv.js') }}"></script>
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.html' %}
|
||||
<h1>CSV Preview</h1>
|
||||
<main class="container mt-5 pt-3">
|
||||
<h1>CSV Preview</h1>
|
||||
|
||||
<!-- Display error messages -->
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
@ -72,5 +74,8 @@
|
||||
|
||||
<!-- Cancel button that redirects to the home page -->
|
||||
<button type="button" onclick="window.location.href='/'">Cancel</button>
|
||||
</main>
|
||||
<!-- Bootstrap JS (for dropdowns) -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
@ -4,10 +4,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Delete Item</title>
|
||||
{% include 'favicon.html' %}
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body align="center">
|
||||
{% include 'header.html' %}
|
||||
<h2>Are you sure you want to delete the item?</h2>
|
||||
<main class="container mt-5 pt-3">
|
||||
<h2>Are you sure you want to delete the item?</h2>
|
||||
|
||||
<!-- Confirmation form -->
|
||||
<form action='' method="post">
|
||||
@ -33,5 +35,8 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
<!-- Bootstrap JS (for dropdowns) -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,26 +1,39 @@
|
||||
<!-- Header bar -->
|
||||
<div class="header">
|
||||
<div class="branding">
|
||||
<img src="{{ url_for('static', filename=brandingconfig.HEADER_LOGO) }}"
|
||||
alt="{{ brandingconfig.APP_NAME }} Logo"
|
||||
class="header-logo">
|
||||
<h1 class="appname">{{ brandingconfig.APP_NAME }}</h1>
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-primary fixed-top px-3 py-2 shadow-sm">
|
||||
<!-- Left-aligned branding and buttons -->
|
||||
<div class="d-flex align-items-center">
|
||||
<!-- Logo and App Name -->
|
||||
<div class="d-flex align-items-center me-3">
|
||||
<a href="{{ url_for('homepage.index') }}" class="d-flex align-items-center text-decoration-none">
|
||||
<img src="{{ url_for('static', filename=brandingconfig.HEADER_LOGO) }}"
|
||||
alt="{{ brandingconfig.APP_NAME }} Logo"
|
||||
class="me-2" style="height: 30px;">
|
||||
<span class="navbar-brand mb-0 h1 text-white">{{ brandingconfig.APP_NAME }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="d-flex gap-2">
|
||||
<a href="/create" class="btn btn-sm btn-outline-light" title="Add new item">
|
||||
Add New Item
|
||||
</a>
|
||||
<a href="/import_from_csv" class="btn btn-sm btn-outline-light" title="Bulk-add new items from a CSV file">
|
||||
Import CSV
|
||||
</a>
|
||||
<a href="/edit_using_csv" class="btn btn-sm btn-outline-light" title="Bulk-update existing items using a CSV file">
|
||||
Edit CSV
|
||||
</a>
|
||||
<form action="/export_csv" method="POST" class="d-inline">
|
||||
<button type="submit" class="btn btn-sm btn-outline-light" title="Download all data as a CSV file">
|
||||
Export Data
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<form action="/create" method="get">
|
||||
<button type="submit">Add New Item</button>
|
||||
</form>
|
||||
<form action="/import_from_csv" method="get">
|
||||
<button type="submit">Import from CSV</button>
|
||||
</form>
|
||||
<form action="/edit_using_csv" method="get">
|
||||
<button type="submit">Edit using CSV</button>
|
||||
</form>
|
||||
<form action="/export_csv" method="POST">
|
||||
<button type="submit">Export Data</button>
|
||||
</form>
|
||||
<form action="/logout" method="get">
|
||||
<button type="submit">Logout</button>
|
||||
</form>
|
||||
|
||||
<!-- Right-aligned logout -->
|
||||
<div class="ms-auto">
|
||||
<a href="/logout" class="btn btn-sm btn-danger" title="Logout">
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
@ -4,10 +4,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>{% if item %}Update{% else %}Add{% endif %} Item</title>
|
||||
{% include 'favicon.html' %}
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.html' %}
|
||||
<h2>{% if item %}Update{% else %}Add{% endif %} Item</h2>
|
||||
<main class="container mt-5 pt-3">
|
||||
<h2>{% if item %}Update{% else %}Add{% endif %} Item</h2>
|
||||
|
||||
<!-- Display error message if any -->
|
||||
{% if error %}
|
||||
@ -52,5 +54,8 @@
|
||||
<p><input type="submit" value="{% if item %}Update{% else %}Submit{% endif %}" /></p>
|
||||
<button type="button" onclick="window.location.href='/'">Cancel</button>
|
||||
</form>
|
||||
</main>
|
||||
<!-- Bootstrap JS (for dropdowns) -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
@ -5,10 +5,12 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Upload CSV File</title>
|
||||
{% include 'favicon.html' %}
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.html' %}
|
||||
<h1>Upload CSV File</h1>
|
||||
<main class="container mt-5 pt-3">
|
||||
<h1>Upload CSV File</h1>
|
||||
|
||||
<!-- Display flash messages (only errors) -->
|
||||
{% with messages = get_flashed_messages(category_filter=["error"]) %}
|
||||
@ -38,5 +40,8 @@
|
||||
<button type="submit">Upload</button>
|
||||
<button type="button" onclick="window.location.href='/'">Cancel</button>
|
||||
</form>
|
||||
</main>
|
||||
<!-- Bootstrap JS (for dropdowns) -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
@ -2,42 +2,45 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>View Inventory</title>
|
||||
|
||||
{% include 'favicon.html' %}
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body align="center">
|
||||
{% include 'header.html' %}
|
||||
<h2>Item Inventory</h2>
|
||||
<main class="container mt-5 pt-3">
|
||||
<h2 class="mb-4">Item Inventory</h2>
|
||||
<table class="">
|
||||
<tr>
|
||||
<!-- Table headers -->
|
||||
{% for attrib in item_attributes %}
|
||||
<th>{{ attrib.display_name }}</th>
|
||||
{% endfor %}
|
||||
<th colspan="2">Actions</th>
|
||||
</tr>
|
||||
|
||||
<table border="1" align="center">
|
||||
<tr>
|
||||
<!-- Table headers -->
|
||||
{% for attrib in item_attributes %}
|
||||
<th>{{ attrib.display_name }}</th>
|
||||
<!-- Table rows -->
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
{% for attrib in item_attributes %}
|
||||
<td>{{ item[attrib.attrib_name] }}</td>
|
||||
{% endfor %}
|
||||
<td>
|
||||
<form action="/update/{{ item[primary_attrib] }}" method="get">
|
||||
<button type="submit">Edit</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="/delete/{{ item[primary_attrib] }}" method="get">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<th colspan="2">Actions</th>
|
||||
</tr>
|
||||
|
||||
<!-- Table rows -->
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
{% for attrib in item_attributes %}
|
||||
<td>{{ item[attrib.attrib_name] }}</td>
|
||||
{% endfor %}
|
||||
<td>
|
||||
<form action="/update/{{ item[primary_attrib] }}" method="get">
|
||||
<button type="submit">Edit</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="/delete/{{ item[primary_attrib] }}" method="get">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</main>
|
||||
<!-- Bootstrap JS (for dropdowns) -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user