maverick-wave-astro 1.26.0 → 1.28.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.
@@ -0,0 +1,115 @@
1
+ ---
2
+ // The link page behind a profile: who this is, then one card per link with the
3
+ // imprint always last. The only section of its page, under the site's own
4
+ // header with the way back to the start.
5
+ import { bioHref, type BioLink, isUpload } from '../dist/bio.js';
6
+ import { config } from '../dist/config.js';
7
+ import { withBase } from '../dist/path.js';
8
+ import { SOCIAL_ICONS } from '../dist/social.js';
9
+ import LinkCard from './LinkCard.astro';
10
+ import Picture from './Picture.astro';
11
+ import type { SocialLink } from './SocialLinks.astro';
12
+
13
+ interface Props {
14
+ name: string;
15
+ // A werkbank upload without extension, or a file from public/ with one
16
+ avatar?: string;
17
+ tagline?: string;
18
+ // What is true today - free places, back from holiday on the 3rd
19
+ status?: string;
20
+ links: readonly BioLink[];
21
+ socials?: readonly SocialLink[];
22
+ linksLabel?: string;
23
+ imprintLabel?: string;
24
+ imprintHref?: string;
25
+ }
26
+
27
+ const german = config.site.lang.startsWith('de');
28
+
29
+ const {
30
+ name,
31
+ avatar,
32
+ tagline,
33
+ status,
34
+ links,
35
+ socials = [],
36
+ linksLabel = 'Links',
37
+ imprintLabel = german ? 'Impressum' : 'Imprint',
38
+ imprintHref = withBase('/impressum'),
39
+ } = Astro.props;
40
+ ---
41
+
42
+ <section class="mw-section mw-bio">
43
+ <div class="mw-container">
44
+ <div class="mw-bio-head">
45
+ {
46
+ avatar && (
47
+ <div class="mw-bio-avatar">
48
+ {isUpload(avatar) ? (
49
+ <Picture src={avatar} alt="" sizes="104px" widths={[260]} eager />
50
+ ) : (
51
+ <img src={withBase(avatar)} alt="" width="104" height="104" />
52
+ )}
53
+ </div>
54
+ )
55
+ }
56
+ <h1 class="mw-bio-name">{name}</h1>
57
+ {tagline && <p class="mw-bio-tagline">{tagline}</p>}
58
+ {status && <p class="mw-bio-status">{status}</p>}
59
+ {
60
+ socials.length > 0 && (
61
+ <ul class="mw-bio-socials">
62
+ {socials.map(social => {
63
+ const icon = SOCIAL_ICONS[social.type];
64
+ const external = /^https?:/.test(social.href);
65
+ return (
66
+ <li>
67
+ <a
68
+ class="mw-bio-social"
69
+ href={social.href}
70
+ aria-label={social.label}
71
+ target={external ? '_blank' : undefined}
72
+ rel={external ? 'noopener noreferrer' : undefined}
73
+ >
74
+ <svg
75
+ xmlns="http://www.w3.org/2000/svg"
76
+ viewBox={icon.viewBox}
77
+ width="1em"
78
+ height="1em"
79
+ fill="currentColor"
80
+ aria-hidden="true"
81
+ focusable="false"
82
+ set:html={icon.body}
83
+ />
84
+ </a>
85
+ </li>
86
+ );
87
+ })}
88
+ </ul>
89
+ )
90
+ }
91
+ </div>
92
+
93
+ <nav class="mw-bio-links" aria-label={linksLabel}>
94
+ {
95
+ links.map(link => (
96
+ <>
97
+ {link.heading && <p class="mw-bio-label">{link.heading}</p>}
98
+ <LinkCard
99
+ href={bioHref(link.href)}
100
+ title={link.title}
101
+ subtitle={link.subtitle}
102
+ kicker={link.highlight ? link.kicker : undefined}
103
+ media={link.media}
104
+ icon={link.icon}
105
+ image={link.image}
106
+ featured={link.highlight}
107
+ />
108
+ </>
109
+ ))
110
+ }
111
+ <slot />
112
+ <LinkCard href={imprintHref} title={imprintLabel} quiet />
113
+ </nav>
114
+ </div>
115
+ </section>
@@ -1,54 +1,74 @@
1
1
  ---
2
2
  // Imprint from imprint.json as a card - the way the product sites show it.
