Skip to content

Commit c0afafd

Browse files
committed
refactor: JDE feedbacks on labels and content
1 parent 8fe9ae2 commit c0afafd

13 files changed

Lines changed: 80 additions & 95 deletions

File tree

crowdsec-docs/plugins/gtag/theme/cookieconsent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function CookieConsent() {
88
if (dismissed) return null;
99

1010
return (
11-
<div className="fixed bottom-6 right-6 w-80 rounded-[14px] bg-cs-surface border border-cs-border-hi z-[9999] flex flex-col gap-3.5 p-5 pb-4"
11+
<div className="fixed bottom-6 left-6 w-80 rounded-[14px] bg-cs-surface border border-cs-border-hi z-[9999] flex flex-col gap-3.5 p-5 pb-4"
1212
style={{ boxShadow: "0 16px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(148,163,184,0.06)" }}
1313
>
1414
{/* Eyebrow */}

crowdsec-docs/sidebarsUnversioned.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
1414
// ── EXPLORE ──────────────────────────────────────────────────────────
1515
{
1616
type: "html",
17-
value: "<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Explore</span>",
17+
value:
18+
"<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Explore</span>",
1819
defaultStyle: false,
1920
},
2021
{
@@ -36,7 +37,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
3637
// ── API ──────────────────────────────────────────────────────────────
3738
{
3839
type: "html",
39-
value: "<hr style='margin: 0.75rem 0; opacity: 0.35;' /> <span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>API</span>",
40+
value:
41+
"<hr style='margin: 0.75rem 0; opacity: 0.35;' /> <span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>API</span>",
4042
defaultStyle: false,
4143
},
4244
{
@@ -73,7 +75,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
7375
// ── TECHNICAL DOC ─────────────────────────────────────────────────────
7476
{
7577
type: "html",
76-
value: "<hr style='margin: 0.75rem 0; opacity: 0.35;' /> <span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Technical Doc</span>",
78+
value:
79+
"<hr style='margin: 0.75rem 0; opacity: 0.35;' /> <span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Technical Doc</span>",
7780
defaultStyle: false,
7881
},
7982
{
@@ -229,7 +232,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
229232
// ── Security Stack ──────────────────────────────────────────────────────────
230233
{
231234
type: "html",
232-
value: "<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Security Stack</span>",
235+
value:
236+
"<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Security Stack</span>",
233237
defaultStyle: false,
234238
},
235239
{
@@ -382,7 +386,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
382386
// ── Blocklist & Allowlists ──────────────────────────────────────────────────────────
383387
{
384388
type: "html",
385-
value: "<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Blocklist & Allowlists</span>",
389+
value:
390+
"<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>Blocklist & Allowlists</span>",
386391
defaultStyle: false,
387392
},
388393
{
@@ -417,7 +422,8 @@ const sidebarsUnversionedConfig: SidebarConfig = {
417422
// ── IP Reputation / CTI ──────────────────────────────────────────────────────────
418423
{
419424
type: "html",
420-
value: "<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>IP Reputation / CTI</span>",
425+
value:
426+
"<span style='display:block; padding: 10px 8px 4px; font-family: var(--ifm-font-family-monospace); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ifm-color-emphasis-600);'>IP Reputation / CTI</span>",
421427
defaultStyle: false,
422428
},
423429
{
@@ -451,11 +457,6 @@ const sidebarsUnversionedConfig: SidebarConfig = {
451457
tag: "otherSection",
452458
},
453459
},
454-
{
455-
type: "doc",
456-
label: "IP Reputation Report",
457-
id: "console/ip_reputation/ip_report",
458-
},
459460
],
460461
},
461462
{
@@ -897,7 +898,10 @@ const sidebarsUnversionedConfig: SidebarConfig = {
897898
type: "doc",
898899
id: "getting_started/post_installation/console",
899900
},
900-
items: ["getting_started/post_installation/console_blocklists", "getting_started/post_installation/console_hub"],
901+
items: [
902+
"getting_started/post_installation/console_blocklists",
903+
"getting_started/post_installation/console_hub",
904+
],
901905
className: "sideBarItemRecommended", // to display tag
902906
},
903907
{

crowdsec-docs/src/components/docs/AccessCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function AccessCard({ icon, title, command, ctaLabel, ctaHref }:
4242
)}
4343
<a
4444
href={ctaHref}
45-
className="inline-flex items-center gap-1.5 py-2 px-[18px] rounded-[7px] bg-cs-orange text-[#0a1120] text-[13px] font-semibold no-underline transition-opacity duration-150 self-start hover:opacity-[0.85] hover:no-underline hover:text-[#0a1120]"
45+
className="cs-btn inline-flex items-center gap-1.5 py-2 px-[18px] rounded-[7px] bg-cs-orange text-cs-btn-text text-[13px] font-semibold no-underline self-start hover:no-underline hover:text-cs-btn-text"
4646
>
4747
{ctaLabel}
4848
</a>

crowdsec-docs/src/components/docs/DocCard/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function DocCard({
6363

6464
const card = (
6565
<div
66-
className={`p-5 rounded-xl bg-cs-surface border border-cs-border flex flex-col gap-3 h-full${href ? " transition-[border-color,box-shadow] duration-150" : ""}`}
66+
className={`p-5 rounded-xl ease-in-out bg-cs-surface border border-cs-border no-underline hover:no-underline flex flex-col gap-3 h-full${href ? " transition-[border-color,box-shadow] duration-150" : ""}`}
6767
>
6868
<div className="flex items-start gap-3">
6969
{resolvedIcon && (
@@ -119,7 +119,7 @@ export default function DocCard({
119119
<a
120120
key={l.href}
121121
href={l.href}
122-
className="text-[12.5px] font-semibold no-underline inline-flex items-center gap-1"
122+
className="text-[12.5px] font-semibold no-underline hover:no-underline inline-flex items-center gap-1"
123123
style={{ color }}
124124
>
125125
{l.label}
@@ -131,7 +131,7 @@ export default function DocCard({
131131

132132
{/* CTA — explicit label, or auto arrow footer for href-only clickable cards */}
133133
{href && (ctaLabel || (!links?.length && !command)) && (
134-
<div className="mt-auto pt-3 border-t border-dashed border-cs-border flex items-center justify-between">
134+
<div className="mt-auto pt-3 border-t border-cs-border flex items-center justify-between">
135135
<span className="text-[12.5px] font-semibold inline-flex items-center gap-[5px]" style={{ color }}>
136136
{ctaLabel ?? title} <ArrowRight />
137137
</span>
@@ -142,7 +142,7 @@ export default function DocCard({
142142

143143
if (href && !ctaLabel && !links) {
144144
return (
145-
<a href={href} className="no-underline block">
145+
<a href={href} className="no-underline hover:no-underline block">
146146
{card}
147147
</a>
148148
);

crowdsec-docs/src/components/docs/GuidedSetupCard/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ export default function GuidedSetupCard({ title, desc, primaryCta, secondaryCta
3434
<div className="flex gap-[10px] flex-wrap shrink-0">
3535
<a
3636
href={primaryCta.href}
37-
className="py-[10px] px-4 rounded-[9px] bg-cs-violet text-cs-btn-text font-semibold text-[13.5px] no-underline inline-flex items-center gap-2 shadow-[0_8px_24px_color-mix(in_srgb,var(--cs-violet)_30%,transparent)]"
37+
className="cs-btn py-[10px] px-4 rounded-[9px] bg-cs-violet text-cs-btn-text font-semibold text-[13.5px] no-underline hover:no-underline hover:text-cs-btn-text inline-flex items-center gap-2 shadow-[0_8px_24px_color-mix(in_srgb,var(--cs-violet)_30%,transparent)]"
3838
>
3939
<CIcon icon={cilCompass} style={{ width: 14, height: 14 }} />
4040
{primaryCta.label}
4141
</a>
4242
{secondaryCta && (
4343
<a
4444
href={secondaryCta.href}
45-
className="py-[10px] px-4 rounded-[9px] bg-cs-surface-2 text-cs-ink font-semibold text-[13.5px] border border-cs-border-hi no-underline inline-flex items-center gap-2"
45+
className="cs-btn py-[10px] px-4 rounded-[9px] bg-cs-surface-2 text-cs-ink font-semibold text-[13.5px] border border-cs-border-hi no-underline hover:no-underline hover:text-cs-ink inline-flex items-center gap-2"
4646
>
4747
<CIcon icon={cilBolt} style={{ width: 14, height: 14 }} />
4848
{secondaryCta.label}

crowdsec-docs/src/components/docs/PathCard/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@ export default function PathCard({ eyebrow, color, icon, title, desc, tag, tags
9595
)}
9696

9797
{audience && (
98-
<div className="font-cs-mono text-[10.5px] text-cs-ink-mute tracking-[0.06em] leading-[1.4] min-w-0 overflow-hidden mt-4">
99-
{audience}
100-
</div>
101-
)}
98+
<div className="font-cs-mono text-[10.5px] text-cs-ink-mute tracking-[0.06em] leading-[1.4] min-w-0 overflow-hidden mt-4">
99+
{audience}
100+
</div>
101+
)}
102102

103103
<div className="mt-3 pt-4 border-t border-cs-border flex items-center justify-between">
104-
105104
<div
106105
className="inline-flex items-center gap-1.5 font-semibold text-[13px] ml-auto whitespace-nowrap shrink-0 transition-[gap] duration-[160ms]"
107106
style={{ color }}

crowdsec-docs/src/components/docs/PathwayRow/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default function PathwayRow({ color, title, eyebrow, sub, steps, ctaLabel
9898
<a
9999
href={ctaHref}
100100
onClick={(e) => e.stopPropagation()}
101-
className="py-2 px-[14px] rounded-lg font-semibold text-[13px] inline-flex items-center gap-1.5 no-underline shrink-0 whitespace-nowrap"
101+
className="cs-btn py-2 px-[14px] rounded-lg font-semibold text-[13px] inline-flex items-center gap-1.5 no-underline hover:no-underline shrink-0 whitespace-nowrap"
102102
style={{
103103
background: color,
104104
color: "var(--cs-btn-text)",
@@ -169,7 +169,7 @@ export default function PathwayRow({ color, title, eyebrow, sub, steps, ctaLabel
169169
{/* CTA in content when OPEN */}
170170
<a
171171
href={ctaHref}
172-
className="inline-flex items-center gap-1.5 py-2 px-[18px] rounded-[7px] text-[13px] font-semibold no-underline whitespace-nowrap"
172+
className="cs-btn inline-flex items-center gap-1.5 py-2 px-[18px] rounded-[7px] text-[13px] font-semibold no-underline hover:no-underline whitespace-nowrap"
173173
style={{
174174
background: color,
175175
color: "var(--cs-btn-text)",

crowdsec-docs/src/components/docs/PromoCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default function PromoCard({ variant = "console" }: Props) {
126126
</div>
127127
<a
128128
href={data.ctaHref}
129-
className="inline-flex items-center justify-center w-full py-[10px] px-[14px] rounded-lg text-[13px] font-bold no-underline transition-opacity duration-150 mt-1 tracking-[0.01em] hover:opacity-[0.88] hover:no-underline"
129+
className="cs-btn inline-flex items-center justify-center w-full py-[10px] px-[14px] rounded-lg text-[13px] font-bold no-underline mt-1 tracking-[0.01em] hover:no-underline"
130130
style={{ background: data.color, color: "var(--cs-btn-text)" }}
131131
>
132132
{data.ctaLabel} <CIcon icon={cilArrowRight} style={{ width: 13, height: 13 }} aria-hidden="true" />

crowdsec-docs/src/components/home-page/quick-start.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import cibWindows from "@site/static/img/logo/windows-colored.svg";
1010
import opnsenseLogo from "@site/static/img/logo-opnsense.svg";
1111
import pfSenseLogo from "@site/static/img/logo-pfsense.svg";
1212
import whmLogo from "@site/static/img/logo-whm.svg";
13-
import React from "react";
13+
import type React from "react";
1414
import { HomePageItem } from "./home-item";
1515

1616
type StaticData = {
17-
icon: React.ComponentType<React.SVGProps<SVGSVGElement>>;
17+
icon: React.ElementType | React.ReactNode;
1818
text: string;
1919
link: string;
2020
description?: string;

crowdsec-docs/src/components/product-page/product-page-layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ export const ProductPageLayout = ({
7676
<a
7777
key={btn.label}
7878
href={btn.link}
79-
className="py-[9px] px-5 rounded-lg border border-cs-border-hi bg-transparent text-cs-ink-dim text-sm font-semibold no-underline transition-[border-color,color] duration-150 hover:border-cs-orange hover:text-cs-orange"
79+
className="cs-btn py-[9px] px-5 rounded-lg border border-cs-border-hi bg-transparent text-cs-ink-dim text-sm font-semibold no-underline transition-[border-color,color] duration-150 hover:border-cs-orange hover:text-cs-orange"
8080
>
8181
{btn.label}
8282
</a>
8383
) : (
8484
<a
8585
key={btn.label}
8686
href={btn.link}
87-
className="py-[9px] px-5 rounded-lg bg-cs-orange text-cs-btn-text text-sm font-semibold no-underline transition-opacity duration-150 hover:opacity-[0.88] shadow-[0_4px_16px_color-mix(in_srgb,var(--cs-orange)_28%,transparent)]"
87+
className="cs-btn py-[9px] px-5 rounded-lg bg-cs-orange text-cs-btn-text text-sm font-semibold no-underline hover:no-underline hover:text-cs-btn-text shadow-[0_4px_16px_color-mix(in_srgb,var(--cs-orange)_28%,transparent)]"
8888
>
8989
{btn.label}
9090
</a>

0 commit comments

Comments
 (0)