Style Update
This commit is contained in:
BIN
database.db
BIN
database.db
Binary file not shown.
70
static/style.css
Normal file
70
static/style.css
Normal file
@@ -0,0 +1,70 @@
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-color: #f4f6f9;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 80%;
|
||||
margin: 40px auto;
|
||||
background: white;
|
||||
padding: 25px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
thead {
|
||||
background-color: #2c3e50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 6px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: #3498db;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 8px 14px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -1,22 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Admin Panel</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>Admin Panel</h1>
|
||||
<div>
|
||||
Logged in as {{ session["user"] }} |
|
||||
<a href="/logout">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Add Toner</h3>
|
||||
<input id="name" placeholder="Toner Name">
|
||||
<input id="qty" type="number" placeholder="Quantity">
|
||||
<button onclick="addItem()">Add</button>
|
||||
|
||||
<h3>Update Inventory</h3>
|
||||
<table border="1">
|
||||
<h3>Inventory</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Toner</th>
|
||||
<th>Quantity</th>
|
||||
<th>Update</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="adminInventory"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="/logout">Logout</a>
|
||||
|
||||
<script src="/static/script.js"></script>
|
||||
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,19 +2,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Toner Inventory</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>Toner Inventory</h1>
|
||||
<table border="1">
|
||||
|
||||
{% if session.get("user") %}
|
||||
<div>
|
||||
Logged in as {{ session["user"] }} |
|
||||
<a href="/logout">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Toner</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="inventory"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="/static/script.js"></script>
|
||||
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,18 @@
|
||||
<form method="POST">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="max-width: 400px;">
|
||||
<h2>Admin Login</h2>
|
||||
<input name="username" placeholder="Username" required>
|
||||
<input name="password" type="password" placeholder="Password" required>
|
||||
<button type="submit">Login</button>
|
||||
|
||||
<form method="POST">
|
||||
<input name="username" placeholder="Username" required style="width:100%; margin-bottom:10px;">
|
||||
<input name="password" type="password" placeholder="Password" required style="width:100%; margin-bottom:10px;">
|
||||
<button type="submit" style="width:100%;">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user