3
- // The site brings the page frame and heading itself.
3
+ // The site brings the page frame and heading itself. The headings come from
4
+ // here so every site reads the same; a topic left empty is left out.
4
5
  import { config } from '../dist/config.js';
5
6
  import PostalAddress from './PostalAddress.astro';
6
7
 
7
- interface AddressNotes {
8
- noVisitors?: boolean;
9
- noParcels?: boolean;
10
- }
11
-
12
8
  interface Props {
13
9
  imprint: {
14
- subtitle: string;
15
10
  address: { company?: string; name: string; street: string; city: string };
16
- addressNotes?: AddressNotes;
17
- contactTitle: string;
18
- vatIdTitle?: string;
19
- vatId?: string;
20
- disputeTitle: string;
21
- disputeText: string;
22
- licensesTitle?: string;
23
- licensesText?: string;
11
+ addressNotes?: { noVisitors?: boolean; noParcels?: boolean };
12
+ // What the trade adds: profession, chamber, permit, register, representation
13
+ sections?: readonly { title: string; lines: readonly string[] }[];
14
+ vat?: string;
15
+ responsible?: string;
16
+ dispute: string;
17
+ credits?: readonly string[];
24
18
  };
25
19
  mail: { href: string; text: string };
26
- addressNoteTexts?: Partial<Record<keyof AddressNotes, string>>;
20
+ phone?: { href: string; text: string };
27
21
  class?: string;
28
22
  }
29
23
 
30
- const german = config.site.lang.startsWith('de');
24
+ const text = config.site.lang.startsWith('de')
25
+ ? {
26
+ address: 'Angaben gemäß § 5 DDG',
27
+ contact: 'Kontakt',
28
+ phone: 'Telefon',
29
+ mail: 'E-Mail',
30
+ vat: 'Umsatzsteuer',
31
+ responsible: 'Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV',
32
+ dispute: 'Verbraucherstreitbeilegung',
33
+ credits: 'Lizenzen und Nachweise',
34
+ noVisitors:
35
+ 'Kein Publikumsverkehr - Besuche nur nach Terminvereinbarung.',
36
+ noParcels: 'Keine Annahme von Paketen und Warensendungen.',
37
+ }
38
+ : {
39
+ address: 'Information according to Section 5 DDG',
40
+ contact: 'Contact',
41
+ phone: 'Phone',
42
+ mail: 'Email',
43
+ vat: 'VAT',
44
+ responsible: 'Responsible for content according to Section 18(2) MStV',
45
+ dispute: 'Consumer dispute resolution',
46
+ credits: 'Licenses and credits',
47
+ noVisitors: 'No walk-in visitors - visits by appointment only.',
48
+ noParcels: 'Parcels and goods deliveries are not accepted.',
49
+ };
31
50
 
32
- const { imprint, mail, addressNoteTexts = {}, class: className } = Astro.props;
51
+ const { imprint, mail, phone, class: className } = Astro.props;
33
52
 
34
53
  // Letters are never excluded here - a note against mail would let the address
35
54
  // count as not serviceable (§ 5 DDG).
36
- const noteTexts = {
37
- noVisitors: german
38
- ? 'Kein Publikumsverkehr - Besuche nur nach Terminvereinbarung.'
39
- : 'No walk-in visitors - visits by appointment only.',
40
- noParcels: german
41
- ? 'Keine Annahme von Paketen und Warensendungen.'
42
- : 'Parcels and goods deliveries are not accepted.',
43
- ...addressNoteTexts,
44
- };
45
55
  const notes = (['noVisitors', 'noParcels'] as const)
46
56
  .filter(key => imprint.addressNotes?.[key])
47
- .map(key => noteTexts[key]);
57
+ .map(key => text[key]);
58
+
59
+ const sections = [
60
+ ...(imprint.sections ?? []),
61
+ { title: text.vat, lines: [imprint.vat] },
62
+ { title: text.responsible, lines: [imprint.responsible] },
63
+ { title: text.dispute, lines: [imprint.dispute] },
64
+ { title: text.credits, lines: imprint.credits ?? [] },
65
+ ]
66
+ .map(section => ({ ...section, lines: section.lines.filter(Boolean) }))
67
+ .filter(section => section.lines.length > 0);
48
68
  ---
49
69
 
