Style: Delete page preview

- Add bootstrap style to item preview on delete page
This commit is contained in:
Candifloss 2025-04-04 16:14:25 +05:30
parent 0a87bfd570
commit eebf54d0a3

View File

@ -5,38 +5,82 @@
<title>Delete Item</title>
{% include 'favicon.html' %}
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/bootstrap-icons.min.css') }}" rel="stylesheet">
<style>
.delete-container {
max-width: 800px;
margin: 0 auto;
}
.preview-card {
background: white;
border-radius: 0.5rem;
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.attribute-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.attribute-item {
padding: 0.75rem;
border-bottom: 1px solid #eee;
}
.attribute-label {
font-weight: 600;
color: #6c757d;
}
.sticky-actions {
position: sticky;
bottom: 0;
background: white;
padding: 1rem 0;
border-top: 1px solid #dee2e6;
margin-top: 2rem;
}
</style>
</head>
<body align="center">
<body>
{% include 'header.html' %}
<main class="container mt-5 pt-3">
<h2>Are you sure you want to delete the item?</h2>
<!-- Confirmation form -->
<form action='' method="post">
<br>
<input type="submit" value="Delete">
<button type="button" onclick="window.location.href='/'">Cancel</button>
</form>
<main class="container mt-5">
<div class="delete-container">
<h2 class="mb-4 text-center">Confirm Deletion</h2>
<p class="lead text-center text-danger mb-4">
<i class="bi bi-exclamation-triangle-fill"></i> Are you sure you want to delete this item?
</p>
<!-- Display a preview of the item -->
<table border="1" align="center">
<thead>
<tr>
<th>Attribute</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<!-- Item Preview -->
<div class="preview-card p-4 mb-4">
<h3 class="h5 mb-3">Item Details</h3>
<div class="attribute-grid">
{% for attrib in item_attributes %}
<tr>
<td>{{ attrib.display_name }}</td>
<td>{{ item[attrib.attrib_name] }}</td>
</tr>
<div class="attribute-item">
<div class="attribute-label">{{ attrib.display_name }}</div>
<div class="attribute-value">{{ item[attrib.attrib_name] }}</div>
</div>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Sticky action buttons -->
<div class="sticky-actions">
<div class="d-flex justify-content-center gap-3">
<button type="button"
onclick="window.location.href='/'"
class="btn btn-outline-secondary px-4">
<i class="bi bi-x-lg me-1"></i>Cancel
</button>
<form action="" method="post" class="mb-0">
<button type="submit" class="btn btn-danger px-4">
<i class="bi bi-trash3 me-1"></i>Confirm Delete
</button>
</form>
</div>
</div>
</div>
</main>
<!-- Bootstrap JS (for dropdowns) -->
<!-- Bootstrap JS -->
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</body>
</html>