Skip to content

Commit 1a637c1

Browse files
committed
feat: 💄 update premium badges and sidebar chevrons
1 parent 9587785 commit 1a637c1

File tree

20 files changed

+489
-78
lines changed

20 files changed

+489
-78
lines changed

crowdsec-docs/sidebarsUnversioned.ts

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,16 @@ const sidebarsUnversionedConfig: SidebarConfig = {
120120
},
121121
{
122122
type: "doc",
123-
label: "Troubleshooting Hints 🏅",
123+
label: "Troubleshooting Hints",
124124
id: "console/security_engines/troubleshooting",
125125
},
126126
{
127127
type: "doc",
128-
label: "Am I Under Attack 🏅",
128+
label: "Am I Under Attack",
129129
id: "console/security_engines/am_i_under_attack",
130+
customProps: {
131+
tag: "premium",
132+
},
130133
},
131134
{
132135
type: "doc",
@@ -175,8 +178,11 @@ const sidebarsUnversionedConfig: SidebarConfig = {
175178
},
176179
{
177180
type: "doc",
178-
label: "Background Noise 🏅",
181+
label: "Background Noise",
179182
id: "console/alerts/background_noise",
183+
customProps: {
184+
tag: "premium",
185+
},
180186
},
181187
{
182188
type: "doc",
@@ -232,62 +238,84 @@ const sidebarsUnversionedConfig: SidebarConfig = {
232238
{
233239
type: "doc",
234240
id: "console/decisions/decisions_management",
235-
label: "Decisions Management 🏅",
241+
label: "Management",
242+
customProps: {
243+
tag: "premium",
244+
},
236245
},
237246
],
238247
},
239248
{
240-
type: "category",
241-
label: "Centralized Allowlists 🏅",
242-
link: {
243-
type: "doc",
244-
id: "console/allowlists",
249+
id: "console/allowlists",
250+
type: "doc",
251+
label: "Centralized Allowlists",
252+
customProps: {
253+
tag: "premium",
245254
},
246-
items: [],
247255
},
248256
{
249257
type: "category",
250-
label: "Enterprise plan 🏅",
258+
label: "Enterprise plan",
259+
customProps: {
260+
tag: "premium",
261+
},
251262
items: [
252263
{
253264
type: "doc",
254-
label: "Enterprise support 🏅",
265+
label: "Enterprise support",
255266
id: "console/enterprise_plan/enterprise_support",
267+
customProps: {
268+
tag: "premium",
269+
},
256270
},
257271
{
258272
type: "doc",
259-
label: "Invoices 🏅",
273+
label: "Invoices",
260274
id: "console/enterprise_plan/enterprise_invoices",
275+
customProps: {
276+
tag: "premium",
277+
},
261278
},
262279
],
263280
},
264281
{
265-
type: "category",
266-
label: "Threat Forecast 🏅",
267-
link: {
268-
type: "doc",
269-
id: "console/threat_forecast",
282+
id: "console/threat_forecast",
283+
type: "doc",
284+
label: "Threat Forecast",
285+
customProps: {
286+
tag: "premium",
270287
},
271-
items: [],
272288
},
273289
{
274290
type: "link",
275-
label: "Service API 🏅",
291+
label: "Service API",
276292
href: "/u/service_api/getting_started",
293+
customProps: {
294+
tag: "premium",
295+
},
277296
},
278297
{
279298
type: "category",
280-
label: "Notification integrations 🏅",
299+
label: "Notification integrations",
300+
customProps: {
301+
tag: "premium",
302+
},
281303
items: [
282304
{
283305
type: "doc",
284306
label: "Overview",
285307
id: "console/notification_integrations/overview",
308+
customProps: {
309+
tag: "premium",
310+
},
286311
},
287312
{
288313
type: "doc",
289314
label: "Notification Rule",
290315
id: "console/notification_integrations/rule",
316+
customProps: {
317+
tag: "premium",
318+
},
291319
},
292320
{
293321
type: "doc",

crowdsec-docs/src/components/remediation-support-badge.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ const RemediationSupportBadge = ({ title, description, support }: { title: strin
1414
//ugly, for test
1515
const colorClass = support === "Unsupported" ? "bg-red-400" : "bg-green-400";
1616
return (
17-
<TooltipProvider>
18-
<Tooltip>
19-
<TooltipTrigger asChild>
20-
<div className="border rounded-full flex text-black">
21-
<span className="bg-slate-400 px-2 rounded-l-lg">{title}</span>
22-
<span className={clsx("rounded-r-lg px-2", colorClass)}>{support}</span>
23-
</div>
24-
</TooltipTrigger>
25-
<TooltipContent>
26-
<p>{description}</p>
27-
<ToolTipArrow className="dark:fill-white" />
28-
</TooltipContent>
29-
</Tooltip>
30-
</TooltipProvider>
17+
<Tooltip>
18+
<TooltipTrigger asChild>
19+
<div className="border rounded-full flex text-black">
20+
<span className="bg-slate-400 px-2 rounded-l-lg">{title}</span>
21+
<span className={clsx("rounded-r-lg px-2", colorClass)}>{support}</span>
22+
</div>
23+
</TooltipTrigger>
24+
<TooltipContent>
25+
<p>{description}</p>
26+
<ToolTipArrow className="dark:fill-white" />
27+
</TooltipContent>
28+
</Tooltip>
3129
);
3230
};
3331

crowdsec-docs/src/css/colors.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,16 @@ html[data-theme="dark"],
184184
/* Algolia global search colors */
185185
--docsearch-searchbox-background: rgb(var(--input));
186186
}
187+
188+
.platinum-tag-gradient {
189+
background: rgba(213 176 80 / 100%);
190+
/* biome-ignore lint/suspicious/noDuplicateProperties: This is intentional */
191+
background: linear-gradient(
192+
90deg,
193+
rgba(213 176 80 / 100%) 0%,
194+
rgba(203 161 53 / 100%) 25%,
195+
rgba(255 222 138 / 100%) 50%,
196+
rgba(203 161 53 / 100%) 75%,
197+
rgba(213 176 80 / 100%) 100%
198+
);
199+
}

0 commit comments

Comments
 (0)