50
70
  <div class:list={['mw-card mw-card-simple mw-prose', className]}>
51
- <h2>{imprint.subtitle}</h2>
71
+ <h2>{text.address}</h2>
52
72
  <PostalAddress address={imprint.address} />
53
73
  {
54
74
  notes.length > 0 && (
@@ -63,27 +83,32 @@ const notes = (['noVisitors', 'noParcels'] as const)
63
83
  )
64
84
  }
65
85
 
66
- <h2>{imprint.contactTitle}</h2>
67
- <p><a href={mail.href}>{mail.text}</a></p>
86
+ <h2>{text.contact}</h2>
87
+ <p>
88
+ {
89
+ phone && (
90
+ <Fragment>
91
+ {text.phone}: <a href={phone.href}>{phone.text}</a>
92
+ <br />
93
+ </Fragment>
94
+ )
95
+ }
96
+ {text.mail}: <a href={mail.href}>{mail.text}</a>
97
+ </p>
68
98
 
69
99
  {
70
- imprint.vatId && (
100
+ sections.map(section => (
71
101
  <Fragment>
72
- <h2>{imprint.vatIdTitle}</h2>
73
- <p>{imprint.vatId}</p>
102
+ <h2>{section.title}</h2>
103
+ <p>
104
+ {section.lines.map((line, index) => (
105
+ <Fragment>
106
+ {index > 0 && <br />}
107
+ {line}
108
+ </Fragment>
109
+ ))}
110
+ </p>
74
111
  </Fragment>
75
- )
76
- }
77
-
78
- <h2>{imprint.disputeTitle}</h2>
79
- <p>{imprint.disputeText}</p>
80
-
81
- {
82
- imprint.licensesTitle && (
83
- <Fragment>
84
- <h2>{imprint.licensesTitle}</h2>
85
- <p>{imprint.licensesText}</p>
86
- </Fragment>
87
- )
112
+ ))
88
113
  }
89
114
  </div>
