Skip to content

Commit 83b7ea5

Browse files
committed
fix ♻️ PR feedbacks
1 parent 3530fcd commit 83b7ea5

File tree

6 files changed

+45
-34
lines changed

6 files changed

+45
-34
lines changed

crowdsec-docs/docusaurus.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,22 @@ const NAVBAR_ITEMS: NavbarItem[] = [
9999
{
100100
href: "https://github.com/crowdsecurity/crowdsec",
101101
position: "right",
102-
className: "header-github-link header-icon-link",
102+
className: "header-github-link header-icon-link invert dark:invert-0",
103103
},
104104
{
105105
href: "https://discord.gg/wGN7ShmEE8",
106106
position: "right",
107-
className: "header-discord-link",
107+
className: "header-discord-link invert dark:invert-0",
108108
},
109109
{
110110
href: "https://discourse.crowdsec.net",
111111
position: "right",
112-
className: "header-discourse-link",
112+
className: "header-discourse-link invert dark:invert-0",
113113
},
114114
{
115115
href: "https://hub.crowdsec.net/",
116116
position: "right",
117-
className: "header-hub-link",
117+
className: "header-hub-link dark:invert",
118118
},
119119
];
120120

@@ -187,10 +187,15 @@ const config: Config = {
187187
],
188188
themeConfig: {
189189
image: "img/crowdsec_og_image.png",
190+
colorMode: {
191+
defaultMode: "dark",
192+
disableSwitch: false,
193+
respectPrefersColorScheme: true,
194+
},
190195
announcementBar: {
191196
id: "banner_docs",
192197
content:
193-
'<a target="_blank" href="https://doc.crowdsec.net/docs/next/appsec/intro">Learn how to guard your webserver in real-time with the CrowdSec WAF</a>',
198+
'<a target="_blank" href="https://doc.crowdsec.net/docs/next/appsec/intro" rel="noopener">Learn how to guard your webserver in real-time with the CrowdSec WAF</a>',
194199
backgroundColor: "#F8AB13",
195200
textColor: "#131132",
196201
isCloseable: true,

crowdsec-docs/src/components/UnderlineTooltip.js

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { HybridTooltip, HybridTooltipContent, HybridTooltipTrigger, TouchProvider } from "@site/src/ui/hybridtooltip";
2+
import React from "react";
3+
4+
export default function UnderlineTooltip({ children, tooltip }): React.JSX.Element {
5+
return (
6+
<TouchProvider>
7+
<HybridTooltip delayDuration={300}>
8+
<HybridTooltipTrigger asChild>
9+
<span className="tw-underline tw-decoration-dashed tw-decoration-1 tw-decoration-gray-700 tw-cursor-help hover:tw-decoration-gray-900 dark:tw-decoration-gray-300 dark:hover:tw-decoration-gray-100 tw-underline-offset-2">
10+
{children}
11+
</span>
12+
</HybridTooltipTrigger>
13+
<HybridTooltipContent>
14+
<p>{tooltip}</p>
15+
</HybridTooltipContent>
16+
</HybridTooltip>
17+
</TouchProvider>
18+
);
19+
}

0 commit comments

Comments
 (0)