Files
TimeTrack/static/css/style.css
2025-06-28 11:10:22 +02:00

525 lines
8.8 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
header {
background-color: #4CAF50;
padding: 1rem;
}
nav ul {
display: flex;
justify-content: flex-start;
align-items: center;
list-style: none;
padding: 0;
margin: 0;
}
nav ul li {
margin: 0 1rem;
}
nav ul li a {
color: white;
text-decoration: none;
}
/* Dropdown menu styles */
nav ul li.dropdown {
position: relative;
}
nav ul li.admin-dropdown {
margin-left: auto; /* Push to the right */
}
nav ul li.dropdown .dropdown-toggle {
cursor: pointer;
padding: 10px 15px;
display: block;
color: #fff;
text-decoration: none;
}
nav ul li.dropdown .dropdown-menu {
display: none;
position: absolute;
right: 0; /* Align to the right for admin dropdown */
background-color: #333;
min-width: 180px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1000;
padding: 10px 0;
border-radius: 4px;
margin-top: 5px;
}
/* Show dropdown on hover and keep it visible when hovering over the menu */
nav ul li.dropdown:hover .dropdown-menu,
nav ul li.dropdown .dropdown-menu:hover {
display: block;
}
nav ul li.dropdown .dropdown-menu li {
display: block;
padding: 0;
width: 100%;
}
nav ul li.dropdown .dropdown-menu li a {
padding: 10px 20px;
display: block;
text-align: left;
color: #fff;
text-decoration: none;
transition: background-color 0.2s ease;
}
nav ul li.dropdown .dropdown-menu li a:hover {
background-color: #444;
}
main {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1rem;
}
.hero {
text-align: center;
padding: 2rem 0;
background-color: #f9f9f9;
border-radius: 5px;
margin-bottom: 2rem;
}
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.feature {
background-color: #f9f9f9;
padding: 1.5rem;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.feature h3 {
color: #4CAF50;
margin-top: 0;
}
.about, .contact, .thank-you {
max-width: 800px;
margin: 0 auto;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}
button {
background-color: #4CAF50;
color: white;
border: none;
padding: 8px 16px;
cursor: pointer;
border-radius: 4px;
}
.btn {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
background-color: #4CAF50;
color: white;
}
.btn:hover {
background-color: #45a049;
}
.btn-danger {
background-color: #f44336;
}
.btn-danger:hover {
background-color: #d32f2f;
}
footer {
text-align: center;
padding: 1rem;
background-color: #f4f4f4;
margin-top: 2rem;
}
/* Time tracking specific styles */
.timetrack-container {
max-width: 800px;
margin: 0 auto 3rem auto;
}
.timer-section {
background-color: #f5f5f5;
padding: 2rem;
border-radius: 5px;
margin-bottom: 2rem;
text-align: center;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#timer {
font-size: 3rem;
font-weight: bold;
margin: 1rem 0;
font-family: monospace;
color: #333;
}
.arrive-btn {
background-color: #4CAF50;
font-size: 1.2rem;
padding: 0.8rem 2rem;
transition: background-color 0.3s;
}
.arrive-btn:hover {
background-color: #45a049;
}
.leave-btn {
background-color: #f44336;
font-size: 1.2rem;
padding: 0.8rem 2rem;
transition: background-color 0.3s;
}
.leave-btn:hover {
background-color: #d32f2f;
}
.time-history {
width: 100%;
border-collapse: collapse;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.time-history th, .time-history td {
padding: 0.8rem;
text-align: left;
border-bottom: 1px solid #ddd;
}
.time-history th {
background-color: #f2f2f2;
font-weight: bold;
}
.time-history tr:hover {
background-color: #f5f5f5;
}
.button-group {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 1rem;
}
.pause-btn {
background-color: #ff9800;
font-size: 1.2rem;
padding: 0.8rem 2rem;
transition: background-color 0.3s;
}
.pause-btn:hover {
background-color: #f57c00;
}
.resume-btn {
background-color: #2196F3;
font-size: 1.2rem;
padding: 0.8rem 2rem;
transition: background-color 0.3s;
}
.resume-btn:hover {
background-color: #1976D2;
}
.break-info {
color: #ff9800;
font-weight: bold;
margin: 0.5rem 0;
}
.break-total {
color: #666;
font-size: 0.9rem;
margin: 0.5rem 0;
}
.notification {
position: fixed;
top: 20px;
right: 20px;
padding: 15px 25px;
background-color: #4CAF50;
color: white;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
z-index: 1000;
animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(-20px); }
}
.config-container {
max-width: 800px;
margin: 0 auto 3rem auto;
padding: 1rem;
background-color: #f9f9f9;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.form-section {
border: 1px solid #e0e0e0;
border-radius: 5px;
padding: 1rem;
margin-bottom: 1.5rem;
background-color: #f9f9f9;
}
.form-section h3 {
margin-top: 0;
margin-bottom: 1rem;
color: #333;
font-size: 1.2rem;
}
.config-form .form-group {
margin-bottom: 1.5rem;
}
.config-form label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
.config-form small {
display: block;
color: #666;
margin-top: 4px;
font-style: italic;
}
.btn-primary {
background-color: #007bff;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
}
.alert {
padding: 0.75rem 1rem;
margin-bottom: 1rem;
border-radius: 4px;
}
.alert-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.alert-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
/* Modal styles */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: #fff;
margin: 10% auto;
padding: 20px;
border-radius: 5px;
width: 80%;
max-width: 500px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}
.edit-entry-btn, .delete-entry-btn {
padding: 5px 10px;
margin-right: 5px;
border: none;
border-radius: 3px;
cursor: pointer;
}
.edit-entry-btn {
background-color: #2196F3;
color: white;
}
.edit-entry-btn:hover {
background-color: #0b7dda;
}
.delete-entry-btn {
background-color: #f44336;
color: white;
}
.delete-entry-btn:hover {
background-color: #d32f2f;
}
input[type="date"], input[type="time"] {
font-family: monospace;
padding: 8px;
width: 100%;
}
/* Force consistent date format display */
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
font-family: monospace;
}
/* Add some styling to the format hints */
.form-group small {
display: block;
color: #666;
margin-top: 4px;
font-style: italic;
}
/* Admin Dashboard Styles */
.admin-panel {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 20px;
}
.admin-card {
background-color: #f8f9fa;
border-radius: 5px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
width: 300px;
transition: transform 0.2s, box-shadow 0.2s;
}
.admin-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.admin-card h2 {
margin-top: 0;
color: #333;
}
.admin-card p {
color: #666;
margin-bottom: 20px;
}
/* User status badges */
.status-badge {
display: inline-block;
padding: 3px 8px;
border-radius: 12px;
font-size: 0.85em;
font-weight: 500;
}
.status-active {
background-color: #d4edda;
color: #155724;
}
.status-blocked {
background-color: #f8d7da;
color: #721c24;
}