Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
more styling
  • Loading branch information
LucifersCircle committed Dec 8, 2024
1 parent 77c020a commit 8cc0470
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def initialize_db():
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WTR</title>
<title>WebOS-TR</title>
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -90,6 +90,12 @@ def initialize_db():
button:hover {
background-color: #3f4c8c;
}
button.remove {
background-color: #d9534f; /* Soft red */
}
button.remove:hover {
background-color: #c9302c; /* Slightly darker red */
}
.message {
margin: 10px auto;
padding: 10px;
Expand All @@ -99,7 +105,8 @@ def initialize_db():
width: 100%; /* Match container width */
text-align: center;
}
.message.duplicate {
.message.duplicate,
.message.not-found {
color: yellow;
}
.message.invalid {
Expand Down Expand Up @@ -132,12 +139,13 @@ def initialize_db():
<form action="/" method="post">
<input type="text" name="key" placeholder="Enter your key" required>
<button type="submit" name="action" value="add">Add Key</button>
<button type="submit" name="action" value="remove">Remove Key</button>
<button type="submit" name="action" value="remove" class="remove">Remove Key</button>
</form>
{% if message %}
<div class="message
{% if 'Duplicate' in message %}duplicate{% endif %}
{% if 'Invalid key format' in message %}invalid{% endif %}
{% if 'not found in database' in message %}not-found{% endif %}
">{{ message }}</div>
{% endif %}
Expand All @@ -150,8 +158,6 @@ def initialize_db():
</div>
</body>
</html>
"""

# Landing page route
Expand Down

0 comments on commit 8cc0470

Please sign in to comment.