@bytesbrains/weblocks 0.4.0 → 0.6.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.
- package/AGENT.md +19 -3
- package/CATALOG.md +69 -4
- package/CHANGELOG.md +62 -0
- package/README.md +30 -4
- package/catalog.json +406 -9
- package/lib/blocks/brandIcons.d.ts +5 -0
- package/lib/blocks/brandIcons.js +18 -0
- package/lib/blocks/copyright.d.ts +2 -0
- package/lib/blocks/copyright.js +48 -0
- package/lib/blocks/experience.d.ts +2 -0
- package/lib/blocks/experience.js +78 -0
- package/lib/blocks/gallery.js +2 -1
- package/lib/blocks/hero.js +37 -4
- package/lib/blocks/profileHeader.d.ts +2 -0
- package/lib/blocks/profileHeader.js +124 -0
- package/lib/blocks/skills.d.ts +2 -0
- package/lib/blocks/skills.js +91 -0
- package/lib/blocks/socialLinks.js +71 -21
- package/lib/blocks/videoGallery.d.ts +2 -0
- package/lib/blocks/videoGallery.js +110 -0
- package/lib/blocks/videoUtil.d.ts +14 -0
- package/lib/blocks/videoUtil.js +30 -0
- package/lib/islands/carousel.d.ts +1 -0
- package/lib/islands/carousel.js +122 -0
- package/lib/islands/lightbox.d.ts +1 -0
- package/lib/islands/lightbox.js +139 -0
- package/lib/islands/resume.d.ts +1 -0
- package/lib/islands/resume.js +42 -0
- package/lib/islands/video.d.ts +1 -0
- package/lib/islands/video.js +48 -0
- package/lib/registry.js +12 -2
- package/lib/render.d.ts +6 -0
- package/lib/render.js +24 -3
- package/lib/types.d.ts +5 -0
- package/package.json +5 -3
package/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"package": "@bytesbrains/weblocks",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "Block catalog for @bytesbrains/weblocks. Send this to the model as its API reference; it composes a SiteManifest ({ meta, design, blocks[] }) using ONLY these block types. The engine then validates and renders it.",
|
|
6
6
|
"blockTypes": [
|
|
7
7
|
"app-shell",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"sidebar",
|
|
11
11
|
"hero",
|
|
12
12
|
"hero-app",
|
|
13
|
+
"profile-header",
|
|
14
|
+
"experience",
|
|
15
|
+
"skills",
|
|
13
16
|
"features",
|
|
14
17
|
"about",
|
|
15
18
|
"rich-text",
|
|
@@ -23,6 +26,7 @@
|
|
|
23
26
|
"gallery",
|
|
24
27
|
"carousel",
|
|
25
28
|
"video",
|
|
29
|
+
"video-gallery",
|
|
26
30
|
"map",
|
|
27
31
|
"timeline",
|
|
28
32
|
"tabs",
|
|
@@ -43,6 +47,7 @@
|
|
|
43
47
|
"legal",
|
|
44
48
|
"divider",
|
|
45
49
|
"spacer",
|
|
50
|
+
"copyright",
|
|
46
51
|
"footer"
|
|
47
52
|
],
|
|
48
53
|
"blocks": [
|
|
@@ -235,7 +240,7 @@
|
|
|
235
240
|
},
|
|
236
241
|
{
|
|
237
242
|
"type": "hero",
|
|
238
|
-
"description": "Top-of-page
|
|
243
|
+
"description": "Top-of-page hero: a big headline with optional eyebrow, subheading, and CTA — optionally over a full-bleed background image banner with a legibility overlay.",
|
|
239
244
|
"schema": {
|
|
240
245
|
"type": "object",
|
|
241
246
|
"properties": {
|
|
@@ -261,6 +266,30 @@
|
|
|
261
266
|
],
|
|
262
267
|
"default": "center"
|
|
263
268
|
},
|
|
269
|
+
"image": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"maxLength": 500,
|
|
272
|
+
"default": ""
|
|
273
|
+
},
|
|
274
|
+
"overlay": {
|
|
275
|
+
"enum": [
|
|
276
|
+
"scrim",
|
|
277
|
+
"dark",
|
|
278
|
+
"light",
|
|
279
|
+
"none"
|
|
280
|
+
],
|
|
281
|
+
"default": "scrim"
|
|
282
|
+
},
|
|
283
|
+
"minHeight": {
|
|
284
|
+
"enum": [
|
|
285
|
+
"auto",
|
|
286
|
+
"sm",
|
|
287
|
+
"md",
|
|
288
|
+
"lg",
|
|
289
|
+
"full"
|
|
290
|
+
],
|
|
291
|
+
"default": "auto"
|
|
292
|
+
},
|
|
264
293
|
"cta": {
|
|
265
294
|
"type": "object",
|
|
266
295
|
"properties": {
|
|
@@ -340,6 +369,227 @@
|
|
|
340
369
|
"additionalProperties": false
|
|
341
370
|
}
|
|
342
371
|
},
|
|
372
|
+
{
|
|
373
|
+
"type": "profile-header",
|
|
374
|
+
"description": "A résumé/CV header: avatar, name, role, location, a contact + social row, and optional Download-PDF and Share buttons.",
|
|
375
|
+
"schema": {
|
|
376
|
+
"type": "object",
|
|
377
|
+
"properties": {
|
|
378
|
+
"name": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"maxLength": 120,
|
|
381
|
+
"default": ""
|
|
382
|
+
},
|
|
383
|
+
"headline": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"maxLength": 160,
|
|
386
|
+
"default": ""
|
|
387
|
+
},
|
|
388
|
+
"location": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"maxLength": 120,
|
|
391
|
+
"default": ""
|
|
392
|
+
},
|
|
393
|
+
"avatar": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"maxLength": 500,
|
|
396
|
+
"default": ""
|
|
397
|
+
},
|
|
398
|
+
"summary": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"maxLength": 400,
|
|
401
|
+
"default": ""
|
|
402
|
+
},
|
|
403
|
+
"contacts": {
|
|
404
|
+
"type": "array",
|
|
405
|
+
"items": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"type": {
|
|
409
|
+
"enum": [
|
|
410
|
+
"email",
|
|
411
|
+
"phone",
|
|
412
|
+
"website",
|
|
413
|
+
"location",
|
|
414
|
+
"linkedin",
|
|
415
|
+
"github",
|
|
416
|
+
"twitter",
|
|
417
|
+
"x",
|
|
418
|
+
"custom"
|
|
419
|
+
],
|
|
420
|
+
"default": "custom"
|
|
421
|
+
},
|
|
422
|
+
"value": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"maxLength": 300,
|
|
425
|
+
"default": ""
|
|
426
|
+
},
|
|
427
|
+
"label": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"maxLength": 80,
|
|
430
|
+
"default": ""
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"required": [
|
|
434
|
+
"value"
|
|
435
|
+
],
|
|
436
|
+
"additionalProperties": false
|
|
437
|
+
},
|
|
438
|
+
"maxItems": 10
|
|
439
|
+
},
|
|
440
|
+
"showDownload": {
|
|
441
|
+
"type": "boolean",
|
|
442
|
+
"default": false
|
|
443
|
+
},
|
|
444
|
+
"downloadLabel": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"maxLength": 40,
|
|
447
|
+
"default": "Download PDF"
|
|
448
|
+
},
|
|
449
|
+
"showShare": {
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"default": false
|
|
452
|
+
},
|
|
453
|
+
"shareLabel": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"maxLength": 40,
|
|
456
|
+
"default": "Share"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"required": [
|
|
460
|
+
"name"
|
|
461
|
+
],
|
|
462
|
+
"additionalProperties": false
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"type": "experience",
|
|
467
|
+
"description": "A résumé section of dated entries (role, org, period, location, bullets). Reuse for Experience, Education, Certifications by changing the title.",
|
|
468
|
+
"schema": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"properties": {
|
|
471
|
+
"title": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"maxLength": 120,
|
|
474
|
+
"default": "Experience"
|
|
475
|
+
},
|
|
476
|
+
"items": {
|
|
477
|
+
"type": "array",
|
|
478
|
+
"items": {
|
|
479
|
+
"type": "object",
|
|
480
|
+
"properties": {
|
|
481
|
+
"role": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"maxLength": 120,
|
|
484
|
+
"default": ""
|
|
485
|
+
},
|
|
486
|
+
"org": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"maxLength": 120,
|
|
489
|
+
"default": ""
|
|
490
|
+
},
|
|
491
|
+
"period": {
|
|
492
|
+
"type": "string",
|
|
493
|
+
"maxLength": 60,
|
|
494
|
+
"default": ""
|
|
495
|
+
},
|
|
496
|
+
"location": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"maxLength": 80,
|
|
499
|
+
"default": ""
|
|
500
|
+
},
|
|
501
|
+
"url": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"maxLength": 500,
|
|
504
|
+
"default": ""
|
|
505
|
+
},
|
|
506
|
+
"summary": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"maxLength": 300,
|
|
509
|
+
"default": ""
|
|
510
|
+
},
|
|
511
|
+
"bullets": {
|
|
512
|
+
"type": "array",
|
|
513
|
+
"items": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"maxLength": 300,
|
|
516
|
+
"default": ""
|
|
517
|
+
},
|
|
518
|
+
"maxItems": 12
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": [
|
|
522
|
+
"role"
|
|
523
|
+
],
|
|
524
|
+
"additionalProperties": false
|
|
525
|
+
},
|
|
526
|
+
"maxItems": 24
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"additionalProperties": false
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"type": "skills",
|
|
534
|
+
"description": "Grouped skills shown as tags (with optional proficiency dots) or labelled level bars; also for languages and tools.",
|
|
535
|
+
"schema": {
|
|
536
|
+
"type": "object",
|
|
537
|
+
"properties": {
|
|
538
|
+
"title": {
|
|
539
|
+
"type": "string",
|
|
540
|
+
"maxLength": 120,
|
|
541
|
+
"default": "Skills"
|
|
542
|
+
},
|
|
543
|
+
"display": {
|
|
544
|
+
"enum": [
|
|
545
|
+
"tags",
|
|
546
|
+
"bars"
|
|
547
|
+
],
|
|
548
|
+
"default": "tags"
|
|
549
|
+
},
|
|
550
|
+
"groups": {
|
|
551
|
+
"type": "array",
|
|
552
|
+
"items": {
|
|
553
|
+
"type": "object",
|
|
554
|
+
"properties": {
|
|
555
|
+
"name": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"maxLength": 60,
|
|
558
|
+
"default": ""
|
|
559
|
+
},
|
|
560
|
+
"items": {
|
|
561
|
+
"type": "array",
|
|
562
|
+
"items": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"properties": {
|
|
565
|
+
"label": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"maxLength": 60,
|
|
568
|
+
"default": ""
|
|
569
|
+
},
|
|
570
|
+
"level": {
|
|
571
|
+
"type": "integer",
|
|
572
|
+
"minimum": 0,
|
|
573
|
+
"maximum": 5,
|
|
574
|
+
"default": 0
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"required": [
|
|
578
|
+
"label"
|
|
579
|
+
],
|
|
580
|
+
"additionalProperties": false
|
|
581
|
+
},
|
|
582
|
+
"maxItems": 40
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"additionalProperties": false
|
|
586
|
+
},
|
|
587
|
+
"maxItems": 10
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"additionalProperties": false
|
|
591
|
+
}
|
|
592
|
+
},
|
|
343
593
|
{
|
|
344
594
|
"type": "features",
|
|
345
595
|
"description": "A grid of value propositions, each with an optional icon/emoji, a title, and a short line of text.",
|
|
@@ -1030,6 +1280,73 @@
|
|
|
1030
1280
|
"additionalProperties": false
|
|
1031
1281
|
}
|
|
1032
1282
|
},
|
|
1283
|
+
{
|
|
1284
|
+
"type": "video-gallery",
|
|
1285
|
+
"description": "A grid or carousel of click-to-play video cards (YouTube/Vimeo/file); each loads its player inline on click (a lightweight facade — no heavy iframes up front).",
|
|
1286
|
+
"schema": {
|
|
1287
|
+
"type": "object",
|
|
1288
|
+
"properties": {
|
|
1289
|
+
"title": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"maxLength": 120,
|
|
1292
|
+
"default": ""
|
|
1293
|
+
},
|
|
1294
|
+
"layout": {
|
|
1295
|
+
"enum": [
|
|
1296
|
+
"grid",
|
|
1297
|
+
"carousel"
|
|
1298
|
+
],
|
|
1299
|
+
"default": "grid"
|
|
1300
|
+
},
|
|
1301
|
+
"columns": {
|
|
1302
|
+
"type": "integer",
|
|
1303
|
+
"enum": [
|
|
1304
|
+
2,
|
|
1305
|
+
3,
|
|
1306
|
+
4
|
|
1307
|
+
],
|
|
1308
|
+
"default": 3
|
|
1309
|
+
},
|
|
1310
|
+
"items": {
|
|
1311
|
+
"type": "array",
|
|
1312
|
+
"items": {
|
|
1313
|
+
"type": "object",
|
|
1314
|
+
"properties": {
|
|
1315
|
+
"provider": {
|
|
1316
|
+
"enum": [
|
|
1317
|
+
"youtube",
|
|
1318
|
+
"vimeo",
|
|
1319
|
+
"file"
|
|
1320
|
+
],
|
|
1321
|
+
"default": "youtube"
|
|
1322
|
+
},
|
|
1323
|
+
"src": {
|
|
1324
|
+
"type": "string",
|
|
1325
|
+
"maxLength": 500,
|
|
1326
|
+
"default": ""
|
|
1327
|
+
},
|
|
1328
|
+
"title": {
|
|
1329
|
+
"type": "string",
|
|
1330
|
+
"maxLength": 160,
|
|
1331
|
+
"default": ""
|
|
1332
|
+
},
|
|
1333
|
+
"poster": {
|
|
1334
|
+
"type": "string",
|
|
1335
|
+
"maxLength": 500,
|
|
1336
|
+
"default": ""
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"required": [
|
|
1340
|
+
"src"
|
|
1341
|
+
],
|
|
1342
|
+
"additionalProperties": false
|
|
1343
|
+
},
|
|
1344
|
+
"maxItems": 24
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
"additionalProperties": false
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1033
1350
|
{
|
|
1034
1351
|
"type": "map",
|
|
1035
1352
|
"description": "An embedded location map for a place or address query, with configurable zoom and height and a link to the full map.",
|
|
@@ -1737,7 +2054,7 @@
|
|
|
1737
2054
|
},
|
|
1738
2055
|
{
|
|
1739
2056
|
"type": "social-links",
|
|
1740
|
-
"description": "A
|
|
2057
|
+
"description": "A row or grid of links to social/contact profiles; each link picks a built-in brand icon by platform (or a custom emoji), shown labeled or icon-only.",
|
|
1741
2058
|
"schema": {
|
|
1742
2059
|
"type": "object",
|
|
1743
2060
|
"properties": {
|
|
@@ -1746,21 +2063,65 @@
|
|
|
1746
2063
|
"maxLength": 120,
|
|
1747
2064
|
"default": ""
|
|
1748
2065
|
},
|
|
2066
|
+
"layout": {
|
|
2067
|
+
"enum": [
|
|
2068
|
+
"row",
|
|
2069
|
+
"grid"
|
|
2070
|
+
],
|
|
2071
|
+
"default": "row"
|
|
2072
|
+
},
|
|
2073
|
+
"variant": {
|
|
2074
|
+
"enum": [
|
|
2075
|
+
"labeled",
|
|
2076
|
+
"icon"
|
|
2077
|
+
],
|
|
2078
|
+
"default": "labeled"
|
|
2079
|
+
},
|
|
2080
|
+
"align": {
|
|
2081
|
+
"enum": [
|
|
2082
|
+
"start",
|
|
2083
|
+
"center",
|
|
2084
|
+
"end"
|
|
2085
|
+
],
|
|
2086
|
+
"default": "center"
|
|
2087
|
+
},
|
|
1749
2088
|
"links": {
|
|
1750
2089
|
"type": "array",
|
|
1751
2090
|
"items": {
|
|
1752
2091
|
"type": "object",
|
|
1753
2092
|
"properties": {
|
|
1754
|
-
"
|
|
1755
|
-
"
|
|
1756
|
-
|
|
1757
|
-
|
|
2093
|
+
"platform": {
|
|
2094
|
+
"enum": [
|
|
2095
|
+
"x",
|
|
2096
|
+
"twitter",
|
|
2097
|
+
"instagram",
|
|
2098
|
+
"facebook",
|
|
2099
|
+
"linkedin",
|
|
2100
|
+
"youtube",
|
|
2101
|
+
"github",
|
|
2102
|
+
"tiktok",
|
|
2103
|
+
"whatsapp",
|
|
2104
|
+
"telegram",
|
|
2105
|
+
"discord",
|
|
2106
|
+
"mastodon",
|
|
2107
|
+
"rss",
|
|
2108
|
+
"email",
|
|
2109
|
+
"website",
|
|
2110
|
+
"phone",
|
|
2111
|
+
"custom"
|
|
2112
|
+
],
|
|
2113
|
+
"default": "custom"
|
|
1758
2114
|
},
|
|
1759
2115
|
"href": {
|
|
1760
2116
|
"type": "string",
|
|
1761
2117
|
"maxLength": 500,
|
|
1762
2118
|
"default": ""
|
|
1763
2119
|
},
|
|
2120
|
+
"label": {
|
|
2121
|
+
"type": "string",
|
|
2122
|
+
"maxLength": 60,
|
|
2123
|
+
"default": ""
|
|
2124
|
+
},
|
|
1764
2125
|
"icon": {
|
|
1765
2126
|
"type": "string",
|
|
1766
2127
|
"maxLength": 8,
|
|
@@ -1768,12 +2129,11 @@
|
|
|
1768
2129
|
}
|
|
1769
2130
|
},
|
|
1770
2131
|
"required": [
|
|
1771
|
-
"label",
|
|
1772
2132
|
"href"
|
|
1773
2133
|
],
|
|
1774
2134
|
"additionalProperties": false
|
|
1775
2135
|
},
|
|
1776
|
-
"maxItems":
|
|
2136
|
+
"maxItems": 20
|
|
1777
2137
|
}
|
|
1778
2138
|
},
|
|
1779
2139
|
"additionalProperties": false
|
|
@@ -1956,6 +2316,43 @@
|
|
|
1956
2316
|
"additionalProperties": false
|
|
1957
2317
|
}
|
|
1958
2318
|
},
|
|
2319
|
+
{
|
|
2320
|
+
"type": "copyright",
|
|
2321
|
+
"description": "A small copyright bar (© year holder + rights text) for the bottom of a page; the year auto-fills to the current year when left blank.",
|
|
2322
|
+
"schema": {
|
|
2323
|
+
"type": "object",
|
|
2324
|
+
"properties": {
|
|
2325
|
+
"holder": {
|
|
2326
|
+
"type": "string",
|
|
2327
|
+
"maxLength": 120,
|
|
2328
|
+
"default": ""
|
|
2329
|
+
},
|
|
2330
|
+
"year": {
|
|
2331
|
+
"type": "string",
|
|
2332
|
+
"maxLength": 24,
|
|
2333
|
+
"default": ""
|
|
2334
|
+
},
|
|
2335
|
+
"text": {
|
|
2336
|
+
"type": "string",
|
|
2337
|
+
"maxLength": 160,
|
|
2338
|
+
"default": "All rights reserved."
|
|
2339
|
+
},
|
|
2340
|
+
"showSymbol": {
|
|
2341
|
+
"type": "boolean",
|
|
2342
|
+
"default": true
|
|
2343
|
+
},
|
|
2344
|
+
"align": {
|
|
2345
|
+
"enum": [
|
|
2346
|
+
"start",
|
|
2347
|
+
"center",
|
|
2348
|
+
"end"
|
|
2349
|
+
],
|
|
2350
|
+
"default": "center"
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
"additionalProperties": false
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
1959
2356
|
{
|
|
1960
2357
|
"type": "footer",
|
|
1961
2358
|
"description": "Page footer: brand, tagline, a row of links, and a copyright line. Place last.",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand icon path data (24×24 viewBox, fill=currentColor). Sourced from
|
|
3
|
+
* simple-icons (CC0 / public domain). Generated from source — do not edit by hand.
|
|
4
|
+
*/
|
|
5
|
+
export const BRAND_ICON_PATHS = {
|
|
6
|
+
discord: "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",
|
|
7
|
+
facebook: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
|
|
8
|
+
github: "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",
|
|
9
|
+
instagram: "M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077",
|
|
10
|
+
linkedin: "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",
|
|
11
|
+
mastodon: "M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z",
|
|
12
|
+
rss: "M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z",
|
|
13
|
+
telegram: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
|
|
14
|
+
tiktok: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",
|
|
15
|
+
whatsapp: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",
|
|
16
|
+
x: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z",
|
|
17
|
+
youtube: "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",
|
|
18
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `copyright` — a small "© year holder · rights" bar for the very bottom of a
|
|
3
|
+
* page. A standalone alternative to the `footer` block's copyright line: pair it
|
|
4
|
+
* with `legal` and `social-links` for a lightweight footer, or use it under the
|
|
5
|
+
* full `footer`. The year auto-fills to the current year when left blank (or give
|
|
6
|
+
* an explicit year / range like "2020–2026"). Static brick.
|
|
7
|
+
*/
|
|
8
|
+
import { escapeHtml } from '../schema.js';
|
|
9
|
+
const schema = {
|
|
10
|
+
holder: { kind: 'string', default: '', max: 120 }, // e.g. "Acme Inc."
|
|
11
|
+
year: { kind: 'string', default: '', max: 24 }, // blank → current year
|
|
12
|
+
text: { kind: 'string', default: 'All rights reserved.', max: 160 }, // trailing note
|
|
13
|
+
showSymbol: { kind: 'boolean', default: true }, // the © symbol
|
|
14
|
+
align: { kind: 'enum', values: ['start', 'center', 'end'], default: 'center' },
|
|
15
|
+
};
|
|
16
|
+
const css = `
|
|
17
|
+
.blk-copyright{padding:var(--space) var(--space);background:var(--bg);color:var(--muted);border-top:1px solid color-mix(in srgb,var(--text) 10%,transparent)}
|
|
18
|
+
.blk-copyright .wrap{max-width:1080px;margin:0 auto;font-size:var(--fs-base)}
|
|
19
|
+
.blk-copyright.align-center .wrap{text-align:center}
|
|
20
|
+
.blk-copyright.align-end .wrap{text-align:right}
|
|
21
|
+
.blk-copyright p{margin:0}
|
|
22
|
+
`.trim();
|
|
23
|
+
function render(config) {
|
|
24
|
+
const holder = config.holder;
|
|
25
|
+
const yearIn = String(config.year ?? '').trim();
|
|
26
|
+
const year = yearIn || String(new Date().getFullYear()); // blank → current year
|
|
27
|
+
const text = config.text;
|
|
28
|
+
const symbol = config.showSymbol !== false;
|
|
29
|
+
const align = ['start', 'center', 'end'].includes(config.align) ? config.align : 'center';
|
|
30
|
+
let line = `${symbol ? '© ' : ''}${escapeHtml(year)}`;
|
|
31
|
+
if (holder)
|
|
32
|
+
line += ` ${escapeHtml(holder)}`;
|
|
33
|
+
// Add the note, but don't double punctuation when the holder ends in "." (Inc./Co./Ltd.).
|
|
34
|
+
if (text)
|
|
35
|
+
line += `${/[.!?]$/.test(line) ? ' ' : '. '}${escapeHtml(text)}`;
|
|
36
|
+
return `<footer class="blk-copyright align-${align}" aria-label="Copyright">
|
|
37
|
+
<div class="wrap">
|
|
38
|
+
<p>${line}</p>
|
|
39
|
+
</div>
|
|
40
|
+
</footer>`;
|
|
41
|
+
}
|
|
42
|
+
export const copyright = {
|
|
43
|
+
type: 'copyright',
|
|
44
|
+
description: 'A small copyright bar (© year holder + rights text) for the bottom of a page; the year auto-fills to the current year when left blank.',
|
|
45
|
+
schema,
|
|
46
|
+
css,
|
|
47
|
+
render,
|
|
48
|
+
};
|