Add: Header bar style

Add minimal boostrap css to top-bar
This commit is contained in:
Candifloss 2025-04-04 11:10:16 +05:30
parent 23af7e0a02
commit 5c10cdcef5
18 changed files with 15377 additions and 59 deletions

6314
static/js/bootstrap.bundle.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7
static/js/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4447
static/js/bootstrap.esm.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7
static/js/bootstrap.esm.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4494
static/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7
static/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,12 @@
<title>CSV Preview</title> <title>CSV Preview</title>
{% include 'favicon.html' %} {% include 'favicon.html' %}
<script src="{{ url_for('static', filename='js/edited_csv.js') }}"></script> <script src="{{ url_for('static', filename='js/edited_csv.js') }}"></script>
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
</head> </head>
<body> <body>
{% include 'header.html' %} {% include 'header.html' %}
<h1>CSV Preview</h1> <main class="container mt-5 pt-3">
<h1>CSV Preview</h1>
<!-- Display error messages --> <!-- Display error messages -->
{% with messages = get_flashed_messages(with_categories=true) %} {% with messages = get_flashed_messages(with_categories=true) %}
@ -72,5 +74,8 @@
<!-- Cancel button that redirects to the home page --> <!-- Cancel button that redirects to the home page -->
<button type="button" onclick="window.location.href='/'">Cancel</button> <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> </body>
</html> </html>

View File

@ -4,10 +4,12 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Delete Item</title> <title>Delete Item</title>
{% include 'favicon.html' %} {% include 'favicon.html' %}
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
</head> </head>
<body align="center"> <body align="center">
{% include 'header.html' %} {% 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 --> <!-- Confirmation form -->
<form action='' method="post"> <form action='' method="post">
@ -33,5 +35,8 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</main>
<!-- Bootstrap JS (for dropdowns) -->
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</body> </body>
</html> </html>

View File

@ -1,26 +1,39 @@
<!-- Header bar --> <nav class="navbar navbar-expand-md navbar-dark bg-primary fixed-top px-3 py-2 shadow-sm">
<div class="header"> <!-- Left-aligned branding and buttons -->
<div class="branding"> <div class="d-flex align-items-center">
<img src="{{ url_for('static', filename=brandingconfig.HEADER_LOGO) }}" <!-- Logo and App Name -->
alt="{{ brandingconfig.APP_NAME }} Logo" <div class="d-flex align-items-center me-3">
class="header-logo"> <a href="{{ url_for('homepage.index') }}" class="d-flex align-items-center text-decoration-none">
<h1 class="appname">{{ brandingconfig.APP_NAME }}</h1> <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>
<div class="buttons">
<form action="/create" method="get"> <!-- Right-aligned logout -->
<button type="submit">Add New Item</button> <div class="ms-auto">
</form> <a href="/logout" class="btn btn-sm btn-danger" title="Logout">
<form action="/import_from_csv" method="get"> Logout
<button type="submit">Import from CSV</button> </a>
</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>
</div> </div>
</div> </nav>

View File

@ -4,10 +4,12 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{% if item %}Update{% else %}Add{% endif %} Item</title> <title>{% if item %}Update{% else %}Add{% endif %} Item</title>
{% include 'favicon.html' %} {% include 'favicon.html' %}
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
</head> </head>
<body> <body>
{% include 'header.html' %} {% 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 --> <!-- Display error message if any -->
{% if error %} {% if error %}
@ -52,5 +54,8 @@
<p><input type="submit" value="{% if item %}Update{% else %}Submit{% endif %}" /></p> <p><input type="submit" value="{% if item %}Update{% else %}Submit{% endif %}" /></p>
<button type="button" onclick="window.location.href='/'">Cancel</button> <button type="button" onclick="window.location.href='/'">Cancel</button>
</form> </form>
</main>
<!-- Bootstrap JS (for dropdowns) -->
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</body> </body>
</html> </html>

View File

@ -5,10 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload CSV File</title> <title>Upload CSV File</title>
{% include 'favicon.html' %} {% include 'favicon.html' %}
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
</head> </head>
<body> <body>
{% include 'header.html' %} {% 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) --> <!-- Display flash messages (only errors) -->
{% with messages = get_flashed_messages(category_filter=["error"]) %} {% with messages = get_flashed_messages(category_filter=["error"]) %}
@ -38,5 +40,8 @@
<button type="submit">Upload</button> <button type="submit">Upload</button>
<button type="button" onclick="window.location.href='/'">Cancel</button> <button type="button" onclick="window.location.href='/'">Cancel</button>
</form> </form>
</main>
<!-- Bootstrap JS (for dropdowns) -->
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</body> </body>
</html> </html>

View File

@ -2,42 +2,45 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>View Inventory</title> <title>View Inventory</title>
{% include 'favicon.html' %} {% include 'favicon.html' %}
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
</head> </head>
<body align="center"> <body align="center">
{% include 'header.html' %} {% include 'header.html' %}
<h2>Item Inventory</h2> <main class="container mt-5 pt-3">
<h2 class="mb-4">Item Inventory</h2>
<table border="1" align="center"> <table class="">
<tr> <tr>
<!-- Table headers --> <!-- Table headers -->
{% for attrib in item_attributes %} {% for attrib in item_attributes %}
<th>{{ attrib.display_name }}</th> <th>{{ attrib.display_name }}</th>
{% 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 %} {% endfor %}
<th colspan="2">Actions</th> </table>
</tr> </main>
<!-- Bootstrap JS (for dropdowns) -->
<!-- Table rows --> <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
{% 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>
</body> </body>
</html> </html>