Skip to content

Commit d16c09c

Browse files
committed
Enhanced announcement bar UI
1 parent 6a8ec1a commit d16c09c

File tree

4 files changed

+16193
-22
lines changed

4 files changed

+16193
-22
lines changed

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module.exports = {
9999
},
100100
announcementBar: {
101101
id: "announcementBar_1", // Increment on change
102-
content: `⭐️ If you like Keploy, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/keploy/keploy">GitHub</a> and follow us on <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/keployio">Twitter</a> ❤️ `,
102+
content: ` If you like Keploy, give it a star ⭐️ on <a target="_blank" rel="noopener noreferrer" href="https://github.com/keploy/keploy">GitHub</a> and follow us on <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/keployio">Twitter</a> ❤️ `,
103103
},
104104
prism: {
105105
theme: prismThemes.vsLight,

src/css/custom.css

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -572,21 +572,38 @@ td img {
572572
background-size: 24px 24px;
573573
}
574574

575-
div[class^="announcementBar_"] {
576-
--site-announcement-bar-stripe-color1: hsl(
577-
var(--site-primary-hue-saturation) 88%
578-
);
579-
--site-announcement-bar-stripe-color2: hsl(
580-
var(--site-primary-hue-saturation) 95%
581-
);
582-
background: repeating-linear-gradient(
583-
35deg,
584-
var(--site-announcement-bar-stripe-color1),
585-
var(--site-announcement-bar-stripe-color1) 20px,
586-
var(--site-announcement-bar-stripe-color2) 10px,
587-
var(--site-announcement-bar-stripe-color2) 40px
588-
);
589-
font-weight: bold;
575+
.theme-announcement-bar,
576+
.announcementBar_mb4j {
577+
background: linear-gradient(90deg, #ffcc33, #ff884d) !important;
578+
color: #000 !important;
579+
position: relative !important;
580+
font-weight: 600 !important;
581+
font-size: 1.1rem !important;
582+
text-align: center;
583+
padding: 1.5rem 0 !important;
584+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
585+
}
586+
587+
/* Optional: Dark theme gradient */
588+
html[data-theme='dark'] .theme-announcement-bar,
589+
html[data-theme='dark'] .announcementBar_mb4j {
590+
background: linear-gradient(90deg, #1e1e2f, #3a3a5c) !important;
591+
color: #fff !important;
592+
}
593+
594+
.announcementBarClose_gvF7 {
595+
position: absolute !important;
596+
right: 1rem !important;
597+
top: 50% !important;
598+
transform: translateY(-50%) !important;
599+
background: transparent !important;
600+
border: none !important;
601+
cursor: pointer;
602+
opacity: 0.8;
603+
}
604+
605+
.announcementBarClose_gvF7:hover {
606+
opacity: 1;
590607
}
591608

592609
.list-disc > a {

src/pages/styles.module.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,25 @@
141141
}
142142

143143
.announcement {
144-
font-weight: bold;
145-
font-size: 24px;
146-
padding: 48px;
144+
background: linear-gradient(90deg, #ffcc33, #ff884d);
145+
font-weight: 600;
146+
font-size: 1.1rem;
147+
color: #000;
148+
padding: 1.5rem 0;
147149
margin: 0 auto;
148150
text-align: center;
151+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
149152
}
150153

151154
.announcementDark {
152-
background-color: #20232a;
155+
background: linear-gradient(90deg, #1e1e2f, #3a3a5c);
153156
color: #fff;
154157
/* Reapply the primary color, because it has been locally overridden as
155158
* the dark theme color */
156-
--ifm-link-color: var(--ifm-color-primary);
159+
--ifm-link-color: #ffd966;
157160
}
158161

159162
.announcementInner {
160163
margin: 0 auto;
161-
max-width: 768px;
164+
max-width: 900px;
162165
}

0 commit comments

Comments
 (0)