@@ -0,0 +1,103 @@
1
+ ---
2
+ // One link as a card. In front an icon, a logo or a small photo, or a wide
3
+ // photo above the text; a title alone sits centred, a second line ranges left.
4
+ import {
5
+ isExternal,
6
+ isUpload,
7
+ LINK_ICONS,
8
+ type LinkIcon,
9
+ type LinkMedia,
10
+ } from '../dist/bio.js';
11
+ import { config } from '../dist/config.js';
12
+ import { withBase } from '../dist/path.js';
13
+ import Icon from './Icon.astro';
14
+ import Picture from './Picture.astro';
15
+
16
+ interface Props {
17
+ href: string;
18
+ title: string;
19
+ subtitle?: string;
20
+ kicker?: string;
21
+ media?: LinkMedia;
22
+ icon?: LinkIcon;
23
+ // A werkbank upload without extension, or a file from public/ with one
24
+ image?: string;
25
+ // The one link that matters most - one per page
26
+ featured?: boolean;
27
+ // The imprint at the bottom: flat, still at full contrast
28
+ quiet?: boolean;
29
+ newTabLabel?: string;
30
+ }
31
+
32
+ const german = config.site.lang.startsWith('de');
33
+
34
+ const {
35
+ href,
36
+ title,
37
+ subtitle,
38
+ kicker,
39
+ media,
40
+ icon,
41
+ image,
42
+ featured = false,
43
+ quiet = false,
44
+ newTabLabel = german ? '(öffnet einen neuen Tab)' : '(opens in a new tab)',
45
+ } = Astro.props;
46
+
47
+ const external = isExternal(href);
48
+ const glyph = media === 'icon' && icon ? LINK_ICONS[icon] : undefined;
49
+ const cover = media === 'cover' ? image : undefined;
50
+ const thumb = media === 'logo' || media === 'photo' ? image : undefined;
51
+ ---
52
+
53
+ <a
54
+ class:list={[
55
+ 'mw-card mw-card-link',
56
+ featured && 'mw-card-link-featured',
57
+ quiet && 'mw-card-link-quiet',
58
+ ]}
59
+ href={href}
60
+ target={external ? '_blank' : undefined}
61
+ rel={external ? 'noopener' : undefined}
62
+ >
63
+ {
64
+ cover && (
65
+ <span class="mw-card-link-cover">
66
+ {isUpload(cover) ? (
67
+ <Picture
68
+ src={cover}
69
+ alt=""
70
+ sizes="(width >= 30rem) 30rem, 100vw"
71
+ widths={[500, 1000]}
72
+ />
73
+ ) : (
74
+ <img src={withBase(cover)} alt="" loading="lazy" />
75
+ )}
76
+ </span>
77
+ )
78
+ }
79
+ {
80
+ glyph && (
81
+ <span class="mw-card-link-media">
82
+ <Icon svg={glyph} size={22} />
83
+ </span>
84
+ )
85
+ }
86
+ {
87
+ thumb && (
88
+ <span class={`mw-card-link-media mw-card-link-media-${media}`}>
89
+ {isUpload(thumb) ? (
90
+ <Picture src={thumb} alt="" sizes="56px" widths={[260]} />
91
+ ) : (
92
+ <img src={withBase(thumb)} alt="" loading="lazy" />
93
+ )}
94
+ </span>
95
+ )
96
+ }
97
+ <span class="mw-card-link-body">
98
+ {kicker && <span class="mw-card-link-kicker">{kicker}</span>}
99
+ <span class="mw-card-link-title">{title}</span>
100
+ {subtitle && <span class="mw-card-link-subtitle">{subtitle}</span>}
101
+ {external && <span class="mw-sr-only">{newTabLabel}</span>}
102
+ </span>
103
+ </a>
package/dist/bio.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ export declare const LINK_ICONS: {
2
+ readonly euro: "<path d=\"M18 7a6.5 6.5 0 1 0 0 10\"/><path d=\"M6 10.5h8M6 13.5h8\"/>";
3
+ readonly calendar: "<rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2.4\"/><path d=\"M3 10h18M8 3v4M16 3v4\"/>";
4
+ readonly 'calendar-check': "<rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2.4\"/><path d=\"M3 10h18M8 3v4M16 3v4M9 15.5l2 2 4-4\"/>";
5
+ readonly clock: "<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 7.5V12l3 2\"/>";
6
+ readonly 'map-pin': "<path d=\"M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11Z\"/><circle cx=\"12\" cy=\"10\" r=\"2.4\"/>";
7
+ readonly phone: "<path d=\"M5 3.5h3.5l1.8 4.5-2.3 1.4a11 11 0 0 0 6.6 6.6l1.4-2.3 4.5 1.8V19a2 2 0 0 1-2 2A16.5 16.5 0 0 1 3 5.5a2 2 0 0 1 2-2Z\"/>";
8
+ readonly mail: "<rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2.4\"/><path d=\"m3.5 6.5 8.5 6.5 8.5-6.5\"/>";
9
+ readonly chat: "<path d=\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\"/>";
10
+ readonly person: "<circle cx=\"12\" cy=\"8\" r=\"4\"/><path d=\"M4.5 20.5a7.5 7.5 0 0 1 15 0\"/>";
11
+ readonly people: "<path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8\"/>";
12
+ readonly star: "<path d=\"m12 3.8 2.5 5.1 5.6.8-4 4 .9 5.6L12 16.6l-5 2.7.9-5.6-4-4 5.6-.8Z\"/>";
13
+ readonly sparkle: "<path d=\"M12 2.8 13.9 9l6.2 1.9-6.2 1.9L12 19l-1.9-6.2L3.9 10.9 10.1 9 12 2.8Z\"/><path d=\"M19 16.5l.7 2.2 2.2.7-2.2.7-.7 2.2-.7-2.2-2.2-.7 2.2-.7.7-2.2Z\"/>";
14
+ readonly heart: "<path d=\"M19 14c1.5-1.5 3-3.2 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.8 0-3 .5-4.5 2-1.5-1.5-2.7-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4 3 5.5l7 7Z\"/>";
15
+ readonly gift: "<rect x=\"3\" y=\"8\" width=\"18\" height=\"4\" rx=\"1\"/><path d=\"M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7\"/><path d=\"M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5\"/>";
16
+ readonly ticket: "<path d=\"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z\"/><path d=\"M13 5v2M13 11v2M13 17v2\"/>";
17
+ readonly bag: "<path d=\"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z\"/><path d=\"M3 6h18M16 10a4 4 0 0 1-8 0\"/>";
18
+ readonly utensils: "<path d=\"M3 2v7a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V2M7 2v20\"/><path d=\"M21 15V2a5 5 0 0 0-5 5v6a2 2 0 0 0 2 2h3Zm0 0v7\"/>";
19
+ readonly music: "<path d=\"M9 18V5l12-2v13\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/><circle cx=\"18\" cy=\"16\" r=\"3\"/>";
20
+ readonly mic: "<rect x=\"9\" y=\"2\" width=\"6\" height=\"13\" rx=\"3\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2M12 19v3\"/>";
21
+ readonly play: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m10 8 6 4-6 4Z\"/>";
22
+ readonly camera: "<path d=\"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3Z\"/><circle cx=\"12\" cy=\"13\" r=\"3\"/>";
23
+ readonly book: "<path d=\"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2Z\"/><path d=\"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7Z\"/>";
24
+ readonly file: "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4M16 13H8M16 17H8M10 9H8\"/>";
25
+ readonly wrench: "<path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9Z\"/>";
26
+ readonly globe: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20M2 12h20\"/>";
27
+ readonly info: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4M12 8h.01\"/>";
28
+ readonly link: "<path d=\"M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7\"/><path d=\"M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7\"/>";
29
+ };
30
+ export type LinkIcon = keyof typeof LINK_ICONS;
31
+ /** What sits in front of the text: an icon, a logo, a small photo or a wide one above. */
32
+ export type LinkMedia = 'icon' | 'logo' | 'photo' | 'cover';
33
+ export type BioLink = {
34
+ title: string;
35
+ subtitle?: string;
36
+ href: string;
37
+ media?: LinkMedia;
38
+ icon?: LinkIcon;
39
+ /** /images/uploads/<hash> from the werkbank, or a file from public/ with its extension. */
40
+ image?: string;
41
+ highlight?: boolean;
42
+ kicker?: string;
43
+ /** A label above this link that starts a new group. */
44
+ heading?: string;
45
+ };
46
+ export type BioContent = {
47
+ tagline?: string;
48
+ status?: string;
49
+ links: readonly BioLink[];
50
+ };
51
+ export declare const isExternal: (href: string) => boolean;
52
+ export declare const isUpload: (src: string) => boolean;
53
+ export declare const bioHref: (href: string) => string;
package/dist/bio.js ADDED
@@ -0,0 +1,45 @@
1
+ // The link page behind an Instagram profile: what its werkbank section holds,
2
+ // the icons a card can carry and where a link written there really leads.
3
+ import { PACKAGE_ICONS } from "./icons.js";
4
+ import { withBase } from "./path.js";
5
+ // Stroke icons on the 24 grid of Icon.astro, shapes after Lucide (ISC). The
6
+ // keys are the enum of schemas/bio.schema.json - a test keeps both in step.
7
+ export const LINK_ICONS = {
8
+ euro: '<path d="M18 7a6.5 6.5 0 1 0 0 10"/><path d="M6 10.5h8M6 13.5h8"/>',
9
+ calendar: PACKAGE_ICONS.calendar,
10
+ 'calendar-check': PACKAGE_ICONS['calendar-check'],
11
+ clock: PACKAGE_ICONS.clock,
12
+ 'map-pin': PACKAGE_ICONS['map-pin'],
13
+ phone: PACKAGE_ICONS.phone,
14
+ mail: PACKAGE_ICONS.mail,
15
+ chat: '<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>',
16
+ person: PACKAGE_ICONS.person,
17
+ people: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8"/>',
18
+ star: PACKAGE_ICONS.star,
19
+ sparkle: PACKAGE_ICONS.sparkle,
20
+ heart: '<path d="M19 14c1.5-1.5 3-3.2 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.8 0-3 .5-4.5 2-1.5-1.5-2.7-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4 3 5.5l7 7Z"/>',
21
+ gift: '<rect x="3" y="8" width="18" height="4" rx="1"/><path d="M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7"/><path d="M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5"/>',
22
+ ticket: '<path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/><path d="M13 5v2M13 11v2M13 17v2"/>',
23
+ bag: '<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"/><path d="M3 6h18M16 10a4 4 0 0 1-8 0"/>',
24
+ utensils: '<path d="M3 2v7a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V2M7 2v20"/><path d="M21 15V2a5 5 0 0 0-5 5v6a2 2 0 0 0 2 2h3Zm0 0v7"/>',
25
+ music: '<path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>',
26
+ mic: '<rect x="9" y="2" width="6" height="13" rx="3"/><path d="M19 10v2a7 7 0 0 1-14 0v-2M12 19v3"/>',
27
+ play: '<circle cx="12" cy="12" r="10"/><path d="m10 8 6 4-6 4Z"/>',
28
+ camera: '<path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3Z"/><circle cx="12" cy="13" r="3"/>',
29
+ book: '<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2Z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7Z"/>',
30
+ file: '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M16 13H8M16 17H8M10 9H8"/>',
31
+ wrench: '<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9Z"/>',
32
+ globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20M2 12h20"/>',
33
+ info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/>',
34
+ link: '<path d="M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7"/><path d="M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7"/>',
35
+ };
36
+ export const isExternal = (href) => /^https?:\/\//.test(href);
37
+ // An upload is stored without extension, the build writes its sizes.
38
+ export const isUpload = (src) => !/\.[a-z0-9]+$/i.test(src);
39
+ // "#preise" in the werkbank means the section on the start page - the link
40
+ // page is a page of its own, where that anchor does not exist.
41
+ export const bioHref = (href) => {
42
+ if (href.startsWith('#'))
43
+ return `${withBase('/')}${href}`;
44
+ return href.startsWith('/') ? withBase(href) : href;
45
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maverick-wave-astro",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "Shared frame for static Astro homepages built with MaverickWave: layout, SEO, design variants, schedule, building blocks.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "astro": "^7.2.0",
56
- "maverick-wave": "^6.15.0",
56
+ "maverick-wave": "^6.16.0",
57
57
  "vite": "^8.0.0"
58
58
  },
