@netfoundry/docusaurus-theme 0.8.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/css/layout.css +37 -0
  2. package/css/product-picker.css +36 -8
  3. package/css/theme.css +51 -20
  4. package/css/vars.css +1 -0
  5. package/dist/css/layout.css +37 -0
  6. package/dist/css/product-picker.css +36 -8
  7. package/dist/css/theme.css +51 -20
  8. package/dist/css/vars.css +1 -0
  9. package/dist/src/components/AssetsContext/AssetsContext.d.ts +14 -0
  10. package/dist/src/components/AssetsContext/AssetsContext.d.ts.map +1 -0
  11. package/dist/src/components/AssetsContext/AssetsContext.js +31 -0
  12. package/dist/src/components/AssetsContext/AssetsContext.js.map +1 -0
  13. package/dist/src/components/AssetsContext/index.d.ts +3 -0
  14. package/dist/src/components/AssetsContext/index.d.ts.map +1 -0
  15. package/dist/src/components/AssetsContext/index.js +2 -0
  16. package/dist/src/components/AssetsContext/index.js.map +1 -0
  17. package/dist/src/components/DownloadCard/DownloadCard.d.ts +20 -0
  18. package/dist/src/components/DownloadCard/DownloadCard.d.ts.map +1 -0
  19. package/dist/src/components/DownloadCard/DownloadCard.js +87 -0
  20. package/dist/src/components/DownloadCard/DownloadCard.js.map +1 -0
  21. package/dist/src/components/DownloadCard/DownloadCard.module.css +122 -0
  22. package/dist/src/components/DownloadCard/index.d.ts +3 -0
  23. package/dist/src/components/DownloadCard/index.d.ts.map +1 -0
  24. package/dist/src/components/DownloadCard/index.js +2 -0
  25. package/dist/src/components/DownloadCard/index.js.map +1 -0
  26. package/dist/src/components/DownloadCard/logos.d.ts +5 -0
  27. package/dist/src/components/DownloadCard/logos.d.ts.map +1 -0
  28. package/dist/src/components/DownloadCard/logos.js +10 -0
  29. package/dist/src/components/DownloadCard/logos.js.map +1 -0
  30. package/dist/src/components/NetFoundryFooter/NetFoundryFooter.d.ts.map +1 -1
  31. package/dist/src/components/NetFoundryFooter/NetFoundryFooter.js +3 -2
  32. package/dist/src/components/NetFoundryFooter/NetFoundryFooter.js.map +1 -1
  33. package/dist/src/components/NetFoundryFooter/styles.module.css +1 -1
  34. package/dist/src/components/icons/DiscourseIcon.d.ts +8 -0
  35. package/dist/src/components/icons/DiscourseIcon.d.ts.map +1 -0
  36. package/dist/src/components/icons/DiscourseIcon.js +5 -0
  37. package/dist/src/components/icons/DiscourseIcon.js.map +1 -0
  38. package/dist/src/components/icons/GitHubIcon.d.ts +8 -0
  39. package/dist/src/components/icons/GitHubIcon.d.ts.map +1 -0
  40. package/dist/src/components/icons/GitHubIcon.js +5 -0
  41. package/dist/src/components/icons/GitHubIcon.js.map +1 -0
  42. package/dist/src/components/icons/XIcon.d.ts +8 -0
  43. package/dist/src/components/icons/XIcon.d.ts.map +1 -0
  44. package/dist/src/components/icons/XIcon.js +5 -0
  45. package/dist/src/components/icons/XIcon.js.map +1 -0
  46. package/dist/src/components/icons/YouTubeIcon.d.ts +8 -0
  47. package/dist/src/components/icons/YouTubeIcon.d.ts.map +1 -0
  48. package/dist/src/components/icons/YouTubeIcon.js +5 -0
  49. package/dist/src/components/icons/YouTubeIcon.js.map +1 -0
  50. package/dist/src/components/icons/index.d.ts +5 -0
  51. package/dist/src/components/icons/index.d.ts.map +1 -0
  52. package/dist/src/components/icons/index.js +5 -0
  53. package/dist/src/components/icons/index.js.map +1 -0
  54. package/dist/src/components/index.d.ts +2 -0
  55. package/dist/src/components/index.d.ts.map +1 -1
  56. package/dist/src/components/index.js +2 -0
  57. package/dist/src/components/index.js.map +1 -1
  58. package/dist/src/index.d.ts.map +1 -1
  59. package/dist/src/index.js +5 -0
  60. package/dist/src/index.js.map +1 -1
  61. package/dist/theme/NavbarItem/ComponentTypes.d.ts +4 -0
  62. package/dist/theme/NavbarItem/ComponentTypes.d.ts.map +1 -1
  63. package/dist/theme/NavbarItem/ComponentTypes.js +4 -0
  64. package/dist/theme/NavbarItem/ComponentTypes.js.map +1 -1
  65. package/dist/theme/NavbarItem/NavbarPicker.d.ts +13 -0
  66. package/dist/theme/NavbarItem/NavbarPicker.d.ts.map +1 -0
  67. package/dist/theme/NavbarItem/NavbarPicker.js +59 -0
  68. package/dist/theme/NavbarItem/NavbarPicker.js.map +1 -0
  69. package/dist/theme/NavbarItem/types/IconLinks/index.d.ts +4 -0
  70. package/dist/theme/NavbarItem/types/IconLinks/index.d.ts.map +1 -0
  71. package/dist/theme/NavbarItem/types/IconLinks/index.js +22 -0
  72. package/dist/theme/NavbarItem/types/IconLinks/index.js.map +1 -0
  73. package/dist/theme/NavbarItem/types/ProductPicker/index.d.ts.map +1 -1
  74. package/dist/theme/NavbarItem/types/ProductPicker/index.js +3 -49
  75. package/dist/theme/NavbarItem/types/ProductPicker/index.js.map +1 -1
  76. package/dist/theme/NavbarItem/types/ResourcesPicker/index.d.ts +8 -0
  77. package/dist/theme/NavbarItem/types/ResourcesPicker/index.d.ts.map +1 -0
  78. package/dist/theme/NavbarItem/types/ResourcesPicker/index.js +30 -0
  79. package/dist/theme/NavbarItem/types/ResourcesPicker/index.js.map +1 -0
  80. package/package.json +2 -2
  81. package/theme/NavbarItem/ComponentTypes.tsx +4 -0
  82. package/theme/NavbarItem/NavbarPicker.tsx +94 -0
  83. package/theme/NavbarItem/types/IconLinks/index.tsx +35 -0
  84. package/theme/NavbarItem/types/ProductPicker/index.tsx +88 -154
  85. package/theme/NavbarItem/types/ResourcesPicker/index.tsx +88 -0
  86. package/css/.claude/settings.local.json +0 -12
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ import Link from '@docusaurus/Link';
3
+ import {useThemeConfig} from '@docusaurus/theme-common';
4
+ import NavbarPicker from '../../NavbarPicker';
5
+ import {DiscourseIcon, YouTubeIcon} from '../../../../src/components/icons';
6
+
7
+ const NF_LOGO_DEFAULT = 'https://raw.githubusercontent.com/netfoundry/branding/refs/heads/main/images/svg/icon/netfoundry-icon-color.svg';
8
+ const OPENZITI_LOGO_DEFAULT = 'https://netfoundry.io/docs/img/openziti-sm-logo.svg';
9
+
10
+ type LogoLink = {
11
+ label: string;
12
+ description: string;
13
+ href: string;
14
+ logoSrc: string;
15
+ badge?: React.ReactElement;
16
+ };
17
+
18
+ type IconLink = {
19
+ label: string;
20
+ description: string;
21
+ href: string;
22
+ icon: React.ReactElement;
23
+ };
24
+
25
+ type ResourceLink = LogoLink | IconLink;
26
+
27
+ function isLogoLink(link: ResourceLink): link is LogoLink {
28
+ return 'logoSrc' in link;
29
+ }
30
+
31
+ function ResourceLink({link}: {link: ResourceLink}) {
32
+ return (
33
+ <Link to={link.href} className="picker-link" target="_blank" rel="noopener noreferrer">
34
+ {isLogoLink(link) ? (
35
+ <span style={{position: 'relative', display: 'inline-flex', flexShrink: 0, marginRight: '0.8rem', width: 32, height: 32}}>
36
+ <img src={link.logoSrc} style={{width: 32, height: 32, objectFit: 'contain'}} alt="" />
37
+ {link.badge && (
38
+ <span style={{position: 'absolute', bottom: -2, right: -4, width: 14, height: 14, display: 'block'}}>
39
+ {link.badge}
40
+ </span>
41
+ )}
42
+ </span>
43
+ ) : (
44
+ <span className="picker-logo">{link.icon}</span>
45
+ )}
46
+ <div className="picker-text">
47
+ <strong>{link.label}</strong>
48
+ <span>{link.description}</span>
49
+ </div>
50
+ </Link>
51
+ );
52
+ }
53
+
54
+ type Props = {
55
+ label?: string;
56
+ position?: 'left' | 'right';
57
+ className?: string;
58
+ };
59
+
60
+ export default function ResourcesPicker({label = 'Resources', className}: Props) {
61
+ const themeConfig = useThemeConfig() as any;
62
+ const consoleLogo = themeConfig?.netfoundry?.consoleLogo ?? NF_LOGO_DEFAULT;
63
+ const openzitiLogo = themeConfig?.netfoundry?.openzitiLogo ?? OPENZITI_LOGO_DEFAULT;
64
+
65
+ const youtubeBadge = <YouTubeIcon width={14} height={14} />;
66
+
67
+ const learnLinks: ResourceLink[] = [
68
+ { label: 'NetFoundry Blog', description: 'Latest news, updates, and insights from NetFoundry.', href: 'https://netfoundry.io/blog/', logoSrc: consoleLogo },
69
+ { label: 'OpenZiti Tech Blog', description: 'Technical articles and community updates.', href: 'https://blog.openziti.io/', logoSrc: openzitiLogo },
70
+ ];
71
+
72
+ const communityLinks: ResourceLink[] = [
73
+ { label: 'NetFoundry YouTube', description: 'Video tutorials, demos, and technical deep dives.', href: 'https://www.youtube.com/c/NetFoundry', logoSrc: consoleLogo, badge: youtubeBadge },
74
+ { label: 'OpenZiti YouTube', description: 'OpenZiti community videos and project updates.', href: 'https://www.youtube.com/openziti', logoSrc: openzitiLogo, badge: youtubeBadge },
75
+ { label: 'OpenZiti Discourse', description: 'Ask questions and connect with the community.', href: 'https://openziti.discourse.group/', icon: <DiscourseIcon width={32} height={32} /> },
76
+ ];
77
+
78
+ return (
79
+ <NavbarPicker label={label} className={className} panelClassName="nf-picker-panel--narrow" autoPosition>
80
+ <div className="picker-column">
81
+ <span className="picker-header picker-header--nf-primary" style={{color: 'var(--ifm-color-primary)'}}>Learn &amp; Engage</span>
82
+ {learnLinks.map((link, i) => <ResourceLink key={i} link={link} />)}
83
+ <span className="picker-header picker-header--nf-secondary" style={{marginTop: '0.75rem'}}>Community &amp; Support</span>
84
+ {communityLinks.map((link, i) => <ResourceLink key={i} link={link} />)}
85
+ </div>
86
+ </NavbarPicker>
87
+ );
88
+ }
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "WebFetch(domain:netfoundry.io)",
5
- "WebSearch",
6
- "WebFetch(domain:github.com)",
7
- "WebFetch(domain:colineberhardt.github.io)",
8
- "WebFetch(domain:cla-assistant.io)",
9
- "WebFetch(domain:raw.githubusercontent.com)"
10
- ]
11
- }
12
- }