Skip to content

Commit 84c06c6

Browse files
committed
feat: add dark mode toggle
1 parent 7dccdde commit 84c06c6

File tree

2 files changed

+147
-1
lines changed

2 files changed

+147
-1
lines changed

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ Foundation.
276276
},
277277
colorMode: {
278278
defaultMode: 'light',
279-
disableSwitch: true,
279+
disableSwitch: false, // Changed from true to false
280+
respectPrefersColorScheme: true,
280281
},
281282
}),
282283

src/css/custom.css

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,3 +3849,148 @@ textarea.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-wid
38493849
.d-print-none{display:none!important}
38503850
}
38513851
/*# sourceMappingURL=bootstrap.min.css.map */
3852+
/* ==========================================
3853+
DARK THEME SYSTEM OVERRIDES
3854+
========================================== */
3855+
3856+
[data-theme='dark'] {
3857+
/* Brand Adjustments */
3858+
--ifm-color-primary: #42a8d6; /* Slightly brighter for dark bg */
3859+
--ifm-background-color: #0d1117;
3860+
--ifm-secondary-bg: #161b22;
3861+
--ifm-footer-background-color: #0d1117;
3862+
--ifm-navbar-background-color: #161b22;
3863+
3864+
/* Bootstrap-style Variable Overrides */
3865+
--bs-body-bg: #0d1117;
3866+
--bs-body-color: #e6edf3;
3867+
}
3868+
3869+
/* Navbar specific */
3870+
[data-theme='dark'] .navbar {
3871+
background-color: var(--ifm-navbar-background-color);
3872+
border-bottom: 1px solid #30363d;
3873+
}
3874+
3875+
/* Sections with Light Blue backgrounds */
3876+
[data-theme='dark'] .light-blue {
3877+
background-color: #161b22;
3878+
border: 1px solid #30363d;
3879+
}
3880+
3881+
/* Cards (Power Cards, Join Cards, Integration Boxes) */
3882+
[data-theme='dark'] .power-card,
3883+
[data-theme='dark'] .join-card,
3884+
[data-theme='dark'] .card-users,
3885+
[data-theme='dark'] .horizontal-card {
3886+
background-color: #1c2128 !important;
3887+
border-color: #30363d;
3888+
color: #c9d1d9;
3889+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
3890+
}
3891+
3892+
[data-theme='dark'] .card-title,
3893+
[data-theme='dark'] .join-title {
3894+
color: #fff;
3895+
}
3896+
3897+
[data-theme='dark'] .card-text,
3898+
[data-theme='dark'] .text {
3899+
color: #8b949e;
3900+
}
3901+
3902+
/* Fix for dark blue sections (Solves) */
3903+
[data-theme='dark'] .dark-blue {
3904+
background-color: #081a25; /* Slightly deeper than light mode */
3905+
border: 1px solid #10435B;
3906+
}
3907+
3908+
/* Tabbed Content Overrides */
3909+
[data-theme='dark'] .tab-content {
3910+
background: #1c2128;
3911+
color: #fff;
3912+
border: 1px solid #30363d;
3913+
}
3914+
3915+
[data-theme='dark'] .nav-underline .nav-link {
3916+
color: #8b949e;
3917+
}
3918+
3919+
[data-theme='dark'] .nav-underline .nav-link.active {
3920+
color: var(--ifm-color-primary);
3921+
}
3922+
3923+
/* Footer Fixes */
3924+
[data-theme='dark'] .footer-bottom {
3925+
border-top: 1px solid #30363d;
3926+
}
3927+
3928+
/* Search Box */
3929+
[data-theme='dark'] .top-search {
3930+
background: #0d1117;
3931+
color: #fff;
3932+
border: 1px solid #30363d;
3933+
}
3934+
3935+
[data-theme='dark'] {
3936+
/* The Integration Card/Box */
3937+
.tab-box {
3938+
background-color: #1c2128 !important; /* GitHub-style Dark Gray */
3939+
border-color: #30363d !important;
3940+
transition: background-color 0.2s ease, border-color 0.2s ease;
3941+
}
3942+
.header-cloud, .header-integrations, .header-kubernetes, .integrations {
3943+
color: black;
3944+
}
3945+
3946+
.tab-box:hover {
3947+
background-color: #21262d !important;
3948+
border-color: #42a8d6 !important; /* CloudStack Blue */
3949+
}
3950+
3951+
/* Integration Title & Descriptions */
3952+
.integration-title {
3953+
color: #f0f6fc !important;
3954+
}
3955+
3956+
.tab-box p {
3957+
color: #8b949e !important;
3958+
}
3959+
3960+
/* Integration Logos */
3961+
/* If some logos have white backgrounds built into the PNG/SVG,
3962+
we give them a slight rounded background so they don't look "cut out" */
3963+
.tab-box img {
3964+
background-color: rgba(255, 255, 255, 0.05);
3965+
padding: 8px;
3966+
border-radius: 8px;
3967+
}
3968+
3969+
/* Category Filter Buttons (if applicable) */
3970+
.button-group .button {
3971+
background-color: #21262d;
3972+
color: #c9d1d9;
3973+
border: 1px solid #30363d;
3974+
}
3975+
3976+
.button-group .button--active {
3977+
background-color: #42a8d6;
3978+
color: #ffffff;
3979+
border-color: #42a8d6;
3980+
}
3981+
}
3982+
3983+
[data-theme='dark'] {
3984+
/* This ensures that any "gap" created by flexbox is the same color as the content */
3985+
.__docusaurus,
3986+
.main-wrapper,
3987+
body {
3988+
background-color: #0d1117 !important;
3989+
}
3990+
3991+
/* Target the specific About page container to ensure it doesn't have a bottom margin
3992+
causing a double-gap effect */
3993+
.main-wrapper > div {
3994+
background-color: transparent !important;
3995+
}
3996+
}

0 commit comments

Comments
 (0)