@the-smithy/create-hearth-site 0.16.0 → 0.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-smithy/create-hearth-site",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Start a new client website powered by Hearth: pnpm create @the-smithy/hearth-site",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "devDependencies": {
31
31
  "vitest": "^5.0.3",
32
- "@the-smithy/hearth-schema": "^0.16.0"
32
+ "@the-smithy/hearth-schema": "^0.17.0"
33
33
  },
34
34
  "scripts": {
35
35
  "test": "node --test \"test/**/*.test.js\" && vitest run test/blocks.test.ts"
@@ -5,7 +5,8 @@ import type { NextConfig } from "next";
5
5
  const securityHeaders = [
6
6
  { key: "X-Content-Type-Options", value: "nosniff" },
7
7
  { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
8
- { key: "X-Frame-Options", value: "SAMEORIGIN" },
8
+ // Only this site and Hearth's side-by-side preview may show it in a frame (X-Frame-Options would block the preview).
9
+ { key: "Content-Security-Policy", value: "frame-ancestors 'self' https://hearth.thesmithy.io" },
9
10
  { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
10
11
  ];
11
12
 
@@ -69,6 +69,18 @@ export function UpcomingEvents({ block }: { block: BlockOf<"upcomingEvents"> })
69
69
  );
70
70
  }
71
71
 
72
+ /** Events that have ended, most recent first (a talk archive). They keep their pages, so each still links to it. */
73
+ export function PastEvents({ block }: { block: BlockOf<"pastEvents"> }) {
74
+ const d = block.data;
75
+ if (!d.events.length) return null;
76
+ return (
77
+ <Section tone="muted">
78
+ <SectionHeading eyebrow={d.eyebrow} heading={d.heading} intro={d.intro} />
79
+ <EventList events={d.events} />
80
+ </Section>
81
+ );
82
+ }
83
+
72
84
  export function EventSpotlight({ block }: { block: BlockOf<"eventSpotlight"> }) {
73
85
  const e = block.data.event;
74
86
  if (!e) return null;
@@ -3,7 +3,7 @@ import { HearthBlocks, type BlockComponents } from "@the-smithy/hearth/react";
3
3
  import { Section, SectionHeading } from "@/components/ui";
4
4
  import { CollectionList } from "./collections";
5
5
  import { CallToAction, CardGrid, Faq, Hero, MediaText, Pricing, Projects, Quote, RichText, Stats } from "./content";
6
- import { EventSpotlight, UpcomingEvents } from "./events";
6
+ import { EventSpotlight, PastEvents, UpcomingEvents } from "./events";
7
7
  import { CustomBlock } from "./custom";
8
8
  import { EmberFormBlock } from "./EmberFormBlock";
9
9
  import { HearthForm } from "./Form";
@@ -52,6 +52,7 @@ export const blocks: BlockComponents = {
52
52
  schedule: Schedule,
53
53
  form: FormBlock,
54
54
  upcomingEvents: UpcomingEvents,
55
+ pastEvents: PastEvents,
55
56
  eventSpotlight: EventSpotlight,
56
57
  collectionList: CollectionList,
57
58
  fundraiserSpotlight: FundraiserSpotlight,