Align styling across different views.

This commit is contained in:
2025-07-04 15:29:36 +02:00
committed by Jens Luedicke
parent 6f02affa26
commit 2888e66f49
18 changed files with 189 additions and 448 deletions

View File

@@ -6,7 +6,7 @@
<h2>Project Management</h2>
<a href="{{ url_for('create_project') }}" class="btn btn-success">Create New Project</a>
</div>
{% if projects %}
<div class="projects-table">
<table class="time-history">
@@ -47,7 +47,7 @@
<td class="actions">
<a href="{{ url_for('edit_project', project_id=project.id) }}" class="btn btn-sm btn-primary">Edit</a>
{% if g.user.role.name == 'ADMIN' and project.time_entries|length == 0 %}
<form method="POST" action="{{ url_for('delete_project', project_id=project.id) }}" style="display: inline;"
<form method="POST" action="{{ url_for('delete_project', project_id=project.id) }}" style="display: inline;"
onsubmit="return confirm('Are you sure you want to delete this project?')">
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
</form>
@@ -66,6 +66,13 @@
</div>
<style>
/* Override container width for admin projects page */
.admin-projects-container {
max-width: 1200px !important;
width: auto !important;
padding: 1.5rem !important;
margin: 0 auto 2rem auto !important;
}
.projects-table {
overflow-x: auto;
@@ -96,21 +103,7 @@
white-space: nowrap;
}
.btn-small {
padding: 0.375rem 0.75rem;
font-size: 0.875rem;
margin-right: 0.5rem;
}
.btn-danger {
background-color: #dc3545;
border-color: #dc3545;
}
.btn-danger:hover {
background-color: #c82333;
border-color: #bd2130;
}
/* Button definitions now in main style.css */
.no-data {
text-align: center;

View File

@@ -1,12 +1,12 @@
{% extends 'layout.html' %}
{% block content %}
<div class="container">
<div class="admin-container">
<div class="admin-header">
<h1>Team Management</h1>
<a href="{{ url_for('create_team') }}" class="btn btn-success">Create New Team</a>
</div>
{% if teams %}
<table class="data-table">
<thead>
@@ -25,8 +25,8 @@
<td>{{ team.description }}</td>
<td>{{ team.users|length }}</td>
<td>{{ team.created_at.strftime('%Y-%m-%d') }}</td>
<td>
<a href="{{ url_for('manage_team', team_id=team.id) }}" class="button btn btn-sm btn-info">Manage</a>
<td class="actions">
<a href="{{ url_for('manage_team', team_id=team.id) }}" class="button btn btn-sm btn-primary">Manage</a>
<form method="POST" action="{{ url_for('delete_team', team_id=team.id) }}" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this team?');">
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
</form>

View File

@@ -283,36 +283,7 @@
color: #495057;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 6px;
font-size: 1rem;
text-decoration: none;
cursor: pointer;
margin-right: 1rem;
margin-bottom: 0.5rem;
transition: background-color 0.2s ease;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
/* Button styles now centralized in main style.css */
/* Make preset cards clickable */
.preset-card {

View File

@@ -112,15 +112,7 @@
margin-top: 2rem;
}
.btn-secondary {
background-color: #6c757d;
border-color: #6c757d;
}
.btn-secondary:hover {
background-color: #5a6268;
border-color: #545b62;
}
/* Button styles now centralized in main style.css */
#code {
text-transform: uppercase;

View File

@@ -174,15 +174,7 @@
margin-top: 2rem;
}
.btn-secondary {
background-color: #6c757d;
border-color: #6c757d;
}
.btn-secondary:hover {
background-color: #5a6268;
border-color: #545b62;
}
/* Button styles now centralized in main style.css */
#code {
text-transform: uppercase;

View File

@@ -166,41 +166,7 @@
transition: background-color 0.2s;
}
.btn-success {
background: #28a745;
color: white;
}
.btn-success:hover {
background: #218838;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-warning {
background: #ffc107;
color: #212529;
}
.btn-warning:hover {
background: #e0a800;
}
/* Button styles now centralized in main style.css */
.form-group {
margin-bottom: 1.5rem;

View File

@@ -175,34 +175,7 @@
margin-top: 1.5rem;
}
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 0.25rem;
text-decoration: none;
display: inline-block;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
/* Button styles now centralized in main style.css */
.security-notice {
background: #fff3cd;

View File

@@ -326,35 +326,7 @@ document.addEventListener('DOMContentLoaded', function() {
border-top: 1px solid #e9ecef;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
text-align: center;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
/* Button styles now centralized in main style.css */
@media (max-width: 768px) {
.form-row {

View File

@@ -221,39 +221,7 @@
gap: 0.5rem;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* Button styles now centralized in main style.css */
.pagination-section {
margin: 2rem 0;

View File

@@ -536,30 +536,7 @@
color: #6a1b99;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* Button styles now centralized in main style.css */
.btn-outline {
background: transparent;

View File

@@ -327,30 +327,7 @@
flex-wrap: wrap;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* Button styles now centralized in main style.css */
.subtitle {
color: #6c757d;

View File

@@ -308,43 +308,7 @@
flex-wrap: wrap;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
/* Button styles now centralized in main style.css */
.danger-zone {
margin-left: auto;

View File

@@ -506,27 +506,7 @@
white-space: pre-wrap;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
text-decoration: none;
color: white;
}
/* Button styles now centralized in main style.css */
@media (max-width: 768px) {
.health-cards {

View File

@@ -500,52 +500,7 @@
font-size: 0.875rem;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
.btn-warning {
background: #ffc107;
color: #212529;
}
.btn-warning:hover {
background: #e0a800;
}
/* Button styles now centralized in main style.css */
@media (max-width: 768px) {
.setting-group {

View File

@@ -390,30 +390,7 @@
margin: 0;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
text-decoration: none;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* Button styles now centralized in main style.css */
.btn-outline {
background: transparent;

View File

@@ -328,37 +328,7 @@
transition: background-color 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* Button styles now centralized in main style.css */
.pagination-section {
margin-top: 2rem;

View File

@@ -102,24 +102,7 @@
margin-bottom: 1.5rem;
}
.btn {
padding: 0.75rem 2rem;
border: none;
border-radius: 0.25rem;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.2s;
width: 100%;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
/* Button styles now centralized in main style.css */
.help-section {
text-align: center;