@coffic/cosy-ui 0.3.15 → 0.3.33
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.
- package/README.md +25 -25
- package/dist/app.css +1 -1
- package/dist/components/base/Alert.astro +45 -140
- package/dist/components/layouts/DocumentationLayout.astro +396 -386
- package/dist/components/layouts/Footer.astro +1 -1
- package/dist/components/layouts/Sidebar.astro +52 -75
- package/dist/index.ts +2 -0
- package/dist/types/layout.ts +10 -0
- package/package.json +2 -5
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
/**
|
3
3
|
* DocumentationLayout组件
|
4
|
-
*
|
4
|
+
*
|
5
5
|
* 适用于文档页面的布局,包含侧边栏导航和目录
|
6
|
-
*
|
6
|
+
*
|
7
7
|
* 布局效果:
|
8
|
-
*
|
8
|
+
*
|
9
9
|
* 移动端:
|
10
10
|
* ```
|
11
11
|
* +------------------+
|
@@ -21,7 +21,7 @@
|
|
21
21
|
* | Footer |
|
22
22
|
* +------------------+
|
23
23
|
* ```
|
24
|
-
*
|
24
|
+
*
|
25
25
|
* 桌面端:
|
26
26
|
* ```
|
27
27
|
* +------------------+
|
@@ -35,12 +35,12 @@
|
|
35
35
|
* | Footer |
|
36
36
|
* +------------------+
|
37
37
|
* ```
|
38
|
-
*
|
38
|
+
*
|
39
39
|
* @example
|
40
40
|
* ```astro
|
41
41
|
* ---
|
42
42
|
* import DocumentationLayout from '../layouts/DocumentationLayout.astro';
|
43
|
-
*
|
43
|
+
*
|
44
44
|
* const sidebarItems = [
|
45
45
|
* { title: "入门", items: [
|
46
46
|
* { href: "/docs/getting-started", text: "快速开始" },
|
@@ -52,9 +52,9 @@
|
|
52
52
|
* ]}
|
53
53
|
* ];
|
54
54
|
* ---
|
55
|
-
*
|
56
|
-
* <DocumentationLayout
|
57
|
-
* title="文档标题"
|
55
|
+
*
|
56
|
+
* <DocumentationLayout
|
57
|
+
* title="文档标题"
|
58
58
|
* description="文档描述"
|
59
59
|
* sidebarItems={sidebarItems}
|
60
60
|
* >
|
@@ -62,11 +62,11 @@
|
|
62
62
|
* <p>这是文档的主要内容</p>
|
63
63
|
* </DocumentationLayout>
|
64
64
|
* ```
|
65
|
-
*
|
65
|
+
*
|
66
66
|
* 自定义页脚示例:
|
67
67
|
* ```astro
|
68
|
-
* <DocumentationLayout
|
69
|
-
* title="文档标题"
|
68
|
+
* <DocumentationLayout
|
69
|
+
* title="文档标题"
|
70
70
|
* description="文档描述"
|
71
71
|
* sidebarItems={sidebarItems}
|
72
72
|
* footerSlogan="简单而强大的组件库"
|
@@ -84,14 +84,14 @@
|
|
84
84
|
* <p>这是文档的主要内容</p>
|
85
85
|
* </DocumentationLayout>
|
86
86
|
* ```
|
87
|
-
*
|
87
|
+
*
|
88
88
|
* 组件支持多种页脚相关的配置参数,可以通过以 `footer` 为前缀的属性来自定义页脚的内容和链接。
|
89
89
|
* 所有这些参数都是可选的,组件会为常用参数提供默认值。
|
90
|
-
*
|
90
|
+
*
|
91
91
|
* 调试模式示例:
|
92
92
|
* ```astro
|
93
|
-
* <DocumentationLayout
|
94
|
-
* title="文档标题"
|
93
|
+
* <DocumentationLayout
|
94
|
+
* title="文档标题"
|
95
95
|
* description="文档描述"
|
96
96
|
* sidebarItems={sidebarItems}
|
97
97
|
* debug={true}
|
@@ -117,289 +117,289 @@ import { getText } from '../../utils/i18n';
|
|
117
117
|
import { getValidLanguage } from '../../utils/language';
|
118
118
|
|
119
119
|
export interface SidebarItem {
|
120
|
-
|
121
|
-
|
122
|
-
|
120
|
+
href: string;
|
121
|
+
text: string;
|
122
|
+
items?: SidebarItem[];
|
123
123
|
}
|
124
124
|
|
125
125
|
export interface SidebarSection {
|
126
|
-
|
127
|
-
|
126
|
+
title: string;
|
127
|
+
items: SidebarItem[];
|
128
128
|
}
|
129
129
|
|
130
130
|
export interface Props {
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
131
|
+
/**
|
132
|
+
* 页面标题
|
133
|
+
*/
|
134
|
+
title: string;
|
135
|
+
|
136
|
+
/**
|
137
|
+
* 页面描述
|
138
|
+
*/
|
139
|
+
description?: string;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* 页面关键词
|
143
|
+
*/
|
144
|
+
keywords?: string;
|
145
|
+
|
146
|
+
/**
|
147
|
+
* 网站名称
|
148
|
+
* @default "文档中心"
|
149
|
+
*/
|
150
|
+
siteName?: string;
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Logo图片
|
154
|
+
* @default "/logo.svg"
|
155
|
+
*/
|
156
|
+
logo?: ImageMetadata;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Logo链接地址
|
160
|
+
* @default "/"
|
161
|
+
*/
|
162
|
+
logoHref?: string;
|
163
|
+
|
164
|
+
/**
|
165
|
+
* 侧边栏项目
|
166
|
+
*/
|
167
|
+
sidebarItems: SidebarSection[];
|
168
|
+
|
169
|
+
/**
|
170
|
+
* 是否显示目录
|
171
|
+
* @default true
|
172
|
+
*/
|
173
|
+
showTableOfContents?: boolean;
|
174
|
+
|
175
|
+
/**
|
176
|
+
* 是否显示页眉
|
177
|
+
* @default true
|
178
|
+
*/
|
179
|
+
showHeader?: boolean;
|
180
|
+
|
181
|
+
/**
|
182
|
+
* 是否显示页脚
|
183
|
+
* @default true
|
184
|
+
*/
|
185
|
+
showFooter?: boolean;
|
186
|
+
|
187
|
+
/**
|
188
|
+
* 自定义头部内容
|
189
|
+
*/
|
190
|
+
head?: astroHTML.JSX.Element;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* 页面类名
|
194
|
+
*/
|
195
|
+
class?: string;
|
196
|
+
|
197
|
+
/**
|
198
|
+
* 类名列表
|
199
|
+
*/
|
200
|
+
'class:list'?: any;
|
201
|
+
|
202
|
+
/**
|
203
|
+
* 调试模式,显示各个部分的边框
|
204
|
+
* @default false
|
205
|
+
*/
|
206
|
+
debug?: boolean;
|
207
|
+
|
208
|
+
/**
|
209
|
+
* 导航项目
|
210
|
+
*/
|
211
|
+
navItems?: Array<{
|
212
|
+
href: string;
|
213
|
+
label: string;
|
214
|
+
match: (path: string) => boolean;
|
215
|
+
}>;
|
216
|
+
|
217
|
+
/**
|
218
|
+
* 语言列表
|
219
|
+
*/
|
220
|
+
languages?: Array<{ code: string; name: string }>;
|
221
|
+
|
222
|
+
/**
|
223
|
+
* 当前语言
|
224
|
+
*/
|
225
|
+
currentLocale?: string;
|
226
|
+
|
227
|
+
/**
|
228
|
+
* 基础路径,用于处理网站部署在二级目录的情况
|
229
|
+
* @default ""
|
230
|
+
*/
|
231
|
+
basePath?: string;
|
232
|
+
|
233
|
+
/**
|
234
|
+
* 页脚相关配置
|
235
|
+
*/
|
236
|
+
// Footer 相关参数
|
237
|
+
/**
|
238
|
+
* 页脚标语
|
239
|
+
* @default "优雅、高效的组件库"
|
240
|
+
*/
|
241
|
+
footerSlogan?: string;
|
242
|
+
|
243
|
+
/**
|
244
|
+
* 公司名称
|
245
|
+
* @default 与siteName相同
|
246
|
+
*/
|
247
|
+
footerCompany?: string;
|
248
|
+
|
249
|
+
/**
|
250
|
+
* 版权信息
|
251
|
+
* @default "保留所有权利"
|
252
|
+
*/
|
253
|
+
footerCopyright?: string;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* 页脚横幅标语
|
257
|
+
* @default "构建美好的数字体验"
|
258
|
+
*/
|
259
|
+
footerInspirationalSlogan?: string;
|
260
|
+
|
261
|
+
/**
|
262
|
+
* ICP备案号
|
263
|
+
*/
|
264
|
+
footerIcp?: string;
|
265
|
+
|
266
|
+
/**
|
267
|
+
* 网站Logo
|
268
|
+
*/
|
269
|
+
footerLogo?: { src: string; alt: string };
|
270
|
+
|
271
|
+
/**
|
272
|
+
* 产品链接列表
|
273
|
+
*/
|
274
|
+
footerProducts?: Array<{ name: string; href: string; external?: boolean }>;
|
275
|
+
|
276
|
+
/**
|
277
|
+
* 关于我们链接
|
278
|
+
* @default "/about"
|
279
|
+
*/
|
280
|
+
footerAboutLink?: string;
|
281
|
+
|
282
|
+
/**
|
283
|
+
* 联系我们链接
|
284
|
+
* @default "/contact"
|
285
|
+
*/
|
286
|
+
footerContactLink?: string;
|
287
|
+
|
288
|
+
/**
|
289
|
+
* 服务条款链接
|
290
|
+
*/
|
291
|
+
footerTermsLink?: string;
|
292
|
+
|
293
|
+
/**
|
294
|
+
* 隐私政策链接
|
295
|
+
*/
|
296
|
+
footerPrivacyLink?: string;
|
297
|
+
|
298
|
+
/**
|
299
|
+
* 社交媒体链接列表
|
300
|
+
*/
|
301
|
+
footerSocialLinks?: string[];
|
302
|
+
|
303
|
+
/**
|
304
|
+
* 团队介绍链接
|
305
|
+
*/
|
306
|
+
footerTeamLink?: string;
|
307
|
+
|
308
|
+
/**
|
309
|
+
* 加入我们链接
|
310
|
+
*/
|
311
|
+
footerCareersLink?: string;
|
312
|
+
|
313
|
+
/**
|
314
|
+
* 新闻动态链接
|
315
|
+
*/
|
316
|
+
footerNewsLink?: string;
|
317
|
+
|
318
|
+
/**
|
319
|
+
* 发展历程链接
|
320
|
+
*/
|
321
|
+
footerHistoryLink?: string;
|
322
|
+
|
323
|
+
/**
|
324
|
+
* 合作伙伴链接
|
325
|
+
*/
|
326
|
+
footerPartnersLink?: string;
|
327
|
+
|
328
|
+
/**
|
329
|
+
* 技术博客链接
|
330
|
+
*/
|
331
|
+
footerBlogLink?: string;
|
332
|
+
|
333
|
+
/**
|
334
|
+
* 常见问题链接
|
335
|
+
*/
|
336
|
+
footerFaqLink?: string;
|
337
|
+
|
338
|
+
/**
|
339
|
+
* 媒体报道链接
|
340
|
+
*/
|
341
|
+
footerMediaLink?: string;
|
342
|
+
|
343
|
+
/**
|
344
|
+
* 技术栈链接
|
345
|
+
*/
|
346
|
+
footerTechStackLink?: string;
|
347
|
+
|
348
|
+
/**
|
349
|
+
* 首页链接
|
350
|
+
*/
|
351
|
+
footerHomeLink?: string;
|
352
|
+
|
353
|
+
/**
|
354
|
+
* 是否默认展开侧边栏(移动端)
|
355
|
+
* @default false
|
356
|
+
*/
|
357
|
+
defaultSidebarOpen?: boolean;
|
358
358
|
}
|
359
359
|
|
360
360
|
const {
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
361
|
+
title,
|
362
|
+
description,
|
363
|
+
keywords,
|
364
|
+
siteName = '文档中心',
|
365
|
+
logo = DefaultLogo,
|
366
|
+
logoHref = '/',
|
367
|
+
sidebarItems,
|
368
|
+
showTableOfContents = true,
|
369
|
+
showHeader = true,
|
370
|
+
showFooter = true,
|
371
|
+
head,
|
372
|
+
class: className,
|
373
|
+
'class:list': classList,
|
374
|
+
debug = true,
|
375
|
+
navItems,
|
376
|
+
languages,
|
377
|
+
currentLocale,
|
378
|
+
basePath = '',
|
379
|
+
footerHomeLink,
|
380
|
+
footerSlogan,
|
381
|
+
footerCompany,
|
382
|
+
footerCopyright,
|
383
|
+
footerInspirationalSlogan,
|
384
|
+
footerIcp,
|
385
|
+
footerLogo,
|
386
|
+
footerProducts,
|
387
|
+
footerAboutLink,
|
388
|
+
footerContactLink,
|
389
|
+
footerTermsLink,
|
390
|
+
footerPrivacyLink,
|
391
|
+
footerSocialLinks,
|
392
|
+
footerTeamLink,
|
393
|
+
footerCareersLink,
|
394
|
+
footerNewsLink,
|
395
|
+
footerHistoryLink,
|
396
|
+
footerPartnersLink,
|
397
|
+
footerBlogLink,
|
398
|
+
footerFaqLink,
|
399
|
+
footerMediaLink,
|
400
|
+
footerTechStackLink,
|
401
|
+
defaultSidebarOpen = false,
|
402
|
+
...rest
|
403
403
|
} = Astro.props;
|
404
404
|
|
405
405
|
const currentPath = Astro.url.pathname;
|
@@ -408,99 +408,109 @@ const currentPath = Astro.url.pathname;
|
|
408
408
|
const validLang = getValidLanguage(currentLocale);
|
409
409
|
---
|
410
410
|
|
411
|
-
<BaseLayout
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
411
|
+
<BaseLayout
|
412
|
+
title={title}
|
413
|
+
description={description}
|
414
|
+
keywords={keywords}
|
415
|
+
head={head}
|
416
|
+
class:list={[
|
417
|
+
'cosy:min-h-screen cosy:flex cosy:flex-col',
|
418
|
+
{ 'cosy:border cosy:border-base-300': debug },
|
419
|
+
]}
|
420
|
+
{...rest}>
|
421
|
+
{
|
422
|
+
showHeader && (
|
423
|
+
<Header
|
424
|
+
logo={logo}
|
425
|
+
logoHref={logoHref}
|
426
|
+
navItems={navItems}
|
427
|
+
languages={languages}
|
428
|
+
currentLocale={currentLocale}
|
429
|
+
sticky={true}
|
430
|
+
basePath={basePath}
|
431
|
+
showSidebarToggle={true}
|
432
|
+
defaultSidebarOpen={defaultSidebarOpen}
|
433
|
+
/>
|
434
|
+
)
|
435
|
+
}
|
436
|
+
|
437
|
+
<div class="cosy:flex cosy:lg:flex-row cosy:flex-col cosy:flex-1">
|
438
|
+
<div class="cosy:flex cosy:flex-row cosy:flex-1 cosy:min-h-screen cosy:pb-96">
|
439
|
+
<!-- 侧边栏容器 -->
|
440
|
+
<div class="cosy:top-16 cosy:z-10 cosy:sticky cosy:bg-base-100 cosy:h-screen">
|
441
|
+
<Sidebar
|
442
|
+
sidebarItems={sidebarItems}
|
443
|
+
currentPath={currentPath}
|
444
|
+
debug={false}
|
445
|
+
class="cosy:lg:border-r cosy:border-b cosy:border-base-300 cosy:lg:border-b-0 cosy:lg:w-64 cosy:lg:shrink-0"
|
446
|
+
/>
|
447
|
+
</div>
|
448
|
+
|
449
|
+
<!-- 主内容区域 -->
|
450
|
+
<Main class="cosy:lg:py-8 cosy:py-4 cosy:w-full">
|
451
|
+
<div class="cosy:mx-auto cosy:px-4 lg:cosy:px-8 cosy:container">
|
452
|
+
<div class="cosy:flex cosy:lg:flex-row cosy:flex-col cosy:justify-center cosy:gap-8">
|
453
|
+
<Article class="cosy:flex-1 xl:cosy:w-[calc(100%-16rem)]">
|
454
|
+
<slot />
|
455
|
+
</Article>
|
456
|
+
|
457
|
+
{showTableOfContents && <TableOfContents lang={currentLocale} />}
|
458
|
+
</div>
|
459
|
+
</div>
|
460
|
+
</Main>
|
461
|
+
</div>
|
462
|
+
</div>
|
463
|
+
|
464
|
+
{
|
465
|
+
showFooter && (
|
466
|
+
<Footer
|
467
|
+
siteName={siteName}
|
468
|
+
lang={currentLocale}
|
469
|
+
homeLink={footerHomeLink || '/'}
|
470
|
+
slogan={
|
471
|
+
footerSlogan ||
|
472
|
+
getText(validLang, 'footer', 'slogan') ||
|
473
|
+
getText(validLang, 'footer', 'defaultSlogan')
|
474
|
+
}
|
475
|
+
company={footerCompany || siteName}
|
476
|
+
copyright={footerCopyright || getText(validLang, 'footer', 'copyright')}
|
477
|
+
inspirationalSlogan={
|
478
|
+
footerInspirationalSlogan || getText(validLang, 'footer', 'inspirationalSlogan')
|
479
|
+
}
|
480
|
+
aboutLink={footerAboutLink || '/about'}
|
481
|
+
contactLink={footerContactLink || '/contact'}
|
482
|
+
icp={footerIcp}
|
483
|
+
logo={footerLogo}
|
484
|
+
products={footerProducts}
|
485
|
+
termsLink={footerTermsLink}
|
486
|
+
privacyLink={footerPrivacyLink}
|
487
|
+
socialLinks={footerSocialLinks}
|
488
|
+
teamLink={footerTeamLink}
|
489
|
+
careersLink={footerCareersLink}
|
490
|
+
newsLink={footerNewsLink}
|
491
|
+
historyLink={footerHistoryLink}
|
492
|
+
partnersLink={footerPartnersLink}
|
493
|
+
blogLink={footerBlogLink}
|
494
|
+
faqLink={footerFaqLink}
|
495
|
+
mediaLink={footerMediaLink}
|
496
|
+
techStackLink={footerTechStackLink}
|
497
|
+
/>
|
498
|
+
)
|
499
|
+
}
|
500
|
+
|
501
|
+
<script>
|
502
|
+
// Handle sidebar toggle
|
503
|
+
const sidebarToggle = document.getElementById('sidebar-toggle');
|
504
|
+
const sidebar = document.getElementById('sidebar-mobile');
|
505
|
+
const sidebarOverlay = document.getElementById('sidebar-overlay');
|
506
|
+
|
507
|
+
function toggleSidebar() {
|
508
|
+
sidebar?.classList.toggle('cosy:hidden');
|
509
|
+
sidebarOverlay?.classList.toggle('cosy:hidden');
|
510
|
+
document.body.classList.toggle('cosy:overflow-hidden');
|
511
|
+
}
|
512
|
+
|
513
|
+
sidebarToggle?.addEventListener('click', toggleSidebar);
|
514
|
+
sidebarOverlay?.addEventListener('click', toggleSidebar);
|
515
|
+
</script>
|
516
|
+
</BaseLayout>
|