Skip to content

Commit

Permalink
fix: Make maintenance mode a little cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
danimalweb committed Sep 16, 2024
1 parent 87417d4 commit 07cd407
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/lib/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function show_maintenance_message()
echo '<div class="error notice"><p><strong>' . __('Maintenance Mode', 'tofino') . '</strong> ' . get_field('maintenance_mode_text', 'option') . '</p></div>';

if (!isset($_COOKIE['tofino_maintenance_alert_dismissed'])) {
echo '<div class="maintenance-mode-alert"><h1>' . __('Maintenance Mode', 'tofino') . '</h1><p>' . get_field('maintenance_mode_text', 'option') . '</p><button type="button">' . __('I understand', 'tofino') . '</button></div>';
echo '<div class="maintenance-mode-alert"><div><h1>' . __('Maintenance Mode', 'tofino') . '</h1><p>' . get_field('maintenance_mode_text', 'option') . '</p><button type="button">' . __('I understand', 'tofino') . '</button></div></div>';
}
}
}
Expand Down
12 changes: 10 additions & 2 deletions src/css/base/admin.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
.maintenance-mode-alert {
@apply fixed inset-0 z-[99999] bg-red-600 p-5 text-center text-white;
@apply fixed inset-0 z-[99999] flex justify-center bg-red-600 p-5 text-center text-white;

div {
@apply self-center;
}

h1 {
@apply text-white;
}

p {
@apply text-sm;
@apply text-lg;
}

button {
@apply border-none bg-white px-4 py-2 font-medium uppercase;
}
}

Expand Down

0 comments on commit 07cd407

Please sign in to comment.