@atelic-action/ui 6.0.0 → 7.0.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/README.md CHANGED
@@ -12,12 +12,12 @@ Every export, grouped by the entry it is imported from. The gallery column links
12
12
  |---|---|---|---|
13
13
  | `SiteHeader` | `@atelic-action/ui/chrome` | The fixed bar: the lockup, the nav or a page's own stops, the call to action, the burger; transparent, solid, or dark | [#site-header](https://ui.atelic.me/#site-header) |
14
14
  | `SiteMenu` | `@atelic-action/ui/chrome` | The phone's full screen menu, on a native modal dialog | [#site-menu](https://ui.atelic.me/#site-menu) |
15
- | `Footer` | `@atelic-action/ui/chrome` | The site's foot: brand column, nav, address, hours, legal links, closing bar | [#footer](https://ui.atelic.me/#footer) |
15
+ | `Footer` | `@atelic-action/ui/chrome` | The default footer: the brand column (logo, Google rating, linked address, phone, email), the link columns, and the closing bar | [#footer](https://ui.atelic.me/#footer) |
16
16
  | `ClosingBar`, `Copyright`, `Credit` | `@atelic-action/ui/chrome` | The line that closes every page, in two sides that each take anything: by default `Copyright` with the business's name on the left and `Credit`, the practice's made with line, on the right | [#closing-bar](https://ui.atelic.me/#closing-bar) |
17
17
  | `StickyCTABar` | `@atelic-action/ui/chrome` | The phone's bottom bar: the call to action and a call shortcut, there from the top on an interior page (`fromTop`) and sliding in after a scroll on a hero page | [#sticky-cta-bar](https://ui.atelic.me/#sticky-cta-bar) |
18
18
  | `BrandLockup` | `@atelic-action/ui/chrome` | The header's identity as one link, with the recipient's mark on a sent document | [#brand-lockup](https://ui.atelic.me/#brand-lockup) |
19
19
  | `SkipLink` | `@atelic-action/ui/chrome` | The keyboard user's jump past the chrome | [#skip-link](https://ui.atelic.me/#skip-link) |
20
- | `Brand`, `BrandLogo`, `CallToAction`, `HoursRow`, `MenuContact`, `NavLink`, `Phone`, `PostalAddress`, `SiteLink`, `SocialLink`, `PageStop` | `@atelic-action/ui/chrome` | The shapes the chrome renders from (types) | none |
20
+ | `Brand`, `BrandLogo`, `CallToAction`, `HoursRow`, `MenuContact`, `NavLink`, `Phone`, `PostalAddress`, `SiteLink`, `SocialLink`, `PageStop`, `FooterColumn`, `FooterColumnLink`, `FooterIcon` | `@atelic-action/ui/chrome` | The shapes the chrome renders from (types) | none |
21
21
  | `NotFound` | `@atelic-action/ui/components` | The body of the page an unknown path renders | [#not-found](https://ui.atelic.me/#not-found) |
22
22
  | `Checklist` | `@atelic-action/ui/components` | A short list of checks, each passed or failed | [#checklist](https://ui.atelic.me/#checklist) |
23
23
  | `IconList` | `@atelic-action/ui/components` | A list whose bullets are icons, one for the list or one per item, each in a tone | [#icon-list](https://ui.atelic.me/#icon-list) |
@@ -476,6 +476,33 @@ export function SiteShell(props: Omit<SiteShellProps, "currentPath" | "basePath"
476
476
  }
477
477
  ```
478
478
 
479
+ ### The Default Footer
480
+
481
+ Every site's footer has one shape, and `Footer` draws it (7.0.0):
482
+
483
+ - **The brand column:** the logo, then the Google rating as plain text beside five stars (never a link), then the one address, the headquarters, linked to the business's Google profile, then the phone and the email, each a link.
484
+ - **Four link columns:** Company, Resources, Social, and Legal, in that order. A Social link carries its icon in front of its words. A column with no links is left out, and the grid sizes itself to the columns shown.
485
+ - **The closing bar:** `ClosingBar` under it all, `Copyright` with the business's name on the left and `Credit` on the right.
486
+
487
+ The header carries the services and the service areas, so the footer does not repeat them. It holds no blurb, no hours, no call to action, and no credential badges; a site that needs one of those puts it on a page.
488
+
489
+ `SiteShell` fills the footer from the `SiteConfig`, so a site names nothing twice:
490
+
491
+ | The footer shows | From the config |
492
+ |---|---|
493
+ | The rating | `footer.rating`, as printed (`"4.8 on Google"`) |
494
+ | The address and its link | `address` and `mapLinkURL`; `footer.showAddress: false` drops the address |
495
+ | The phone and the email | `phone`, `email` |
496
+ | Company | `nav` |
497
+ | Resources | `footerLinks` |
498
+ | Social | `socialLinks`, each with its `icon` (`facebook`, `github`, `instagram`, `linkedin`, `mail`, `star`, `user`, `youtube`) |
499
+ | Legal | `legalLinks` |
500
+ | The closing bar's right side | the practice's credit, or `footer.note` in its place |
501
+
502
+ A site whose footer genuinely needs other columns names them outright in `footer.columns`, which replaces the derived four. Rendering `Footer` directly, a site passes `columns` itself.
503
+
504
+ Moving to 7.0.0: `footerBlurb` and `footer.contactHeading` are gone from the config, and `Footer` no longer takes `blurb`, `socialLinks`, `links`, `extraLinks`, `contactHeading`, `hours`, or `legalLinks`. Delete `footerBlurb` from the site config; the rest carries over through the mapping above. The hours stay in the config for the structured data and the page sections that print them.
505
+
479
506
  ### Every Section
480
507
 
481
508
  | Section | What it is |
@@ -520,7 +547,7 @@ The primitives that came with them, in `@atelic-action/ui/primitives`: `ImageFra
520
547
 
521
548
  The entry also exports the helpers the sections use, for a site's own code: `formatClock`, `formatHoursRange`, and `isClosed` for hours, `isHoneypotFilled`, and `trackEvent`.
522
549
 
523
- Hours print on the 12 hour clock unless the site's config sets `clock: "24h"`, which turns "9a to 5p" into "09:00 to 17:00" everywhere hours appear: the footer through `SiteShell`, `LocationSection`, and `HoursTable` (which takes `clock` as a prop when used on its own). `formatClock` and `formatHoursRange` take the same `clock` option for a site's own code.
550
+ Hours print on the 12 hour clock unless the site's config sets `clock: "24h"`, which turns "9a to 5p" into "09:00 to 17:00" everywhere hours appear: `LocationSection` and `HoursTable` (which takes `clock` as a prop when used on its own). `formatClock` and `formatHoursRange` take the same `clock` option for a site's own code.
524
551
 
525
552
  ### The Marketing Vite Config and Commands
526
553
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelic-action/ui",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "Shared UI for the Atelic templates: site chrome, base styles, the component library, the access gate, and the app shell they install",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -1,22 +1,14 @@
1
- import { Mail, UserRound } from "lucide-react";
2
- import type { ComponentProps } from "react";
1
+ import { Mail, Star, UserRound } from "lucide-react";
2
+ import type { ComponentProps, CSSProperties } from "react";
3
3
  import { newTabProps } from "../lib/newTabProps";
4
- import type {
5
- Brand,
6
- HoursRow,
7
- NavLink,
8
- Phone,
9
- PostalAddress,
10
- SiteLink,
11
- SocialLink,
12
- } from "../types";
4
+ import type { Brand, FooterColumn, FooterColumnLink, Phone, PostalAddress } from "../types";
13
5
  import { ClosingBar } from "./ClosingBar";
14
6
  import { Copyright } from "./Copyright";
15
7
 
16
8
  /*
17
9
  * lucide-react ships no brand marks (removed upstream by policy), and a code
18
10
  * glyph standing in for GitHub or a briefcase for LinkedIn misleads the
19
- * reader. These two are the brands' own simple marks, carried by hand as a
11
+ * reader. These are the brands' own simple marks, carried by hand as a
20
12
  * considered exception to the lucide only rule; like lucide icons they take
21
13
  * currentColor and a size prop.
22
14
  */
@@ -52,64 +44,113 @@ function LinkedInMark({ size = 18, ...rest }: MarkProps) {
52
44
  );
53
45
  }
54
46
 
55
- const SOCIAL_ICONS = {
56
- github: GitHubMark,
57
- linkedin: LinkedInMark,
58
- mail: Mail,
59
- user: UserRound,
60
- } as const;
47
+ function FacebookMark({ size = 18, ...rest }: MarkProps) {
48
+ return (
49
+ <svg
50
+ aria-hidden="true"
51
+ viewBox="0 0 24 24"
52
+ width={size}
53
+ height={size}
54
+ fill="none"
55
+ stroke="currentColor"
56
+ strokeWidth={1.75}
57
+ strokeLinecap="round"
58
+ strokeLinejoin="round"
59
+ {...rest}
60
+ >
61
+ <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" />
62
+ </svg>
63
+ );
64
+ }
61
65
 
62
- function SocialIconLink({ link }: { link: SocialLink }) {
63
- const Icon = SOCIAL_ICONS[link.icon];
66
+ function InstagramMark({ size = 18, ...rest }: MarkProps) {
64
67
  return (
65
- <a
66
- className="footer-social-link"
67
- href={link.href}
68
- aria-label={link.label}
69
- title={link.label}
70
- {...newTabProps(link.href, true)}
68
+ <svg
69
+ aria-hidden="true"
70
+ viewBox="0 0 24 24"
71
+ width={size}
72
+ height={size}
73
+ fill="none"
74
+ stroke="currentColor"
75
+ strokeWidth={1.75}
76
+ strokeLinecap="round"
77
+ strokeLinejoin="round"
78
+ {...rest}
71
79
  >
72
- <Icon aria-hidden size={18} />
73
- </a>
80
+ <path d="M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5z M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z M17.5 6.5h.01" />
81
+ </svg>
82
+ );
83
+ }
84
+
85
+ function YouTubeMark({ size = 18, ...rest }: MarkProps) {
86
+ return (
87
+ <svg
88
+ aria-hidden="true"
89
+ viewBox="0 0 24 24"
90
+ width={size}
91
+ height={size}
92
+ fill="none"
93
+ stroke="currentColor"
94
+ strokeWidth={1.75}
95
+ strokeLinecap="round"
96
+ strokeLinejoin="round"
97
+ {...rest}
98
+ >
99
+ <path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17 M10 15l5-3-5-3z" />
100
+ </svg>
74
101
  );
75
102
  }
76
103
 
77
- function FooterLink({ link }: { link: SiteLink }) {
104
+ const LINK_ICONS = {
105
+ facebook: FacebookMark,
106
+ github: GitHubMark,
107
+ instagram: InstagramMark,
108
+ linkedin: LinkedInMark,
109
+ mail: Mail,
110
+ star: Star,
111
+ user: UserRound,
112
+ youtube: YouTubeMark,
113
+ } as const;
114
+
115
+ function ColumnLink({ link }: { link: FooterColumnLink }) {
116
+ const Icon = link.icon ? LINK_ICONS[link.icon] : null;
78
117
  return (
79
118
  <a href={link.href} {...newTabProps(link.href, link.external)}>
119
+ {Icon && <Icon aria-hidden size={18} />}
80
120
  {link.label}
81
121
  </a>
82
122
  );
83
123
  }
84
124
 
125
+ const STARS = [1, 2, 3, 4, 5];
126
+
85
127
  export interface FooterProps {
86
128
  /** The identity at the head of the brand column. */
87
129
  brand: Brand;
88
- /** Short brand paragraph under the identity. */
89
- blurb?: string;
90
- /** Icon links (socials, the founder's own site) under the blurb. */
91
- socialLinks?: SocialLink[];
92
- /** The site's nav, repeated in the explore column. */
93
- links?: NavLink[];
94
- /** Explore links beyond the nav, e.g. a patient portal. */
95
- extraLinks?: SiteLink[];
96
- /** Heading over the contact column. Defaults to "Visit". */
97
- contactHeading?: string;
98
130
  /**
99
- * The street address, printed under the business name. Omit it for a
100
- * practice with no storefront, and the phone and email stand alone under
101
- * the heading.
131
+ * The Google rating as printed, e.g. "4.8 on Google". It sits under the
132
+ * logo beside five stars, as plain text and never a link.
133
+ */
134
+ rating?: string;
135
+ /**
136
+ * The one address, the headquarters. Omit it for a business with no
137
+ * storefront, and the phone and email stand alone.
102
138
  */
103
139
  address?: PostalAddress;
140
+ /** Where the address links: the business's Google profile. */
141
+ addressHref?: string;
104
142
  phone?: Phone;
105
143
  email?: string;
106
- /** Opening hours as display rows, already formatted by the site. */
107
- hours?: HoursRow[];
144
+ /**
145
+ * The link columns beside the brand column. The default footer carries
146
+ * four: Company, Resources, Social, and Legal. A column with no links is
147
+ * left out.
148
+ */
149
+ columns?: FooterColumn[];
108
150
  /** Suffix on the copyright line, e.g. "Dr. Alex Rivers, PT, DPT". */
109
151
  attribution?: string;
110
152
  /** The site's own words for the closing bar's right side, in place of the practice's credit. */
111
153
  note?: string;
112
- legalLinks?: SiteLink[];
113
154
  /**
114
155
  * The practice's credit on the closing bar's right side. Defaults on; off
115
156
  * leaves the right side empty unless the site gives a note. The copyright
@@ -118,31 +159,46 @@ export interface FooterProps {
118
159
  credit?: boolean;
119
160
  }
120
161
 
121
- /** The site footer: brand blurb, explore nav, NAP block, hours, legal links, and the closing bar. */
162
+ /**
163
+ * The site footer: a brand column (the logo, the Google rating, the address
164
+ * linked to the Google profile, the phone, and the email), the link columns
165
+ * beside it, and the closing bar under it all.
166
+ */
122
167
  export function Footer({
123
168
  brand,
124
- blurb,
125
- socialLinks,
126
- links,
127
- extraLinks,
128
- contactHeading = "Visit",
169
+ rating,
129
170
  address,
171
+ addressHref,
130
172
  phone,
131
173
  email,
132
- hours,
174
+ columns,
133
175
  attribution,
134
176
  note,
135
- legalLinks,
136
177
  credit = true,
137
178
  }: FooterProps) {
138
179
  const { name, logo } = brand;
139
180
  const wordmark = logo?.wordmark ?? name;
181
+ const shown = (columns ?? []).filter((column) => column.links.length > 0);
182
+ const addressLines = address && (
183
+ <>
184
+ {/* A business that publishes a service area but no storefront leaves
185
+ street empty; a blank line reads as a broken block. */}
186
+ {address.street && <span>{address.street}</span>}
187
+ <span>
188
+ {address.locality}, {address.region}
189
+ {address.postalCode ? ` ${address.postalCode}` : ""}
190
+ </span>
191
+ </>
192
+ );
140
193
 
141
194
  return (
142
195
  <>
143
196
  <footer className="footer">
144
197
  <div className="wrap">
145
- <div className="footer-grid">
198
+ <div
199
+ className="footer-grid"
200
+ style={{ "--footer-columns": shown.length } as CSSProperties}
201
+ >
146
202
  <div className="footer-brand">
147
203
  {logo?.tile ? (
148
204
  <p className="footer-wordmark">
@@ -160,79 +216,44 @@ export function Footer({
160
216
  {logo?.run && <span className="wordmark-run" aria-hidden="true" />}
161
217
  </p>
162
218
  )}
163
- {blurb && <p>{blurb}</p>}
164
- {socialLinks && socialLinks.length > 0 && (
165
- <div className="footer-social">
166
- {socialLinks.map((link) => (
167
- <SocialIconLink key={link.href} link={link} />
168
- ))}
169
- </div>
219
+ {rating && (
220
+ <p className="footer-rating">
221
+ <span className="footer-stars" aria-hidden="true">
222
+ {STARS.map((star) => (
223
+ <Star key={star} size={16} fill="currentColor" />
224
+ ))}
225
+ </span>
226
+ {rating}
227
+ </p>
228
+ )}
229
+ {(address || phone || email) && (
230
+ <address className="nap">
231
+ {address &&
232
+ (addressHref ? (
233
+ <a
234
+ className="nap-address"
235
+ href={addressHref}
236
+ {...newTabProps(addressHref, true)}
237
+ >
238
+ {addressLines}
239
+ </a>
240
+ ) : (
241
+ <span className="nap-address">{addressLines}</span>
242
+ ))}
243
+ {phone && <a href={`tel:${phone.e164}`}>{phone.display}</a>}
244
+ {email && <a href={`mailto:${email}`}>{email}</a>}
245
+ </address>
170
246
  )}
171
247
  </div>
172
- <div>
173
- <h4>Explore</h4>
174
- <nav aria-label="Footer">
175
- {links?.map((link) => (
176
- <a key={link.href} href={link.href}>
177
- {link.label}
178
- </a>
179
- ))}
180
- {extraLinks?.map((link) => (
181
- <FooterLink key={link.href} link={link} />
248
+ {shown.map((column) => (
249
+ <nav key={column.heading} className="footer-column" aria-label={column.heading}>
250
+ <h4>{column.heading}</h4>
251
+ {column.links.map((link) => (
252
+ <ColumnLink key={`${link.label} ${link.href}`} link={link} />
182
253
  ))}
183
254
  </nav>
184
- </div>
185
- <div>
186
- <h4>{contactHeading}</h4>
187
- <address className="nap">
188
- {address && (
189
- <>
190
- <strong>{name}</strong>
191
- <br />
192
- {/* A business that publishes a service area but no storefront
193
- leaves street empty; a blank line reads as a broken block. */}
194
- {address.street && (
195
- <>
196
- {address.street}
197
- <br />
198
- </>
199
- )}
200
- {address.locality}, {address.region}
201
- {address.postalCode ? ` ${address.postalCode}` : ""}
202
- <br />
203
- <br />
204
- </>
205
- )}
206
- {phone && (
207
- <>
208
- <a href={`tel:${phone.e164}`}>{phone.display}</a>
209
- <br />
210
- </>
211
- )}
212
- {email && <a href={`mailto:${email}`}>{email}</a>}
213
- </address>
214
- </div>
215
- {hours && hours.length > 0 && (
216
- <div>
217
- <h4>Hours</h4>
218
- <div className="footer-hours">
219
- {hours.map((row) => (
220
- <span key={row.label}>
221
- {row.label}&nbsp;&nbsp;{row.range}
222
- <br />
223
- </span>
224
- ))}
225
- </div>
226
- </div>
227
- )}
255
+ ))}
228
256
  </div>
229
- {legalLinks && legalLinks.length > 0 && (
230
- <div className="footer-legal">
231
- {legalLinks.map((link) => (
232
- <FooterLink key={link.href} link={link} />
233
- ))}
234
- </div>
235
- )}
236
257
  </div>
237
258
  </footer>
238
259
  <ClosingBar
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { Watermark } from "../components/Watermark";
3
3
  import type { PageStop } from "../hooks/useScrollSpy";
4
- import { formatHoursRange } from "../lib/hours";
5
4
  import { BasePathProvider } from "../routing/BasePathProvider";
6
5
  import { joinBase, normalizeBasePath, stripBase } from "../routing/basePath";
7
6
  import type { NavItem, SiteConfig } from "../sections/siteConfig";
7
+ import type { FooterColumn } from "../types";
8
8
  import { ClosingBar } from "./ClosingBar";
9
9
  import { Copyright } from "./Copyright";
10
10
  import { Footer } from "./Footer";
@@ -96,6 +96,20 @@ export function SiteShell({
96
96
  const cta = { ...site.cta, href: withBase(site.cta.href) };
97
97
  const based = <T extends { href: string }>(items: T[] | undefined) =>
98
98
  items?.map((item) => ({ ...item, href: withBase(item.href) }));
99
+ // The default footer's four columns, drawn from what the config already
100
+ // holds; a site that wants other columns names them in `footer.columns`.
101
+ const footerColumns: FooterColumn[] = site.footer?.columns?.map((column) => ({
102
+ ...column,
103
+ links: based(column.links) ?? [],
104
+ })) ?? [
105
+ { heading: "Company", links },
106
+ { heading: "Resources", links: based(site.footerLinks) ?? [] },
107
+ {
108
+ heading: "Social",
109
+ links: (based(site.socialLinks) ?? []).map((link) => ({ ...link, external: true })),
110
+ },
111
+ { heading: "Legal", links: based(site.legalLinks) ?? [] },
112
+ ];
99
113
  // The header takes one variant. A hero page wins over a dark one: the bar
100
114
  // sits transparent over the hero either way, and only its scrolled state
101
115
  // differed.
@@ -124,21 +138,14 @@ export function SiteShell({
124
138
  {footer ? (
125
139
  <Footer
126
140
  brand={brand}
127
- blurb={site.footerBlurb}
128
- socialLinks={based(site.socialLinks)}
129
- links={links}
130
- extraLinks={based(site.footerLinks)}
131
- contactHeading={site.footer?.contactHeading}
141
+ rating={site.footer?.rating}
132
142
  address={site.footer?.showAddress === false ? undefined : site.address}
143
+ addressHref={site.mapLinkURL}
133
144
  phone={site.phone}
134
145
  email={site.email}
135
- hours={site.hours.map((row) => ({
136
- label: row.labelShort,
137
- range: formatHoursRange(row, { short: true, clock: site.clock }),
138
- }))}
146
+ columns={footerColumns}
139
147
  attribution={site.attribution}
140
148
  note={site.footer?.note}
141
- legalLinks={based(site.legalLinks)}
142
149
  credit={credit}
143
150
  />
144
151
  ) : (
@@ -4,6 +4,9 @@ export type {
4
4
  Brand,
5
5
  BrandLogo,
6
6
  CallToAction,
7
+ FooterColumn,
8
+ FooterColumnLink,
9
+ FooterIcon,
7
10
  HoursRow,
8
11
  MenuContact,
9
12
  NavLink,
@@ -8,7 +8,7 @@
8
8
  * render from it, so standing up a new site means writing one of these plus
9
9
  * a theme.css, never touching the components themselves.
10
10
  */
11
- import type { SiteLink, SocialLink } from "../types";
11
+ import type { FooterColumn, SiteLink, SocialLink } from "../types";
12
12
 
13
13
  export type { SiteLink, SocialLink };
14
14
 
@@ -156,28 +156,32 @@ export interface SiteConfig {
156
156
  founder?: Founder;
157
157
  /** Names of offered services for structured data. */
158
158
  offers?: string[];
159
- /** Short brand paragraph for the footer. */
160
- footerBlurb: string;
161
- /** Extra footer nav links beyond the main nav (e.g. a patient portal). */
159
+ /** The footer's Resources column (guides, financing, a patient portal). */
162
160
  footerLinks?: SiteLink[];
163
- /** Icon links (socials, the founder's own site) rendered in the footer brand column. */
161
+ /** The footer's Social column, each link printed with its icon. */
164
162
  socialLinks?: SocialLink[];
163
+ /** The footer's Legal column. */
165
164
  legalLinks?: SiteLink[];
166
165
  /** Copyright attribution line suffix, e.g. "Dr. Alex Rivers, PT, DPT". */
167
166
  attribution?: string;
168
167
  /**
169
- * Footer wording overrides: the heading over the address column (defaults
170
- * to "Visit", which reads wrong for a practice with no storefront) and the
171
- * site's own words for the closing bar's right side, in place of the
172
- * practice's credit.
168
+ * What the footer needs beyond the fields above. The default footer is a
169
+ * brand column (the logo, the rating, `address` linked to `mapLinkURL`,
170
+ * `phone`, `email`) and four link columns: Company from `nav`, Resources
171
+ * from `footerLinks`, Social from `socialLinks`, and Legal from
172
+ * `legalLinks`.
173
173
  */
174
174
  footer?: {
175
- contactHeading?: string;
175
+ /** The Google rating as printed, e.g. "4.8 on Google". Plain text, never a link. */
176
+ rating?: string;
177
+ /** The link columns, named outright, in place of the four the config derives. */
178
+ columns?: FooterColumn[];
179
+ /** The site's own words for the closing bar's right side, in place of the practice's credit. */
176
180
  note?: string;
177
181
  /**
178
- * Set false to drop the name and address lines from the contact column
179
- * and leave only the phone and email under the heading (a practice with
180
- * no storefront has nothing to visit). Defaults to true.
182
+ * Set false to drop the address from the brand column and leave only
183
+ * the phone and email (a practice with no storefront has nothing to
184
+ * visit). Defaults to true.
181
185
  */
182
186
  showAddress?: boolean;
183
187
  };
@@ -370,83 +370,79 @@
370
370
  .atelic-ui .footer a:hover {
371
371
  color: #fff;
372
372
  }
373
+ /* One grid: the brand column, then the link columns, however many the
374
+ footer was given. A phone stacks the brand column over two across. */
373
375
  .atelic-ui .footer-grid {
374
376
  display: grid;
375
- gap: 40px;
376
- grid-template-columns: 1fr;
377
+ gap: 40px 32px;
378
+ grid-template-columns: repeat(2, minmax(0, 1fr));
379
+ }
380
+ .atelic-ui .footer-brand {
381
+ grid-column: 1 / -1;
377
382
  }
378
383
  .atelic-ui .footer h4 {
379
384
  color: #fff;
380
385
  font-family: var(--font-mono);
381
- font-size: 0.74rem;
382
- letter-spacing: 0.16em;
386
+ font-size: 0.84rem;
387
+ letter-spacing: 0.1em;
383
388
  text-transform: uppercase;
384
- font-weight: 500;
385
- margin-bottom: 16px;
389
+ font-weight: 700;
390
+ margin-bottom: 14px;
386
391
  }
387
392
  .atelic-ui .footer-brand img {
388
393
  height: 38px;
389
394
  margin-bottom: 18px;
390
395
  }
391
- .atelic-ui .footer-brand p {
392
- color: var(--neutral-300);
393
- max-width: 30ch;
396
+ .atelic-ui .footer-rating {
397
+ display: flex;
398
+ align-items: center;
399
+ gap: 10px;
400
+ color: #fff;
401
+ font-weight: 500;
402
+ margin-bottom: 10px;
403
+ }
404
+ .atelic-ui .footer-stars {
405
+ display: inline-flex;
406
+ gap: 2px;
407
+ color: #f5b301;
394
408
  }
395
409
  .atelic-ui .footer nav a {
396
- display: block;
410
+ display: flex;
411
+ align-items: center;
412
+ gap: 10px;
397
413
  padding: 6px 0;
398
414
  color: var(--neutral-200);
399
415
  font-weight: 500;
400
416
  }
417
+ .atelic-ui .footer nav a svg {
418
+ flex: none;
419
+ }
401
420
  .atelic-ui .footer .nap {
421
+ display: flex;
422
+ flex-direction: column;
423
+ align-items: flex-start;
424
+ gap: 6px;
402
425
  font-style: normal;
403
- line-height: 1.9;
404
426
  color: var(--neutral-200);
405
427
  }
406
428
  .atelic-ui .footer .nap a {
407
429
  color: #fff;
408
430
  font-weight: 600;
409
431
  }
410
- .atelic-ui .footer-hours {
411
- font-family: var(--font-mono);
412
- font-size: 0.82rem;
413
- line-height: 1.9;
414
- color: var(--neutral-300);
415
- }
416
- .atelic-ui .footer-social {
417
- display: flex;
418
- gap: 10px;
419
- margin-top: 20px;
420
- }
421
- .atelic-ui .footer .footer-social-link {
422
- display: inline-flex;
423
- align-items: center;
424
- justify-content: center;
425
- width: 38px;
426
- height: 38px;
427
- border: 1px solid rgba(255, 255, 255, 0.16);
428
- border-radius: var(--radius-sm);
429
- color: var(--neutral-300);
430
- }
431
- .atelic-ui .footer .footer-social-link:hover {
432
- color: var(--primary-bright);
433
- border-color: var(--primary-bright);
432
+ .atelic-ui .footer-grid > * {
433
+ overflow-wrap: anywhere;
434
434
  }
435
- .atelic-ui .footer-legal {
436
- margin-top: 48px;
435
+ .atelic-ui .footer .nap-address {
437
436
  display: flex;
438
- gap: 20px;
439
- flex-wrap: wrap;
440
- justify-content: flex-end;
441
- font-size: 0.82rem;
442
- }
443
- .atelic-ui .footer .footer-legal a {
444
- color: var(--neutral-300);
437
+ flex-direction: column;
445
438
  }
446
439
  @media (min-width: 760px) {
447
440
  .atelic-ui .footer-grid {
448
- grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
449
- gap: 48px;
441
+ grid-template-columns: minmax(0, 1.4fr) repeat(var(--footer-columns, 4), minmax(0, 1fr));
442
+ gap: 48px 32px;
443
+ }
444
+ .atelic-ui .footer-brand {
445
+ grid-column: auto;
450
446
  }
451
447
  }
452
448
  /* Text wordmark for a site with no mark image. */
package/src/types.ts CHANGED
@@ -63,12 +63,34 @@ export interface SiteLink {
63
63
  external?: boolean;
64
64
  }
65
65
 
66
- /** An icon link in the footer's brand column. */
66
+ /** The icons a footer link can carry. */
67
+ export type FooterIcon =
68
+ | "facebook"
69
+ | "github"
70
+ | "instagram"
71
+ | "linkedin"
72
+ | "mail"
73
+ | "star"
74
+ | "user"
75
+ | "youtube";
76
+
77
+ /** A social link; the footer's Social column prints it with its icon. */
67
78
  export interface SocialLink {
68
- /** Accessible name, e.g. "GitHub". */
79
+ /** The link's words, e.g. "GitHub". */
69
80
  label: string;
70
81
  href: string;
71
- icon: "github" | "linkedin" | "mail" | "user";
82
+ icon: FooterIcon;
83
+ }
84
+
85
+ /** One link in a footer column, with an icon in front when it names one. */
86
+ export interface FooterColumnLink extends SiteLink {
87
+ icon?: FooterIcon;
88
+ }
89
+
90
+ /** One link column of the footer, under its heading. */
91
+ export interface FooterColumn {
92
+ heading: string;
93
+ links: FooterColumnLink[];
72
94
  }
73
95
 
74
96
  export interface Phone {