mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-17 05:53:15 +02:00
Cleanup CSS and add sections
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
/* Loading overlay styling */
|
/* =========================================================================
|
||||||
|
Loading Overlay
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#loading-overlay {
|
#loading-overlay {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -15,13 +18,16 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.4s ease;
|
transition: opacity 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading-overlay.show {
|
#loading-overlay.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Login Page Styling */
|
/* =========================================================================
|
||||||
|
Auth Page
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#loginPage {
|
#loginPage {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -33,7 +39,6 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Both login page and main content are hidden by default */
|
|
||||||
#loginPage.hidden {
|
#loginPage.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
@@ -50,25 +55,25 @@ nav.hidden {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide login page when OIDC is not enabled (additional safety) */
|
|
||||||
body[data-oidc-enabled="false"] #loginPage {
|
body[data-oidc-enabled="false"] #loginPage {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide login page when skipLoginPage is enabled (additional safety) */
|
|
||||||
body[data-skip-login-page="true"] #loginPage {
|
body[data-skip-login-page="true"] #loginPage {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure login page is visible when shown */
|
|
||||||
body:has(#loginPage:not(.hidden)) {
|
body:has(#loginPage:not(.hidden)) {
|
||||||
background-color: #f3f4f6;
|
background-color: #f3f4f6;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restart banner */
|
/* =========================================================================
|
||||||
|
Layout
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#restartBanner {
|
#restartBanner {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -77,7 +82,6 @@ body:has(#loginPage:not(.hidden)) {
|
|||||||
min-height: 480px;
|
min-height: 480px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom scrollbar */
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
@@ -96,7 +100,10 @@ body:has(#loginPage:not(.hidden)) {
|
|||||||
background: #555;
|
background: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom select2 styling to match Tailwind */
|
/* =========================================================================
|
||||||
|
Select2 Overrides
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
.select2-container--default .select2-selection--multiple {
|
.select2-container--default .select2-selection--multiple {
|
||||||
border: 1px solid #d1d5db;
|
border: 1px solid #d1d5db;
|
||||||
border-radius: 0.375rem;
|
border-radius: 0.375rem;
|
||||||
@@ -117,7 +124,10 @@ body:has(#loginPage:not(.hidden)) {
|
|||||||
margin-right: 0.25rem;
|
margin-right: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom modal styling */
|
/* =========================================================================
|
||||||
|
Modals
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
@@ -126,7 +136,10 @@ body.modal-open {
|
|||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom tooltip styling */
|
/* =========================================================================
|
||||||
|
Tooltips
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -154,14 +167,20 @@ body.modal-open {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom mark styling for search highlights */
|
/* =========================================================================
|
||||||
|
Search Highlights
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
background-color: #fef08a;
|
background-color: #fef08a;
|
||||||
padding: 0.1em 0em 0.1em 0.2em;
|
padding: 0.1em 0em 0.1em 0.2em;
|
||||||
border-radius: 0.25em;
|
border-radius: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Toast notifications */
|
/* =========================================================================
|
||||||
|
Toast Notifications
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#toast-container {
|
#toast-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 1.5rem;
|
top: 1.5rem;
|
||||||
@@ -232,7 +251,10 @@ mark {
|
|||||||
box-shadow: 0 15px 20px -3px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 15px 20px -3px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Backend Status Indicator */
|
/* =========================================================================
|
||||||
|
Status Indicator
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#backendStatus {
|
#backendStatus {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -315,7 +337,10 @@ mark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clock Display */
|
/* =========================================================================
|
||||||
|
Clock
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#clockDisplay {
|
#clockDisplay {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -338,28 +363,24 @@ mark {
|
|||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile responsive adjustments */
|
/* =========================================================================
|
||||||
/* Custom breakpoint at 830px for menu collapse */
|
Responsive Overrides
|
||||||
/* This overrides Tailwind's default md: breakpoint (768px) to collapse at 830px instead */
|
========================================================================= */
|
||||||
|
|
||||||
|
/* Override Tailwind md: (768px) to collapse menu at 830px */
|
||||||
@media (max-width: 830px) {
|
@media (max-width: 830px) {
|
||||||
/* Hide desktop menu navigation at 830px */
|
|
||||||
nav .hidden.md\:block {
|
nav .hidden.md\:block {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show burger menu button at 830px */
|
|
||||||
nav > div > div > div.md\:hidden:not(#mobileMenu) {
|
nav > div > div > div.md\:hidden:not(#mobileMenu) {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow mobile menu to be shown at 830px (override md:hidden) */
|
|
||||||
/* The menu visibility is controlled by JavaScript via the 'hidden' class */
|
|
||||||
/* When hidden class is NOT present, show the menu */
|
|
||||||
nav #mobileMenu:not(.hidden) {
|
nav #mobileMenu:not(.hidden) {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When mobile menu has 'hidden' class, hide it (JavaScript control takes precedence) */
|
|
||||||
nav #mobileMenu.hidden {
|
nav #mobileMenu.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
@@ -369,25 +390,33 @@ mark {
|
|||||||
#backendStatus {
|
#backendStatus {
|
||||||
padding: 0.125rem 0.375rem;
|
padding: 0.125rem 0.375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#statusText {
|
#statusText {
|
||||||
font-size: 0.625rem;
|
font-size: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clockDisplay {
|
#clockDisplay {
|
||||||
padding: 0.125rem 0.5rem;
|
padding: 0.125rem 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clockTime {
|
#clockTime {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* =========================================================================
|
||||||
|
Integration Fields
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#advancedMikrotikFields, #advancedPfSenseFields, #advancedOPNsenseFields {
|
#advancedMikrotikFields, #advancedPfSenseFields, #advancedOPNsenseFields {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure Font Awesome icons are visible */
|
/* =========================================================================
|
||||||
|
Font Awesome Fallback
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
|
/* Ensure icons render when FA is loaded async or partially */
|
||||||
.fas, .far, .fab, .fal, .fad {
|
.fas, .far, .fab, .fal, .fad {
|
||||||
font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro";
|
font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro";
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
@@ -402,7 +431,6 @@ mark {
|
|||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button icon spacing */
|
|
||||||
button .fas, button .far, button .fab {
|
button .fas, button .far, button .fab {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
@@ -414,13 +442,20 @@ button .fas:only-child, button .far:only-child, button .fab:only-child {
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WebSocket Tooltip Styling */
|
/* =========================================================================
|
||||||
|
WebSocket Tooltip
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
#wsTooltip {
|
#wsTooltip {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ignore IPs container - ensure proper wrapping and prevent horizontal overflow */
|
/* =========================================================================
|
||||||
|
Ignore IPs
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
|
/* Prevent horizontal overflow on long IP lists */
|
||||||
#ignoreIPsContainer {
|
#ignoreIPsContainer {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|||||||
Reference in New Issue
Block a user