59
59
  "dependencies": {
@@ -69,7 +69,7 @@
69
69
  "eslint-plugin-astro": "^1.5.0",
70
70
  "eslint-plugin-simple-import-sort": "^12.1.1",
71
71
  "globals": "^16.5.0",
72
- "maverick-wave": "^6.15.0",
72
+ "maverick-wave": "^6.16.0",
73
73
  "playwright-core": "^1.64.0",
74
74
  "prettier": "^3.6.2",
75
75
  "prettier-plugin-astro": "^0.14.1",
@@ -0,0 +1,159 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Link-Seite",
4
+ "description": "Die Seite /bio, die du in deinem Instagram-Profil verlinkst: dein Name, ein Satz über dich und darunter deine Links als große Karten. Das Impressum steht immer ganz unten, darum kümmert sich die Seite.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["links"],
8
+ "properties": {
9
+ "tagline": {
10
+ "title": "Satz unter deinem Namen",
11
+ "description": "Wer du bist und was du machst, in einem Satz.",
12
+ "type": "string",
13
+ "maxLength": 160,
14
+ "x-widget": "textarea"
15
+ },
16
+ "status": {
17
+ "title": "Hinweis in der Pille",
18
+ "description": "Was gerade gilt, etwa „Noch 2 Plätze im November“. Leer lassen, wenn es nichts gibt - und löschen, sobald es nicht mehr stimmt.",
19
+ "type": "string",
20
+ "maxLength": 60
21
+ },
22
+ "links": {
23
+ "title": "Links",
24
+ "description": "Von oben nach unten in dieser Reihenfolge, mit den Pfeilen verschiebst du sie. Fünf bis acht sind genug - wer bei Instagram auf deinen Link tippt, will schnell etwas finden.",
25
+ "type": "array",
26
+ "maxItems": 12,
27
+ "x-item-title": "{title}",
28
+ "items": {
29
+ "title": "Link",
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["title", "href"],
33
+ "properties": {
34
+ "title": {
35
+ "title": "Titel",
36
+ "description": "Kurz und fett, etwa „Preise“ oder „Probestunde buchen“.",
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 60
40
+ },
41
+ "subtitle": {
42
+ "title": "Zweite Zeile",
43
+ "description": "Ein Satz, was dort wartet. Ohne zweite Zeile steht der Titel in der Mitte der Karte.",
44
+ "type": "string",
45
+ "maxLength": 90
46
+ },
47
+ "href": {
48
+ "title": "Wohin der Link führt",
49
+ "description": "Ein Abschnitt deiner Startseite wie „#preise“, eine Seite wie „/kurse“, eine Internetadresse wie „https://…“, „mailto:“ mit E-Mail-Adresse oder „tel:“ mit Nummer. Andere Internetseiten öffnen sich in einem neuen Tab.",
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "pattern": "^(https?://|mailto:|tel:|#|/)",
53
+ "x-translate": false
54
+ },
55
+ "media": {
56
+ "title": "Vorne in der Karte",
57
+ "type": "string",
58
+ "enum": ["icon", "logo", "photo", "cover"],
59
+ "x-labels": {
60
+ "icon": "Ein Symbol",
61
+ "logo": "Ein Logo",
62
+ "photo": "Ein kleines Foto",
63
+ "cover": "Ein großes Foto über dem Text"
64
+ },
65
+ "x-empty": "Nichts"
66
+ },
67
+ "icon": {
68
+ "title": "Symbol",
69
+ "type": "string",
70
+ "enum": [
71
+ "euro",
72
+ "calendar",
73
+ "calendar-check",
74
+ "clock",
75
+ "map-pin",
76
+ "phone",
77
+ "mail",
78
+ "chat",
79
+ "person",
80
+ "people",
81
+ "star",
82
+ "sparkle",
83
+ "heart",
84
+ "gift",
85
+ "ticket",
86
+ "bag",
87
+ "utensils",
88
+ "music",
89
+ "mic",
90
+ "play",
91
+ "camera",
92
+ "book",
93
+ "file",
94
+ "wrench",
95
+ "globe",
96
+ "info",
97
+ "link"
98
+ ],
99
+ "x-labels": {
100
+ "euro": "Euro - Preise",
101
+ "calendar": "Kalender - Termine",
102
+ "calendar-check": "Kalender mit Haken - buchen",
103
+ "clock": "Uhr - Öffnungszeiten",
104
+ "map-pin": "Stecknadel - Anfahrt",
105
+ "phone": "Telefon",
106
+ "mail": "Brief - E-Mail",
107
+ "chat": "Sprechblase - Nachricht",
108
+ "person": "Person - über mich",
109
+ "people": "Zwei Personen - Team, Gruppe",
110
+ "star": "Stern - Bewertungen",
111
+ "sparkle": "Funkeln - neu",
112
+ "heart": "Herz",
113
+ "gift": "Geschenk - Gutschein",
114
+ "ticket": "Eintrittskarte",
115
+ "bag": "Tasche - bestellen, Shop",
116
+ "utensils": "Besteck - Speisekarte",
117
+ "music": "Noten - Musik",
118
+ "mic": "Mikrofon - Stimme, Podcast",
119
+ "play": "Abspielen - Video",
120
+ "camera": "Kamera - Fotos",
121
+ "book": "Buch - Blog, Kurs",
122
+ "file": "Dokument - PDF, Formular",
123
+ "wrench": "Werkzeug",
124
+ "globe": "Weltkugel - Website",
125
+ "info": "Info",
126
+ "link": "Kette - Link"
127
+ },
128
+ "x-show-if": { "media": "icon" }
129
+ },
130
+ "image": {
131
+ "title": "Bild",
132
+ "description": "Ein Logo am besten quadratisch, ein großes Foto am besten quer.",
133
+ "type": "string",
134
+ "x-widget": "image",
135
+ "x-show-if": { "media": ["logo", "photo", "cover"] }
136
+ },
137
+ "highlight": {
138
+ "title": "Hervorheben",
139
+ "description": "Für den einen Link, der am meisten zählt: farbig gefüllt, mit einem Lichtstreif beim Öffnen. Am besten ganz oben.",
140
+ "type": "boolean"
141
+ },
142
+ "kicker": {
143
+ "title": "Kleine Zeile über dem Titel",
144
+ "description": "Ein, zwei Wörter, etwa „Neu“ oder „Nur im November“.",
145
+ "type": "string",
146
+ "maxLength": 24,
147
+ "x-show-if": { "highlight": "true" }
148
+ },
149
+ "heading": {
150
+ "title": "Überschrift davor",
151
+ "description": "Beginnt mit diesem Link eine neue Gruppe, etwa „Mehr von mir“. Steht als kleine Zeile zwischen den Karten.",
152
+ "type": "string",
153
+ "maxLength": 30
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }