@coffic/cosy-ui 0.1.29 → 0.2.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 (97) hide show
  1. package/README.md +67 -23
  2. package/dist/app.css +1 -0
  3. package/dist/assets/logo-rounded.png +0 -0
  4. package/dist/assets/logo.png +0 -0
  5. package/dist/components/base/Alert.astro +186 -0
  6. package/dist/components/base/Button.astro +103 -0
  7. package/dist/components/base/Image.astro +291 -0
  8. package/dist/components/base/Link.astro +131 -0
  9. package/dist/components/base/README.md +53 -0
  10. package/dist/components/base/index.ts +6 -0
  11. package/dist/components/containers/Container.astro +103 -0
  12. package/dist/components/containers/Main.astro +167 -0
  13. package/dist/components/containers/Section.astro +145 -0
  14. package/dist/components/containers/index.ts +3 -0
  15. package/dist/components/data-display/Blog.astro +195 -0
  16. package/dist/components/data-display/README.md +37 -0
  17. package/dist/components/data-display/TeamMember.astro +135 -0
  18. package/dist/components/data-display/TeamMembers.astro +101 -0
  19. package/dist/components/data-display/index.ts +3 -0
  20. package/dist/components/display/Banner.astro +57 -0
  21. package/dist/components/display/Card.astro +135 -0
  22. package/dist/components/display/CodeBlock.astro +147 -0
  23. package/dist/components/display/CodeExample.astro +330 -0
  24. package/dist/components/display/Hero.astro +119 -0
  25. package/dist/components/display/Modal.astro +115 -0
  26. package/dist/components/display/README.md +32 -0
  27. package/dist/components/display/index.ts +6 -0
  28. package/dist/components/icons/AlertTriangle.astro +35 -0
  29. package/dist/components/icons/CalendarIcon.astro +38 -0
  30. package/dist/components/icons/CheckCircle.astro +36 -0
  31. package/dist/components/icons/CheckIcon.astro +38 -0
  32. package/dist/components/icons/ClipboardIcon.astro +39 -0
  33. package/dist/components/icons/CloseIcon.astro +38 -0
  34. package/dist/components/icons/ErrorIcon.astro +35 -0
  35. package/dist/components/icons/GithubIcon.astro +31 -0
  36. package/dist/components/icons/InfoCircle.astro +37 -0
  37. package/dist/components/icons/InfoIcon.astro +38 -0
  38. package/dist/components/icons/LinkIcon.astro +39 -0
  39. package/dist/components/icons/LinkedinIcon.astro +31 -0
  40. package/dist/components/icons/MenuIcon.astro +41 -0
  41. package/dist/components/icons/SearchIcon.astro +40 -0
  42. package/dist/components/icons/SocialIcon.astro +100 -0
  43. package/dist/components/icons/SuccessIcon.astro +35 -0
  44. package/dist/components/icons/SunCloudyIcon.astro +45 -0
  45. package/dist/components/icons/TwitterIcon.astro +31 -0
  46. package/dist/components/icons/UserIcon.astro +35 -0
  47. package/dist/components/icons/WarningIcon.astro +38 -0
  48. package/dist/components/icons/XCircle.astro +37 -0
  49. package/dist/components/icons/index.ts +23 -0
  50. package/dist/components/layouts/BaseLayout.astro +144 -0
  51. package/dist/components/layouts/DashboardLayout.astro +660 -0
  52. package/dist/components/layouts/DefaultLayout.astro +170 -0
  53. package/dist/components/layouts/DocumentationLayout.astro +469 -0
  54. package/dist/components/layouts/Flex.astro +138 -0
  55. package/dist/components/layouts/Footer.astro +284 -0
  56. package/dist/components/layouts/Grid.astro +182 -0
  57. package/dist/components/layouts/Header.astro +114 -0
  58. package/dist/components/layouts/LandingLayout.astro +388 -0
  59. package/dist/components/layouts/README.md +37 -0
  60. package/dist/components/layouts/Stack.astro +149 -0
  61. package/dist/components/layouts/index.ts +6 -0
  62. package/dist/components/navigation/LanguageSwitcher.astro +81 -0
  63. package/dist/components/navigation/README.md +24 -0
  64. package/dist/components/navigation/TableOfContents.astro +352 -0
  65. package/dist/components/navigation/ThemeSwitcher.astro +89 -0
  66. package/dist/components/navigation/index.ts +3 -0
  67. package/dist/components/typography/Article.astro +144 -0
  68. package/dist/components/typography/Heading.astro +205 -0
  69. package/dist/components/typography/README.md +29 -0
  70. package/dist/components/typography/Text.astro +187 -0
  71. package/dist/components/typography/index.ts +3 -0
  72. package/dist/index.ts +9 -0
  73. package/dist/integration.ts +14 -0
  74. package/dist/style.ts +1 -0
  75. package/{src → dist}/types/footer.ts +1 -0
  76. package/dist/utils/theme.ts +55 -0
  77. package/package.json +65 -59
  78. package/index.ts +0 -18
  79. package/src/components/Alert.astro +0 -78
  80. package/src/components/Article.astro +0 -11
  81. package/src/components/Banner.astro +0 -49
  82. package/src/components/Blog.astro +0 -115
  83. package/src/components/Button.astro +0 -49
  84. package/src/components/Card.astro +0 -113
  85. package/src/components/CodeBlock.astro +0 -186
  86. package/src/components/Footer.astro +0 -148
  87. package/src/components/Header.astro +0 -305
  88. package/src/components/Hero.astro +0 -69
  89. package/src/components/Image.astro +0 -251
  90. package/src/components/Link.astro +0 -82
  91. package/src/components/Modal.astro +0 -67
  92. package/src/components/SocialIcon.astro +0 -36
  93. package/src/components/TeamMember.astro +0 -68
  94. package/src/components/TeamMembers.astro +0 -43
  95. package/src/env.d.ts +0 -0
  96. /package/{src/components → dist/components/base}/ThemeItem.astro +0 -0
  97. /package/{src → dist}/utils/social.ts +0 -0
