fix: polish dark mode contrast and toggle placement

This commit is contained in:
2026-05-01 15:24:21 -04:00
parent ac350238cd
commit 7555303036
3 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -106,7 +106,7 @@
<th class="px-6 py-3 text-left text-xs font-medium theme-text-muted uppercase tracking-wider">Last Service</th> <th class="px-6 py-3 text-left text-xs font-medium theme-text-muted uppercase tracking-wider">Last Service</th>
</tr> </tr>
</thead> </thead>
<tbody class="divide-y theme-border"> <tbody class="theme-border [&>tr]:border-b [&>tr]:theme-border [&>tr:last-child]:border-b-0">
<?php foreach ($vehicles as $vehicle): ?> <?php foreach ($vehicles as $vehicle): ?>
<tr class="theme-surface-alt hover:opacity-95 cursor-pointer" onclick="window.location='<?php echo url('/vehicles/' . $vehicle['id']); ?>'"> <tr class="theme-surface-alt hover:opacity-95 cursor-pointer" onclick="window.location='<?php echo url('/vehicles/' . $vehicle['id']); ?>'">
<td class="px-6 py-4 whitespace-nowrap"> <td class="px-6 py-4 whitespace-nowrap">
+7 -1
View File
@@ -100,11 +100,17 @@ if ($themeSection === 'head'):
#themeToggle { #themeToggle {
position: fixed; position: fixed;
top: 1rem; top: calc(1rem + env(safe-area-inset-top));
right: 1rem; right: 1rem;
z-index: 50; z-index: 50;
} }
@media (max-width: 640px) {
#themeToggle {
top: calc(4.75rem + env(safe-area-inset-top));
}
}
#themeToggle:focus-visible { #themeToggle:focus-visible {
outline: 3px solid #2563eb; outline: 3px solid #2563eb;
outline-offset: 2px; outline-offset: 2px;
+3 -3
View File
@@ -28,13 +28,13 @@
</div> </div>
<?php if (isset($_SESSION['error'])): ?> <?php if (isset($_SESSION['error'])): ?>
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4"> <div class="border px-4 py-3 rounded mb-4" style="background-color: color-mix(in srgb, #ef4444 14%, var(--theme-surface)); border-color: color-mix(in srgb, #ef4444 40%, var(--theme-border)); color: var(--theme-text);">
<?php echo htmlspecialchars($_SESSION['error']); unset($_SESSION['error']); ?> <?php echo htmlspecialchars($_SESSION['error']); unset($_SESSION['error']); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (isset($_SESSION['success'])): ?> <?php if (isset($_SESSION['success'])): ?>
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4"> <div class="border px-4 py-3 rounded mb-4" style="background-color: color-mix(in srgb, #22c55e 14%, var(--theme-surface)); border-color: color-mix(in srgb, #22c55e 40%, var(--theme-border)); color: var(--theme-text);">
<?php echo htmlspecialchars($_SESSION['success']); unset($_SESSION['success']); ?> <?php echo htmlspecialchars($_SESSION['success']); unset($_SESSION['success']); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>