feat: Implement light/dark theme toggle and enhance UI components
- Added theme.js for managing light/dark mode with user preference persistence. - Updated lab.php to include theme toggle button and adjust styles for light mode. - Enhanced CSS styles in style.css for light theme support, including background and text colors. - Introduced DNS record lookup functionality in tools.php with user input for domain queries. - Improved UI for DNS lookup and outbound connectivity tests in tools.php. - Added historical benchmark trend chart in lab.php to visualize previous benchmark scores. - Refactored various UI elements for better spacing and alignment across components.
This commit is contained in:
@@ -38,6 +38,54 @@
|
||||
--radius-xl: 22px;
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--bg-base: #f8fafc;
|
||||
--bg-surface: rgba(255, 255, 255, 0.9);
|
||||
--bg-surface-elevated: rgba(241, 245, 249, 0.95);
|
||||
--bg-subtle: rgba(0, 0, 0, 0.03);
|
||||
|
||||
--border-subtle: rgba(0, 0, 0, 0.08);
|
||||
--border-hover: rgba(0, 0, 0, 0.16);
|
||||
--border-accent: rgba(14, 165, 233, 0.5);
|
||||
|
||||
--text-main: #0f172a;
|
||||
--text-muted: #475569;
|
||||
--text-subtle: #64748b;
|
||||
}
|
||||
|
||||
[data-theme="light"] body {
|
||||
background-image:
|
||||
radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.08) 0px, transparent 45%),
|
||||
radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 45%),
|
||||
radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.04) 0px, transparent 60%);
|
||||
}
|
||||
|
||||
[data-theme="light"] .navbar {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-title {
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-menu {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
[data-theme="light"] .card {
|
||||
box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
[data-theme="light"] .card-title {
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
[data-theme="light"] .metric-box {
|
||||
background: rgba(241, 245, 249, 0.85);
|
||||
border-color: rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@@ -451,6 +499,102 @@ body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Commit Timeline & DNS Badges
|
||||
========================================================================== */
|
||||
.commit-timeline {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.commit-item {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 12px 14px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
[data-theme="light"] .commit-item {
|
||||
background: rgba(241, 245, 249, 0.7);
|
||||
}
|
||||
|
||||
.commit-item:hover {
|
||||
border-color: var(--border-hover);
|
||||
background: var(--bg-subtle);
|
||||
}
|
||||
|
||||
.commit-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 6px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.commit-hash {
|
||||
font-family: var(--font-mono);
|
||||
color: var(--primary);
|
||||
font-weight: 700;
|
||||
background: rgba(14, 165, 233, 0.1);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.commit-date {
|
||||
color: var(--text-subtle);
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.commit-msg {
|
||||
font-size: 0.86rem;
|
||||
color: var(--text-main);
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.commit-author {
|
||||
font-size: 0.76rem;
|
||||
color: var(--text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* DNS Record Pill */
|
||||
.dns-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 6px;
|
||||
padding: 4px 10px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.78rem;
|
||||
color: var(--text-main);
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
[data-theme="light"] .dns-pill {
|
||||
background: rgba(241, 245, 249, 0.85);
|
||||
}
|
||||
|
||||
/* Historical Chart Canvas */
|
||||
.chart-wrap {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-subtle);
|
||||
margin: 14px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-theme="light"] .chart-wrap {
|
||||
background: rgba(241, 245, 249, 0.85);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Footer
|
||||
========================================================================== */
|
||||
@@ -472,3 +616,4 @@ body {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user