@@ -1,251 +0,0 @@
1
- ---
2
- import { Image as AstroImage } from 'astro:assets';
3
- import type { ImageMetadata } from 'astro';
4
-
5
- interface Props {
6
- /**
7
- * 图片源,可以是本地图片或远程URL
8
- */
9
- src: ImageMetadata | string;
10
- /**
11
- * 图片的替代文本
12
- */
13
- alt: string;
14
- /**
15
- * 图片的宽度
16
- */
17
- width?: number;
18
- /**
19
- * 图片的高度
20
- */
21
- height?: number;
22
- /**
23
- * 图片的加载方式
24
- * @default "lazy"
25
- */
26
- loading?: 'lazy' | 'eager';
27
- /**
28
- * 图片的填充方式
29
- * @default "cover"
30
- */
31
- objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
32
- /**
33
- * 图片的位置
34
- * @default "center"
35
- */
36
- objectPosition?: string;
37
- /**
38
- * 是否显示加载中的占位图
39
- * @default true
40
- */
41
- showPlaceholder?: boolean;
42
- /**
43
- * 是否显示加载失败的错误图
44
- * @default true
45
- */
46
- showError?: boolean;
47
- /**
48
- * 自定义类名
49
- */
50
- class?: string;
51
- /**
52
- * 是否启用图片懒加载
53
- * @default true
54
- */
55
- lazy?: boolean;
56
- /**
57
- * 图片的圆角大小
58
- * @default "none"
59
- */
60
- rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
61
- /**
62
- * 图片的阴影效果
63
- * @default "none"
64
- */
65
- shadow?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
66
- /**
67
- * 图片的悬停效果
68
- * @default "none"
69
- */
70
- hover?: 'none' | 'scale' | 'brightness' | 'blur';
71
- /**
72
- * 图片的过渡动画
73
- * @default "none"
74
- */
75
- transition?: 'none' | 'fade' | 'slide' | 'zoom';
76
- }
77
-
78
- const {
79
- src,
80
- alt,
81
- width,
82
- height,
83
- loading = 'lazy',
84
- objectFit = 'cover',
85
- objectPosition = 'center',
86
- showPlaceholder = true,
87
- showError = true,
88
- class: className = '',
89
- lazy = true,
90
- rounded = 'none',
91
- shadow = 'none',
92
- hover = 'none',
93
- transition = 'none',
94
- } = Astro.props;
95
-
96
- // 处理类名
97
- const classes = [
98
- 'relative',
99
- // 圆角
100
- rounded !== 'none' && `rounded-${rounded}`,
101
- // 阴影
102
- shadow !== 'none' && `shadow-${shadow}`,
103
- // 悬停效果
104
- hover !== 'none' && {
105
- 'scale': 'hover:scale-105',
106
- 'brightness': 'hover:brightness-110',
107
- 'blur': 'hover:blur-sm',
108
- }[hover],
109
- // 过渡动画
110
- transition !== 'none' && {
111
- 'fade': 'transition-opacity duration-300',
112
- 'slide': 'transition-transform duration-300',
113
- 'zoom': 'transition-all duration-300',
114
- }[transition],
115
- className,
116
- ].filter(Boolean).join(' ');
117
-
118
- // 处理图片样式
119
- const imageStyles = {
120
- objectFit,
121
- objectPosition,
122
- };
123
-
124
- // 判断是否为本地图片
125
- const isLocalImage = typeof src !== 'string' && 'src' in src;
126
- ---
127
-
128
- <div class={classes}>
129
- <div class="relative w-full h-full">
130
- {isLocalImage ? (
131
- <AstroImage
132
- src={src}
133
- alt={alt}
134
- width={width}
135
- height={height}
136
- loading={loading}
137
- class="w-full h-full opacity-0 transition-opacity duration-300"
138
- style={imageStyles}
139
- />
140
- ) : (
141
- <img
142
- src={src}
143
- alt={alt}
144
- width={width}
145
- height={height}
146
- loading={loading}
147
- class="w-full h-full opacity-0 transition-opacity duration-300"
148
- style={imageStyles}
149
- />
150
- )}
151
-
152
- {/* 加载占位图 */}
153
- {showPlaceholder && (
154
- <div class="absolute inset-0 bg-base-200 animate-pulse" />
155
- )}
156
-
157
- {/* 错误占位图 */}
158
- {showError && (
159
- <div class="absolute inset-0 bg-error/10 flex items-center justify-center hidden">
160
- <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-error" fill="none" viewBox="0 0 24 24" stroke="currentColor">
161
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
162
- </svg>
163
- </div>
164
- )}
165
- </div>
166
- </div>
167
-
168
- <script>
169
- // 处理图片加载状态
170
- function handleImageLoad(img) {
171
- // 移除加载占位图
172
- const placeholder = img.parentElement?.querySelector('.animate-pulse');
173
- if (placeholder) {
174
- placeholder.classList.add('opacity-0');
175
- setTimeout(() => {
176
- placeholder.remove();
177
- }, 300);
178
- }
179
-
180
- // 添加加载完成动画
181
- img.classList.add('opacity-100');
182
- }
183
-
184
- // 处理图片加载错误
185
- function handleImageError(img) {
186
- // 移除加载占位图
187
- const placeholder = img.parentElement?.querySelector('.animate-pulse');
188
- if (placeholder) {
189
- placeholder.classList.add('opacity-0');
190
- setTimeout(() => {
191
- placeholder.remove();
192
- }, 300);
193
- }
194
-
195
- // 显示错误占位图
196
- const errorPlaceholder = img.parentElement?.querySelector('.bg-error\\/10');
197
- if (errorPlaceholder) {
198
- errorPlaceholder.classList.remove('hidden');
199
- }
200
- }
201
-
202
- // 初始化图片加载处理
203
- function initializeImageHandlers() {
204
- const images = document.querySelectorAll('img[loading="lazy"]');
205
- images.forEach(img => {
206
- if (img instanceof HTMLImageElement) {
207
- // 如果图片已经加载完成
208
- if (img.complete) {
209
- handleImageLoad(img);
210
- } else {
211
- // 添加加载事件监听
212
- img.addEventListener('load', () => handleImageLoad(img));
213
- img.addEventListener('error', () => handleImageError(img));
214
- }
215
- }
216
- });
217
- }
218
-
219
- // 页面加载时初始化
220
- document.addEventListener('astro:page-load', initializeImageHandlers);
221
- // 初始加载时也初始化
222
- initializeImageHandlers();
223
- </script>
224
-
225
- <style>
226
- /* 过渡动画 */
227
- .transition-opacity {
228
- transition-property: opacity;
229
- }
230
-
231
- .transition-transform {
232
- transition-property: transform;
233
- }
234
-
235
- .transition-all {
236
- transition-property: all;
237
- }
238
-
239
- /* 悬停效果 */
240
- .hover\:scale-105:hover {
241
- transform: scale(1.05);
242
- }
243
-
244
- .hover\:brightness-110:hover {
245
- filter: brightness(1.1);
246
- }
247
-
248
- .hover\:blur-sm:hover {
249
- filter: blur(4px);
250
- }
251
- </style>
@@ -1,82 +0,0 @@
1
- ---
2
- import type { HTMLAttributes } from 'astro/types';
3
-
4
- interface Props extends HTMLAttributes<'a'> {
5
- href: string;
6
- external?: boolean;
7
- class?: string;
8
- 'class:list'?: any;
9
- variant?: 'default' | 'primary' | 'secondary' | 'text' | 'cta' | 'ghost';
10
- animation?: 'none' | 'hover-lift' | 'hover-glow' | 'hover-scale';
11
- size?: 'sm' | 'md' | 'lg';
12
- }
13
-
14
- const {
15
- href,
16
- external = false,
17
- variant = 'default',
18
- animation = 'none',
19
- size = 'md',
20
- class: className = '',
21
- 'class:list': classList,
22
- ...rest
23
- } = Astro.props;
24
-
25
- // 基础样式
26
- const baseStyles = "link no-underline hover:no-underline transition-all duration-200 ease-in-out";
27
-
28
- // 尺寸变体
29
- const sizeStyles = {
30
- sm: "px-4 py-2 text-sm",
31
- md: "px-6 py-3 text-base",
32
- lg: "px-8 py-4 text-lg"
33
- };
34
-
35
- // 主题变体
36
- const variantStyles = {
37
- default: "link-hover text-current hover:text-primary",
38
- primary: "rounded-lg bg-blue-600 text-white font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 active:bg-blue-800",
39
- secondary: "rounded-lg bg-gray-100 text-gray-800 font-medium hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 active:bg-gray-300",
40
- text: "text-current hover:text-primary underline hover:no-underline",
41
- cta: "rounded-lg bg-gradient-to-r from-blue-600 to-indigo-600 text-white font-medium hover:from-blue-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 active:from-blue-800 active:to-indigo-800",
42
- ghost: "text-current hover:text-primary bg-transparent hover:bg-base-200/50 rounded-lg"
43
- };
44
-
45
- // 动画效果
46
- const animationStyles = {
47
- none: "",
48
- "hover-lift": "hover:-translate-y-0.5 hover:shadow-lg",
49
- "hover-glow": "hover:shadow-[0_0_15px_rgba(59,130,246,0.5)]",
50
- "hover-scale": "hover:scale-105"
51
- };
52
-
53
- // 合并所有样式
54
- const finalClassName = [
55
- baseStyles,
56
- sizeStyles[size],
57
- variantStyles[variant],
58
- animationStyles[animation],
59
- className
60
- ].join(' ');
61
- ---
62
-
63
- <a
64
- href={href}
65
- class:list={[finalClassName, classList]}
66
- {...external ? { target: '_blank', rel: 'noopener noreferrer' } : {}}
67
- {...rest}
68
- >
69
- <slot />
70
- </a>
71
-
72
- <style>
73
- /* 添加渐变动画 */
74
- .bg-gradient-to-r {
75
- background-size: 200% auto;
76
- transition: background-position 0.3s ease-in-out;
77
- }
78
-
79
- .bg-gradient-to-r:hover {
80
- background-position: right center;
81
- }
82
- </style>
@@ -1,67 +0,0 @@
1
- ---
2
- interface Props {
3
- /**
4
- * Modal 的唯一标识符
5
- */
6
- id: string;
7
- /**
8
- * 模态框的标题
9
- */
10
- title?: string;
11
- /**
12
- * 是否显示关闭按钮
13
- * @default true
14
- */
15
- showCloseButton?: boolean;
16
- /**
17
- * 自定义类名
18
- */
19
- class?: string;
20
- }
21
-
22
- const {
23
- id,
24
- title,
25
- showCloseButton = true,
26
- class: className = '',
27
- } = Astro.props;
28
- ---
29
-
30
- <dialog id={id} class="modal">
31
- <div class:list={["modal-box relative", className]}>
32
- {showCloseButton && (
33
- <form method="dialog">
34
- <button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
35
- </form>
36
- )}
37
-
38
- {title && <h3 class="font-bold text-lg mb-4">{title}</h3>}
39
-
40
- <div class="modal-content">
41
- <slot />
42
- </div>
43
-
44
- <div class="modal-action">
45
- <slot name="actions" />
46
- </div>
47
- </div>
48
-
49
- <form method="dialog" class="modal-backdrop">
50
- <button>关闭</button>
51
- </form>
52
- </dialog>
53
-
54
- <script define:vars={{ id }}>
55
- // 为了方便使用,我们提供一些辅助方法
56
- document.addEventListener('DOMContentLoaded', () => {
57
- const modal = document.getElementById(id);
58
- if (!modal) return;
59
-
60
- // 为所有触发这个模态框的按钮添加点击事件
61
- document.querySelectorAll(`[data-modal-target="${id}"]`).forEach(trigger => {
62
- trigger.addEventListener('click', () => {
63
- modal.showModal();
64
- });
65
- });
66
- });
67
- </script>
@@ -1,36 +0,0 @@
1
- ---
2
- interface Props {
3
- platform: string;
4
- class?: string;
5
- }
6
-
7
- const { platform = 'default', class: className = 'w-4 h-4' } = Astro.props;
8
-
9
- // 所有平台的图标路径
10
- const icons = {
11
- github:
12
- 'M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z',
13
- twitter:
14
- 'M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z',
15
- linkedin:
16
- 'M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z',
17
- weibo:
18
- 'M10.098 20.323c-3.977.391-7.414-1.406-7.672-4.016-.259-2.609 2.759-5.047 6.74-5.441 3.979-.394 7.413 1.404 7.671 4.017.259 2.608-2.759 5.047-6.737 5.44m6.853-7.421c-.34-.714-.996-1.002-1.563-.807-.566.193-.752.849-.414 1.555.336.714.992 1.002 1.559.807.572-.195.756-.85.418-1.555m2.84-2.89c-1.154-3.553-5.027-5.606-8.82-4.779-3.791.836-6.119 4.608-4.965 8.162 1.152 3.553 5.027 5.607 8.82 4.779 3.791-.834 6.119-4.607 4.965-8.162M22.371.748c-2.637-2.637-6.532-2.637-9.168 0L.748 13.203c-.998.998-.998 2.617 0 3.615l5.354 5.355c.998.998 2.617.998 3.615 0L22.371 9.916c2.637-2.637 2.637-6.532 0-9.168',
19
- wechat:
20
- 'M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.182 0 .653-.52 1.182-1.162 1.182-.642 0-1.162-.529-1.162-1.182 0-.653.52-1.182 1.162-1.182zm5.813 0c.642 0 1.162.529 1.162 1.182 0 .653-.52 1.182-1.162 1.182-.642 0-1.162-.529-1.162-1.182 0-.653.52-1.182 1.162-1.182zm6.636 2.456c-3.963 0-7.174 2.803-7.174 6.26 0 3.458 3.211 6.26 7.174 6.26.826 0 1.621-.117 2.35-.332.092-.028.185-.042.277-.042.182 0 .359.056.51.16l1.573.923a.327.327 0 0 0 .168.054c.16 0 .29-.132.29-.295 0-.072-.03-.143-.048-.213l-.322-1.226a.589.589 0 0 1 .213-.665c1.508-1.192 2.363-2.923 2.363-4.624 0-3.457-3.21-6.26-7.174-6.26zm-2.896 3.028c.531 0 .962.438.962.978 0 .54-.43.978-.962.978s-.962-.438-.962-.978c0-.54.43-.978.962-.978zm5.813 0c.531 0 .962.438.962.978 0 .54-.43.978-.962.978s-.962-.438-.962-.978c0-.54.43-.978.962-.978z',
21
- zhihu:
22
- 'M12.2 2.4c0-.4-.3-.7-.7-.7H5.9c-.4 0-.7.3-.7.7v1.4h7v-1.4zM6.9 5.7h2.8v12.8H6.9V5.7zm10.2 0H14v12.8h3.1V5.7zm.9-3.3H4c-.6 0-1 .4-1 1v16c0 .6.4 1 1 1h14c.6 0 1-.4 1-1v-16c0-.6-.4-1-1-1z',
23
- bilibili:
24
- 'M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373z',
25
- youtube:
26
- 'M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z',
27
- discord:
28
- 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
29
- default:
30
- 'M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 22c-5.523 0-10-4.477-10-10S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-15c-2.761 0-5 2.239-5 5s2.239 5 5 5 5-2.239 5-5-2.239-5-5-5zm0 8c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z',
31
- };
32
- ---
33
-
34
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class={className} fill="currentColor">
35
- <path d={icons[platform] || icons.default}></path>
36
- </svg>
@@ -1,68 +0,0 @@
1
- ---
2
- import { Image } from 'astro:assets';
3
- import type { ImageMetadata } from 'astro';
4
- import Link from './Link.astro';
5
-
6
- interface SocialLink {
7
- platform: 'github' | 'twitter' | 'linkedin' | 'website' | 'email';
8
- url: string;
9
- }
10
-
11
- export interface Props {
12
- name: string;
13
- role: string;
14
- avatar: ImageMetadata | string;
15
- bio: string;
16
- socialLinks?: SocialLink[];
17
- class?: string;
18
- }
19
-
20
- const { name, role, avatar, bio, socialLinks, class: className = '' } = Astro.props;
21
-
22
- const socialIcons = {
23
- github: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>`,
24
- twitter: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>`,
25
- linkedin: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>`,
26
- website: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm1 16.057v-3.05c.959-.69 2-1.367 2-3.007 0-2.233-1.5-3-2-3s-2 .767-2 3c0 1.64 1.041 2.317 2 3.007v3.05c-6.497 1.199-10 3.777-10 6.443h20c0-2.666-3.503-5.244-10-6.443z"/></svg>`,
27
- email: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"/><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"/></svg>`
28
- } as const;
29
- ---
30
-
31
- <div class:list={["card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow duration-300", className]}>
32
- <figure class="px-6 pt-6">
33
- {typeof avatar === 'string' ? (
34
- <img
35
- src={avatar}
36
- alt={`${name}'s avatar`}
37
- class="rounded-xl w-48 h-48 object-cover"
38
- />
39
- ) : (
40
- <Image
41
- src={avatar}
42
- alt={`${name}'s avatar`}
43
- class="rounded-xl w-48 h-48 object-cover"
44
- />
45
- )}
46
- </figure>
47
- <div class="card-body items-center text-center">
48
- <h2 class="card-title text-2xl font-bold">{name}</h2>
49
- <p class="text-primary font-medium">{role}</p>
50
- <p class="text-base-content/80">{bio}</p>
51
-
52
- {socialLinks && socialLinks.length > 0 && (
53
- <div class="flex gap-4 mt-4">
54
- {socialLinks.map(link => (
55
- <Link
56
- href={link.url}
57
- external
58
- variant="ghost"
59
- class="p-2 hover:text-primary"
60
- aria-label={`Visit ${name}'s ${link.platform} profile`}
61
- >
62
- <Fragment set:html={socialIcons[link.platform]} />
63
- </Link>
64
- ))}
65
- </div>
66
- )}
67
- </div>
68
- </div>
@@ -1,43 +0,0 @@
1
- ---
2
- import type { ImageMetadata } from 'astro';
3
- import TeamMember from './TeamMember.astro';
4
-
5
- interface SocialLink {
6
- platform: 'github' | 'twitter' | 'linkedin' | 'website' | 'email';
7
- url: string;
8
- }
9
-
10
- interface TeamMemberData {
11
- name: string;
12
- role: string;
13
- avatar: ImageMetadata | string;
14
- bio: string;
15
- socialLinks?: SocialLink[];
16
- }
17
-
18
- interface Props {
19
- members: TeamMemberData[];
20
- columns?: 2 | 3 | 4;
21
- class?: string;
22
- }
23
-
24
- const {
25
- members,
26
- columns = 3,
27
- class: className = ''
28
- } = Astro.props;
29
-
30
- const gridCols = {
31
- 2: 'grid-cols-1 md:grid-cols-2',
32
- 3: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
33
- 4: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4'
34
- } as const;
35
- ---
36
-
37
- <div class:list={["w-full", className]}>
38
- <div class:list={["grid gap-8", gridCols[columns]]}>
39
- {members.map(member => (
40
- <TeamMember {...member} />
41
- ))}
42
- </div>
43
- </div>
package/src/env.d.ts DELETED
File without changes
File without changes