first test
This commit is contained in:
213
public/style.css
Normal file
213
public/style.css
Normal file
@ -0,0 +1,213 @@
|
||||
/* public/style.css */
|
||||
/* Basic styling for the Todo App */
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background-color: #f4f7f6;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start; /* Align items to the top */
|
||||
min-height: 100vh;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: #ffffff;
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
width: 100%;
|
||||
max-width: 500px; /* Limit container width */
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Authentication Forms Specific Styling */
|
||||
.auth-container {
|
||||
max-width: 400px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.auth-container h1 {
|
||||
margin-bottom: 25px;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.form-group input[type="text"],
|
||||
.form-group input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box; /* Include padding in width */
|
||||
}
|
||||
|
||||
.switch-link {
|
||||
margin-top: 20px;
|
||||
font-size: 0.9em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.switch-link a {
|
||||
color: #3498db;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.switch-link a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Todo List Specific Styling */
|
||||
.todo-container .header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.todo-container h1 {
|
||||
margin: 0;
|
||||
color: #2c3e50;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
#add-todo-form {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#new-todo-input {
|
||||
flex-grow: 1;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px 0 0 4px;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
#todo-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.todo-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.todo-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.todo-item:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.todo-item input[type="checkbox"] {
|
||||
margin-right: 12px;
|
||||
cursor: pointer;
|
||||
/* Larger checkbox for easier clicking */
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.todo-item span {
|
||||
flex-grow: 1;
|
||||
margin-right: 10px;
|
||||
font-size: 1em;
|
||||
word-break: break-word; /* Prevent long words from overflowing */
|
||||
}
|
||||
|
||||
.todo-item.completed span {
|
||||
text-decoration: line-through;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 1em;
|
||||
transition: background-color 0.2s ease, box-shadow 0.2s ease;
|
||||
background-color: #3498db; /* Primary button color */
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: #2980b9;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
border-radius: 0 4px 4px 0;
|
||||
background-color: #2ecc71; /* Add button color */
|
||||
}
|
||||
|
||||
.btn-add:hover {
|
||||
background-color: #27ae60;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: #e74c3c; /* Logout/Delete button color */
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
.btn-delete {
|
||||
padding: 5px 10px;
|
||||
font-size: 0.9em;
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
margin-left: auto; /* Push delete button to the right */
|
||||
opacity: 0.7;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.todo-item:hover .btn-delete {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.btn-delete:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
.error-message {
|
||||
color: #e74c3c;
|
||||
margin-top: 10px;
|
||||
font-size: 0.9em;
|
||||
min-height: 1.2em; /* Prevent layout shift */
|
||||
}
|
||||
|
||||
.success-message {
|
||||
color: #2ecc71;
|
||||
margin-top: 10px;
|
||||
font-size: 0.9em;
|
||||
min-height: 1.2em; /* Prevent layout shift */
|
||||
}
|
||||
|
Reference in New Issue
Block a user