ghostcn 1.6.0 → 1.7.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.
Files changed (51) hide show
  1. package/dist/registry/components/account-card.json +57 -0
  2. package/dist/registry/components/author-card.json +1 -1
  3. package/dist/registry/components/author-stack.json +63 -0
  4. package/dist/registry/components/back-to-top.json +72 -0
  5. package/dist/registry/components/callout.json +56 -0
  6. package/dist/registry/components/checkbox.json +82 -0
  7. package/dist/registry/components/code-copy.json +52 -0
  8. package/dist/registry/components/comments-section.json +56 -0
  9. package/dist/registry/components/dialog.json +83 -0
  10. package/dist/registry/components/dropdown.json +85 -0
  11. package/dist/registry/components/empty-state.json +65 -0
  12. package/dist/registry/components/error-card.json +74 -0
  13. package/dist/registry/components/faq-section.json +83 -0
  14. package/dist/registry/components/hero.json +89 -0
  15. package/dist/registry/components/image-lightbox.json +44 -0
  16. package/dist/registry/components/magazine-grid.json +62 -0
  17. package/dist/registry/components/mobile-dock.json +69 -0
  18. package/dist/registry/components/newsletter-form.json +1 -1
  19. package/dist/registry/components/pagination.json +1 -1
  20. package/dist/registry/components/post-card.json +1 -1
  21. package/dist/registry/components/post-grid.json +1 -1
  22. package/dist/registry/components/post-header.json +1 -1
  23. package/dist/registry/components/post-list.json +62 -0
  24. package/dist/registry/components/pull-quote.json +70 -0
  25. package/dist/registry/components/radio-group.json +94 -0
  26. package/dist/registry/components/reader-controls.json +60 -0
  27. package/dist/registry/components/reading-meta.json +49 -0
  28. package/dist/registry/components/related-posts.json +1 -1
  29. package/dist/registry/components/search-trigger.json +68 -0
  30. package/dist/registry/components/select.json +94 -0
  31. package/dist/registry/components/separator.json +46 -0
  32. package/dist/registry/components/series-nav.json +62 -0
  33. package/dist/registry/components/skeleton.json +48 -0
  34. package/dist/registry/components/skip-link.json +53 -0
  35. package/dist/registry/components/social-links.json +74 -0
  36. package/dist/registry/components/stat-strip.json +85 -0
  37. package/dist/registry/components/sticky-subscribe.json +82 -0
  38. package/dist/registry/components/subscribe-bar.json +61 -0
  39. package/dist/registry/components/switch.json +76 -0
  40. package/dist/registry/components/tabs.json +81 -0
  41. package/dist/registry/components/tag-bar.json +63 -0
  42. package/dist/registry/components/textarea.json +95 -0
  43. package/dist/registry/components/tier-comparison.json +55 -0
  44. package/dist/registry/components/timeline.json +85 -0
  45. package/dist/registry/components/tooltip.json +65 -0
  46. package/dist/registry/index.json +389 -0
  47. package/dist/templates/playground/playground.js +1 -1
  48. package/dist/utils/playground-server.js +8 -2
  49. package/dist/utils/preview-renderer.d.ts +72 -0
  50. package/dist/utils/preview-renderer.js +51 -5
  51. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "dropdown",
3
+ "type": "components:ui",
4
+ "description": "Accessible popover menu built on native details/summary with Escape and outside-click dismissal.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Trigger button treatment.",
10
+ "options": [
11
+ "default",
12
+ "outline",
13
+ "ghost"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "align": {
18
+ "description": "Menu horizontal alignment.",
19
+ "options": [
20
+ "start",
21
+ "end"
22
+ ],
23
+ "default": "start"
24
+ },
25
+ "label": {
26
+ "description": "Trigger button text.",
27
+ "default": "Menu"
28
+ },
29
+ "item1Label": {
30
+ "description": "First link label (or pass custom links in a partial block)."
31
+ },
32
+ "item1Href": {
33
+ "description": "First link URL."
34
+ },
35
+ "item2Label": {
36
+ "description": "Second link label."
37
+ },
38
+ "item2Href": {
39
+ "description": "Second link URL."
40
+ },
41
+ "item3Label": {
42
+ "description": "Third link label."
43
+ },
44
+ "item3Href": {
45
+ "description": "Third link URL."
46
+ }
47
+ },
48
+ "files": [
49
+ {
50
+ "name": "dropdown.hbs",
51
+ "type": "partial",
52
+ "target": "partials/components/dropdown.hbs",
53
+ "content": "{{!-- Styling parameters: class, triggerClass, menuClass --}}\n{{#with this as |ghostcnStyles|}}\n<details class=\"ghcn-dropdown{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-dropdown data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"ghost\"}}ghost{{else}}default{{/match}}{{/match}}\" data-align=\"{{#match align \"end\"}}end{{else}}start{{/match}}\">\n <summary class=\"ghcn-dropdown__trigger{{#if ghostcnStyles.triggerClass}} {{ghostcnStyles.triggerClass}}{{/if}}\">\n <span>{{#if label}}{{label}}{{else}}Menu{{/if}}</span>\n <svg class=\"ghcn-dropdown__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg>\n </summary>\n <div class=\"ghcn-dropdown__menu{{#if ghostcnStyles.menuClass}} {{ghostcnStyles.menuClass}}{{/if}}\" role=\"menu\">\n {{#> @partial-block}}\n {{#if item1Label}}<a class=\"ghcn-dropdown__item\" role=\"menuitem\" href=\"{{#if item1Href}}{{item1Href}}{{else}}#{{/if}}\">{{item1Label}}</a>{{/if}}\n {{#if item2Label}}<a class=\"ghcn-dropdown__item\" role=\"menuitem\" href=\"{{#if item2Href}}{{item2Href}}{{else}}#{{/if}}\">{{item2Label}}</a>{{/if}}\n {{#if item3Label}}<a class=\"ghcn-dropdown__item\" role=\"menuitem\" href=\"{{#if item3Href}}{{item3Href}}{{else}}#{{/if}}\">{{item3Label}}</a>{{/if}}\n {{/@partial-block}}\n </div>\n</details>\n{{/with}}"
54
+ },
55
+ {
56
+ "name": "dropdown.css",
57
+ "type": "style",
58
+ "target": "assets/css/components/dropdown.css",
59
+ "content": ".ghcn-dropdown { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-dropdown *, .ghcn-dropdown *::before, .ghcn-dropdown *::after { box-sizing: border-box; }\n.ghcn-dropdown:focus-visible, :where(.ghcn-dropdown) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-dropdown { position: relative; display: inline-block; }\n.ghcn-dropdown__trigger { display: inline-flex; align-items: center; gap: 6px; min-height: var(--ghcn-control-height, 40px); padding: var(--ghcn-control-padding, 8px 14px); border: 1px solid var(--border); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--card); color: var(--foreground); font-size: var(--ghcn-text-small, 14px); font-weight: 600; list-style: none; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }\n.ghcn-dropdown__trigger::-webkit-details-marker { display: none; }\n.ghcn-dropdown__trigger:hover { background: var(--muted); }\n.ghcn-dropdown:where([data-variant=\"outline\"]) .ghcn-dropdown__trigger { background: transparent; }\n.ghcn-dropdown:where([data-variant=\"ghost\"]) .ghcn-dropdown__trigger { background: transparent; border-color: transparent; }\n.ghcn-dropdown:where([data-variant=\"ghost\"]) .ghcn-dropdown__trigger:hover { background: var(--muted); }\n.ghcn-dropdown__chevron { color: var(--muted-foreground); transition: transform 160ms ease; }\n.ghcn-dropdown[open] > .ghcn-dropdown__trigger .ghcn-dropdown__chevron { transform: rotate(180deg); }\n.ghcn-dropdown__menu { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 190px; padding: 6px; background: var(--popover); color: var(--popover-foreground); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14); display: grid; gap: 2px; }\n.ghcn-dropdown:where([data-align=\"end\"]) .ghcn-dropdown__menu { left: auto; right: 0; }\n.ghcn-dropdown__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: calc(var(--ghcn-control-radius, var(--radius, 8px)) - 2px); color: var(--popover-foreground); font-size: var(--ghcn-text-small, 14px); font-weight: 500; text-decoration: none; transition: background-color 120ms ease; }\n.ghcn-dropdown__item:hover { background: var(--muted); }\n@media (prefers-reduced-motion: reduce) { .ghcn-dropdown__trigger, .ghcn-dropdown__chevron, .ghcn-dropdown__item { transition: none; } }\n"
60
+ },
61
+ {
62
+ "name": "dropdown.js",
63
+ "type": "js",
64
+ "target": "assets/js/components/dropdown.js",
65
+ "content": "/* ghostcn dropdown: closes native <details> menus on Escape or outside click. */\n(() => {\n if (document.documentElement.dataset.ghcnDropdownInit) return;\n document.documentElement.dataset.ghcnDropdownInit = 'true';\n document.addEventListener('click', event => {\n document.querySelectorAll('details[data-ghcn-dropdown][open]').forEach(menu => {\n if (!menu.contains(event.target)) menu.open = false;\n });\n });\n document.addEventListener('keydown', event => {\n if (event.key !== 'Escape') return;\n document.querySelectorAll('details[data-ghcn-dropdown][open]').forEach(menu => {\n menu.open = false;\n menu.querySelector('summary')?.focus();\n });\n });\n})();"
66
+ }
67
+ ],
68
+ "gscan": {
69
+ "rules_satisfied": [
70
+ "GS010-PJ-VALID"
71
+ ],
72
+ "notes": "Self-contained Ghostcn UI primitive."
73
+ },
74
+ "styleSlots": {
75
+ "class": [
76
+ ".ghcn-dropdown"
77
+ ],
78
+ "triggerClass": [
79
+ ".ghcn-dropdown__trigger"
80
+ ],
81
+ "menuClass": [
82
+ ".ghcn-dropdown__menu"
83
+ ]
84
+ }
85
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "empty-state",
3
+ "type": "components:ui",
4
+ "description": "Reusable empty state block with icon, title, message, and optional call-to-action button.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Surface treatment.",
10
+ "options": [
11
+ "default",
12
+ "dashed",
13
+ "minimal"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "heading": {
18
+ "description": "Empty-state heading.",
19
+ "default": "Nothing here yet"
20
+ },
21
+ "description": {
22
+ "description": "Helpful explanatory copy."
23
+ },
24
+ "actionText": {
25
+ "description": "Optional link button label."
26
+ },
27
+ "actionHref": {
28
+ "description": "Optional trusted link URL (defaults to @site.url)."
29
+ }
30
+ },
31
+ "files": [
32
+ {
33
+ "name": "empty-state.hbs",
34
+ "type": "partial",
35
+ "target": "partials/components/empty-state.hbs",
36
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-empty-state{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"dashed\"}}dashed{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}\">\n <span class=\"ghcn-empty-state__icon\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" width=\"22\" height=\"22\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/></svg>\n </span>\n <h3 class=\"ghcn-empty-state__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}Nothing here yet{{/if}}</h3>\n <p class=\"ghcn-empty-state__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{#if description}}{{description}}{{else}}New stories will appear here as soon as they are published.{{/if}}</p>\n {{#if actionText}}<div class=\"ghcn-empty-state__actions\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{#if actionHref}}{{actionHref}}{{else}}{{@site.url}}{{/if}}\">{{actionText}}</a></div>{{/if}}\n</div>\n{{/with}}"
37
+ },
38
+ {
39
+ "name": "empty-state.css",
40
+ "type": "style",
41
+ "target": "assets/css/components/empty-state.css",
42
+ "content": ".ghcn-empty-state { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-empty-state *, .ghcn-empty-state *::before, .ghcn-empty-state *::after { box-sizing: border-box; }\n.ghcn-empty-state:focus-visible, :where(.ghcn-empty-state) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-empty-state { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }\n.ghcn-empty-state:where([data-variant=\"dashed\"]) { border-style: dashed; background: transparent; }\n.ghcn-empty-state:where([data-variant=\"minimal\"]) { border: 0; background: transparent; padding-block: 28px; }\n.ghcn-empty-state__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 9999px; border: 1px solid var(--border); background: var(--secondary); color: var(--muted-foreground); }\n.ghcn-empty-state__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0 0 6px; }\n.ghcn-empty-state__description { max-width: 44ch; margin: 0; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); }\n.ghcn-empty-state__actions { margin-top: 18px; }\n"
43
+ }
44
+ ],
45
+ "gscan": {
46
+ "rules_satisfied": [
47
+ "GS010-PJ-VALID"
48
+ ],
49
+ "notes": "Self-contained Ghostcn UI primitive."
50
+ },
51
+ "styleSlots": {
52
+ "class": [
53
+ ".ghcn-empty-state"
54
+ ],
55
+ "titleClass": [
56
+ ".ghcn-empty-state__title"
57
+ ],
58
+ "descriptionClass": [
59
+ ".ghcn-empty-state__description"
60
+ ],
61
+ "buttonClass": [
62
+ ".ghcn-button"
63
+ ]
64
+ }
65
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "error-card",
3
+ "type": "components:layout",
4
+ "description": "Drop-in 404/500 error page block for Ghost error.hbs with status code, native search trigger, and home CTA.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Card framing: default, minimal, or bordered.",
10
+ "options": [
11
+ "default",
12
+ "minimal",
13
+ "bordered"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "statusCode": {
18
+ "description": "HTTP error code (e.g. Ghost {{statusCode}}).",
19
+ "default": "404"
20
+ },
21
+ "heading": {
22
+ "description": "Main error heading.",
23
+ "default": "Page not found"
24
+ },
25
+ "description": {
26
+ "description": "Helpful recovery message."
27
+ },
28
+ "homeLabel": {
29
+ "description": "Homepage CTA button text.",
30
+ "default": "Back to homepage"
31
+ },
32
+ "searchLabel": {
33
+ "description": "Native search button text.",
34
+ "default": "Search stories"
35
+ },
36
+ "hideSearch": {
37
+ "description": "Hide the native Ghost search button when true."
38
+ }
39
+ },
40
+ "files": [
41
+ {
42
+ "name": "error-card.hbs",
43
+ "type": "partial",
44
+ "target": "partials/components/error-card.hbs",
45
+ "content": "{{!-- Styling parameters: class, codeClass, titleClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<section class=\"ghcn-error-card{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"minimal\"}}minimal{{else}}{{#match variant \"bordered\"}}bordered{{else}}default{{/match}}{{/match}}\" aria-labelledby=\"ghcn-error-heading\">\n <p class=\"ghcn-error-card__code{{#if ghostcnStyles.codeClass}} {{ghostcnStyles.codeClass}}{{/if}}\">{{#if statusCode}}{{statusCode}}{{else}}404{{/if}}</p>\n <h1 class=\"ghcn-error-card__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\" id=\"ghcn-error-heading\">{{#if heading}}{{heading}}{{else}}Page not found{{/if}}</h1>\n <p class=\"ghcn-error-card__desc\">{{#if description}}{{description}}{{else}}The page you are looking for may have been moved, renamed, or unpublished.{{/if}}</p>\n <div class=\"ghcn-error-card__actions\">\n <a class=\"ghcn-error-card__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-error-card__btn--primary\" href=\"{{@site.url}}\">{{#if homeLabel}}{{homeLabel}}{{else}}Back to homepage{{/if}}</a>\n {{#unless hideSearch}}\n <button type=\"button\" class=\"ghcn-error-card__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-error-card__btn--outline\" data-ghost-search>\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"><circle cx=\"9\" cy=\"9\" r=\"5.5\"/><path d=\"m13.5 13.5 3.5 3.5\"/></svg>\n <span>{{#if searchLabel}}{{searchLabel}}{{else}}Search stories{{/if}}</span>\n </button>\n {{/unless}}\n </div>\n</section>\n{{/with}}"
46
+ },
47
+ {
48
+ "name": "error-card.css",
49
+ "type": "style",
50
+ "target": "assets/css/components/error-card.css",
51
+ "content": ".ghcn-error-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); margin: clamp(32px, 6vw, 72px) auto; width: min(100% - 32px, 560px); padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px); text-align: center; display: grid; justify-items: center; gap: 12px; font-family: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }\n.ghcn-error-card *, .ghcn-error-card *::before, .ghcn-error-card *::after { box-sizing: border-box; }\n.ghcn-error-card:where([data-variant=\"minimal\"]) { background: transparent; border: 0; box-shadow: none; }\n.ghcn-error-card:where([data-variant=\"bordered\"]) { background: transparent; border-style: dashed; box-shadow: none; }\n.ghcn-error-card__code { margin: 0; font-size: clamp(44px, 7vw, 68px); font-weight: 800; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--primary); }\n.ghcn-error-card__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 4px 0 0; }\n.ghcn-error-card__desc { margin: 0; max-width: 44ch; color: var(--muted-foreground); font-size: 15px; line-height: 1.6; }\n.ghcn-error-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }\n.ghcn-error-card__btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: opacity 150ms ease, background-color 150ms ease; }\n.ghcn-error-card__btn--primary { background: var(--primary); color: var(--primary-foreground); }\n.ghcn-error-card__btn--primary:hover { opacity: .9; }\n.ghcn-error-card__btn--outline { background: var(--background); color: var(--foreground); border-color: var(--border); }\n.ghcn-error-card__btn--outline:hover { background: var(--secondary); }\n.ghcn-error-card:focus-visible, :where(.ghcn-error-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
52
+ }
53
+ ],
54
+ "gscan": {
55
+ "rules_satisfied": [
56
+ "GS010-PJ-VALID"
57
+ ],
58
+ "notes": "Designed for Ghost error.hbs with native @site.url and data-ghost-search."
59
+ },
60
+ "styleSlots": {
61
+ "class": [
62
+ ".ghcn-error-card"
63
+ ],
64
+ "codeClass": [
65
+ ".ghcn-error-card__code"
66
+ ],
67
+ "titleClass": [
68
+ ".ghcn-error-card__title"
69
+ ],
70
+ "buttonClass": [
71
+ ".ghcn-error-card__btn"
72
+ ]
73
+ }
74
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "faq-section",
3
+ "type": "components:members",
4
+ "description": "Zero-JS membership FAQ block with native details disclosures and Schema.org FAQPage microdata.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Layout style: default, bordered, or split.",
10
+ "options": [
11
+ "default",
12
+ "bordered",
13
+ "split"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "eyebrow": {
18
+ "description": "Optional uppercase label above the title."
19
+ },
20
+ "heading": {
21
+ "description": "Section heading.",
22
+ "default": "Frequently asked questions"
23
+ },
24
+ "description": {
25
+ "description": "Optional introductory sentence."
26
+ },
27
+ "q1": {
28
+ "description": "Question 1 text."
29
+ },
30
+ "a1": {
31
+ "description": "Answer 1 text."
32
+ },
33
+ "q2": {
34
+ "description": "Question 2 text."
35
+ },
36
+ "a2": {
37
+ "description": "Answer 2 text."
38
+ },
39
+ "q3": {
40
+ "description": "Question 3 text."
41
+ },
42
+ "a3": {
43
+ "description": "Answer 3 text."
44
+ },
45
+ "q4": {
46
+ "description": "Optional Question 4 text."
47
+ },
48
+ "a4": {
49
+ "description": "Optional Answer 4 text."
50
+ }
51
+ },
52
+ "files": [
53
+ {
54
+ "name": "faq-section.hbs",
55
+ "type": "partial",
56
+ "target": "partials/components/faq-section.hbs",
57
+ "content": "{{!-- Styling parameters: class, titleClass, itemClass --}}\n{{#with this as |ghostcnStyles|}}\n<section class=\"ghcn-faq{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"bordered\"}}bordered{{else}}{{#match variant \"split\"}}split{{else}}default{{/match}}{{/match}}\" itemscope itemtype=\"https://schema.org/FAQPage\">\n <header class=\"ghcn-faq__header\">\n {{#if eyebrow}}<span class=\"ghcn-faq__eyebrow\">{{eyebrow}}</span>{{/if}}\n <h2 class=\"ghcn-faq__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}Frequently asked questions{{/if}}</h2>\n {{#if description}}<p class=\"ghcn-faq__desc\">{{description}}</p>{{/if}}\n </header>\n <div class=\"ghcn-faq__list\">\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" open itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>{{#if q1}}{{q1}}{{else}}How does paid membership work?{{/if}}</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">{{#if a1}}{{a1}}{{else}}Choose a monthly or annual tier in Ghost Portal for instant access to member-only stories, full archives, and community discussions.{{/if}}</p></div>\n </details>\n {{#if q2}}\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>{{q2}}</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">{{a2}}</p></div>\n </details>\n {{else}}\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>Can I cancel or switch plans anytime?</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">Yes. Open your Ghost Portal account menu at any time to switch between monthly and yearly billing or cancel with one click.</p></div>\n </details>\n {{/if}}\n {{#if q3}}\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>{{q3}}</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">{{a3}}</p></div>\n </details>\n {{else}}\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>Will I receive new posts by email?</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">Every new issue is delivered straight to your inbox, and you can toggle individual newsletters on or off in your account settings.</p></div>\n </details>\n {{/if}}\n {{#if q4}}\n <details class=\"ghcn-faq__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\" itemscope itemprop=\"mainEntity\" itemtype=\"https://schema.org/Question\">\n <summary class=\"ghcn-faq__q\" itemprop=\"name\"><span>{{q4}}</span><svg class=\"ghcn-faq__chevron\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 6 4 4 4-4\"/></svg></summary>\n <div class=\"ghcn-faq__a\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https://schema.org/Answer\"><p itemprop=\"text\">{{a4}}</p></div>\n </details>\n {{/if}}\n </div>\n</section>\n{{/with}}"
58
+ },
59
+ {
60
+ "name": "faq-section.css",
61
+ "type": "style",
62
+ "target": "assets/css/components/faq-section.css",
63
+ "content": ".ghcn-faq { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; display: grid; gap: 24px; }\n.ghcn-faq *, .ghcn-faq *::before, .ghcn-faq *::after { box-sizing: border-box; }\n.ghcn-faq__header { display: grid; gap: 8px; max-width: 58ch; }\n.ghcn-faq__eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }\n.ghcn-faq__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; }\n.ghcn-faq__desc { margin: 0; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); line-height: 1.6; }\n.ghcn-faq__list { display: grid; gap: 10px; }\n.ghcn-faq__item { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); overflow: hidden; transition: border-color 150ms ease; }\n.ghcn-faq__item[open] { border-color: color-mix(in srgb, var(--foreground) 22%, var(--border)); }\n.ghcn-faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; list-style: none; font-size: 15.5px; font-weight: 600; color: var(--foreground); cursor: pointer; }\n.ghcn-faq__q::-webkit-details-marker { display: none; }\n.ghcn-faq__chevron { flex: 0 0 auto; color: var(--muted-foreground); transition: transform 180ms ease; }\n.ghcn-faq__item[open] .ghcn-faq__chevron { transform: rotate(180deg); color: var(--foreground); }\n.ghcn-faq__a { padding: 0 20px 18px; color: var(--muted-foreground); font-size: 14.5px; line-height: 1.65; }\n.ghcn-faq__a p { margin: 0; }\n.ghcn-faq:where([data-variant=\"bordered\"]) .ghcn-faq__list { gap: 0; border-top: 1px solid var(--border); }\n.ghcn-faq:where([data-variant=\"bordered\"]) .ghcn-faq__item { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }\n.ghcn-faq:where([data-variant=\"bordered\"]) .ghcn-faq__q { padding: 18px 4px; }\n.ghcn-faq:where([data-variant=\"bordered\"]) .ghcn-faq__a { padding: 0 4px 18px; }\n@media (min-width: 820px) {\n .ghcn-faq:where([data-variant=\"split\"]) { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 40px; }\n}\n@media (prefers-reduced-motion: reduce) { .ghcn-faq__chevron { transition: none; } }\n.ghcn-faq:focus-visible, :where(.ghcn-faq) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
64
+ }
65
+ ],
66
+ "gscan": {
67
+ "rules_satisfied": [
68
+ "GS010-PJ-VALID"
69
+ ],
70
+ "notes": "Zero-JS native <details> disclosures with Schema.org FAQPage structured data."
71
+ },
72
+ "styleSlots": {
73
+ "class": [
74
+ ".ghcn-faq"
75
+ ],
76
+ "titleClass": [
77
+ ".ghcn-faq__title"
78
+ ],
79
+ "itemClass": [
80
+ ".ghcn-faq__item"
81
+ ]
82
+ }
83
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "hero",
3
+ "type": "components:content",
4
+ "description": "Publication homepage hero with centered, split, editorial, and cover variants plus optional inline signup.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Hero layout style.",
10
+ "options": [
11
+ "default",
12
+ "split",
13
+ "editorial",
14
+ "cover"
15
+ ],
16
+ "default": "default"
17
+ },
18
+ "eyebrow": {
19
+ "description": "Optional badge label above the heading."
20
+ },
21
+ "heading": {
22
+ "description": "Hero headline; defaults to @site.title."
23
+ },
24
+ "description": {
25
+ "description": "Introductory copy; defaults to @site.description."
26
+ },
27
+ "primaryText": {
28
+ "description": "Primary button label (or subscribe button label when showSubscribe=true)."
29
+ },
30
+ "primaryHref": {
31
+ "description": "Trusted URL for the primary button."
32
+ },
33
+ "primaryPortal": {
34
+ "description": "Optional Ghost Portal trigger on primary button (for example: signup)."
35
+ },
36
+ "secondaryText": {
37
+ "description": "Optional secondary outline button label."
38
+ },
39
+ "secondaryHref": {
40
+ "description": "Optional trusted URL for the secondary button."
41
+ },
42
+ "showSubscribe": {
43
+ "description": "Boolean. Render an inline Ghost members signup form instead of CTA buttons."
44
+ },
45
+ "coverImage": {
46
+ "description": "Optional image URL; falls back to @site.cover_image."
47
+ },
48
+ "imageAlt": {
49
+ "description": "Alternative text for the cover image."
50
+ }
51
+ },
52
+ "files": [
53
+ {
54
+ "name": "hero.hbs",
55
+ "type": "partial",
56
+ "target": "partials/components/hero.hbs",
57
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, buttonClass, imageClass --}}\n{{#with this as |ghostcnStyles|}}\n<section class=\"ghcn-hero{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"split\"}}split{{else}}{{#match variant \"editorial\"}}editorial{{else}}{{#match variant \"cover\"}}cover{{else}}default{{/match}}{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}{{@site.title}}{{/if}}\">\n <div class=\"ghcn-hero__inner ghcn-container\">\n <div class=\"ghcn-hero__body\">\n {{#if eyebrow}}<span class=\"ghcn-hero__eyebrow ghcn-badge\">{{eyebrow}}</span>{{/if}}\n <h1 class=\"ghcn-hero__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}{{@site.title}}{{/if}}</h1>\n {{#if description}}\n <p class=\"ghcn-hero__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>\n {{else}}{{#if @site.description}}\n <p class=\"ghcn-hero__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{@site.description}}</p>\n {{/if}}{{/if}}\n\n {{#if showSubscribe}}\n {{#if @site.members_enabled}}{{#unless @site.members_invite_only}}{{#if @site.allow_self_signup}}{{#unless @member}}\n <form class=\"ghcn-hero__form\" data-members-form=\"subscribe\">\n <input class=\"ghcn-hero__input\" data-members-email type=\"email\" autocomplete=\"email\" required aria-label=\"Email address\" placeholder=\"you@example.com\" />\n <button class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" type=\"submit\">{{#if primaryText}}{{primaryText}}{{else}}Subscribe{{/if}}</button>\n <p class=\"ghcn-hero__msg ghcn-hero__msg--success\" role=\"status\" data-members-success>Check your inbox to confirm your subscription.</p>\n <p class=\"ghcn-hero__msg ghcn-hero__msg--error\" role=\"alert\" data-members-error>Please enter a valid email address.</p>\n </form>\n {{/unless}}{{/if}}{{/unless}}{{/if}}\n {{else}}\n <div class=\"ghcn-hero__actions\">\n {{#if primaryText}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"{{#if primaryHref}}{{primaryHref}}{{else}}#/portal/signup{{/if}}\"{{#if primaryPortal}} data-portal=\"{{primaryPortal}}\"{{/if}}>{{primaryText}}</a>{{/if}}\n {{#if secondaryText}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{#if secondaryHref}}{{secondaryHref}}{{else}}/archive/{{/if}}\">{{secondaryText}}</a>{{/if}}\n </div>\n {{/if}}\n </div>\n\n {{#if coverImage}}\n <figure class=\"ghcn-hero__media\">\n <img class=\"ghcn-hero__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url coverImage size=\"l\"}}\" alt=\"{{#if imageAlt}}{{imageAlt}}{{else}}{{@site.title}}{{/if}}\" loading=\"eager\" />\n </figure>\n {{else}}{{#if @site.cover_image}}\n <figure class=\"ghcn-hero__media\">\n <img class=\"ghcn-hero__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url @site.cover_image size=\"l\"}}\" alt=\"{{@site.title}}\" loading=\"eager\" />\n </figure>\n {{/if}}{{/if}}\n </div>\n</section>\n{{/with}}"
58
+ },
59
+ {
60
+ "name": "hero.css",
61
+ "type": "style",
62
+ "target": "assets/css/components/hero.css",
63
+ "content": ".ghcn-hero { box-sizing: border-box; width: 100%; padding-block: clamp(32px, 5vw, 60px); color: var(--foreground); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; }\n.ghcn-hero *, .ghcn-hero *::before, .ghcn-hero *::after { box-sizing: border-box; }\n.ghcn-hero__inner { display: grid; gap: clamp(28px, 4.5vw, 56px); align-items: center; }\n.ghcn-hero__body { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 760px; margin-inline: auto; }\n.ghcn-hero__eyebrow { margin-bottom: 16px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); background: transparent; border: 0; padding: 0; }\n.ghcn-hero__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(36px, 5.4vw, 62px); line-height: 1.05; letter-spacing: -0.04em; margin: 0; color: var(--foreground); }\n.ghcn-hero__description { max-width: 54ch; margin: 18px 0 0; color: var(--muted-foreground); font-size: clamp(16.5px, 2vw, 20px); line-height: 1.58; }\n.ghcn-hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; }\n.ghcn-hero__actions:empty { display: none; }\n.ghcn-hero__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 5px; width: min(100%, 460px); margin-top: 28px; border: 1px solid var(--input, var(--border)); border-radius: calc(var(--ghcn-control-radius, var(--radius, 8px)) + 4px); background: var(--card, var(--background)); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }\n.ghcn-hero__form:focus-within { border-color: var(--ring, var(--primary)); }\n.ghcn-hero__input { min-width: 0; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: transparent; color: var(--foreground); font: inherit; font-size: 14.5px; outline: none; }\n.ghcn-hero__msg { display: none; grid-column: 1 / -1; margin: 4px 8px 2px; font-size: var(--ghcn-text-meta, 13px); font-weight: 500; }\n.ghcn-hero__form.success .ghcn-hero__msg--success { display: block; color: var(--success, #15803d); }\n.ghcn-hero__form.error .ghcn-hero__msg--error { display: block; color: var(--destructive, #dc2626); }\n.ghcn-hero__media { margin: 0; width: 100%; overflow: hidden; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 8px); border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); box-shadow: 0 16px 40px rgba(0, 0, 0, .08); }\n.ghcn-hero__image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }\n\n/* Split: left text + right artwork on desktop */\n.ghcn-hero:where([data-variant=\"split\"]) .ghcn-hero__body { align-items: flex-start; text-align: left; margin-inline: 0; }\n.ghcn-hero:where([data-variant=\"split\"]) .ghcn-hero__actions { justify-content: flex-start; }\n@media (min-width: 860px) {\n .ghcn-hero:where([data-variant=\"split\"]) .ghcn-hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }\n .ghcn-hero:where([data-variant=\"split\"]) .ghcn-hero__image { aspect-ratio: 4 / 3; }\n}\n\n/* Editorial: left-aligned typography with clean bottom rule */\n.ghcn-hero:where([data-variant=\"editorial\"]) { border-bottom: 1px solid var(--border); padding-block: clamp(36px, 5vw, 60px); }\n.ghcn-hero:where([data-variant=\"editorial\"]) .ghcn-hero__body { align-items: flex-start; text-align: left; margin-inline: 0; max-width: 820px; }\n.ghcn-hero:where([data-variant=\"editorial\"]) .ghcn-hero__actions { justify-content: flex-start; }\n\n/* Cover: elevated bordered banner surface */\n.ghcn-hero:where([data-variant=\"cover\"]) { padding-block: clamp(20px, 4vw, 36px); }\n.ghcn-hero:where([data-variant=\"cover\"]) .ghcn-hero__inner { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 8px); padding: clamp(28px, 5vw, 56px); background: var(--card); }\n\n@media (max-width: 480px) {\n .ghcn-hero__form { grid-template-columns: 1fr; }\n}\n.ghcn-hero:focus-visible, :where(.ghcn-hero) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
64
+ }
65
+ ],
66
+ "gscan": {
67
+ "rules_satisfied": [
68
+ "GS010-PJ-VALID"
69
+ ],
70
+ "notes": "Uses native Ghost content and site helpers."
71
+ },
72
+ "styleSlots": {
73
+ "class": [
74
+ ".ghcn-hero"
75
+ ],
76
+ "titleClass": [
77
+ ".ghcn-hero__title"
78
+ ],
79
+ "descriptionClass": [
80
+ ".ghcn-hero__description"
81
+ ],
82
+ "buttonClass": [
83
+ ".ghcn-button"
84
+ ],
85
+ "imageClass": [
86
+ ".ghcn-hero__image"
87
+ ]
88
+ }
89
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "image-lightbox",
3
+ "type": "components:content",
4
+ "description": "Zero-dependency zoom lightbox for Ghost Koenig image and gallery cards with keyboard navigation.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "contentSelector": {
9
+ "description": "CSS selector containing Ghost Koenig image/gallery cards.",
10
+ "default": ".ghcn-article-content"
11
+ }
12
+ },
13
+ "files": [
14
+ {
15
+ "name": "image-lightbox.hbs",
16
+ "type": "partial",
17
+ "target": "partials/components/image-lightbox.hbs",
18
+ "content": "{{!-- Styling parameters: class --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-lightbox{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-lightbox data-content-selector=\"{{#if contentSelector}}{{contentSelector}}{{else}}.ghcn-article-content{{/if}}\">\n <dialog class=\"ghcn-lightbox__dialog\" aria-label=\"Image viewer\">\n <div class=\"ghcn-lightbox__frame\">\n <div class=\"ghcn-lightbox__toolbar\">\n <span class=\"ghcn-lightbox__counter\" data-lightbox-counter></span>\n <button type=\"button\" class=\"ghcn-lightbox__btn\" data-lightbox-close aria-label=\"Close image viewer\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\"><path d=\"M4 4l8 8M12 4l-8 8\"/></svg>\n </button>\n </div>\n <div class=\"ghcn-lightbox__stage\">\n <button type=\"button\" class=\"ghcn-lightbox__btn ghcn-lightbox__nav\" data-lightbox-prev aria-label=\"Previous image\" hidden>&larr;</button>\n <img class=\"ghcn-lightbox__img\" data-lightbox-img alt=\"\" />\n <button type=\"button\" class=\"ghcn-lightbox__btn ghcn-lightbox__nav\" data-lightbox-next aria-label=\"Next image\" hidden>&rarr;</button>\n </div>\n <p class=\"ghcn-lightbox__caption\" data-lightbox-caption></p>\n </div>\n </dialog>\n</div>\n{{/with}}"
19
+ },
20
+ {
21
+ "name": "image-lightbox.css",
22
+ "type": "style",
23
+ "target": "assets/css/components/image-lightbox.css",
24
+ "content": ".ghcn-lightbox-trigger { cursor: zoom-in; transition: opacity 150ms ease; }\n.ghcn-lightbox-trigger:hover { opacity: 0.94; }\n.ghcn-lightbox__dialog { padding: 16px; border: 0; background: transparent; max-width: min(100vw - 32px, 1100px); max-height: calc(100dvh - 32px); width: 100%; overflow: visible; color: #fafafa; }\n.ghcn-lightbox__dialog::backdrop { background: rgba(10, 10, 10, 0.86); backdrop-filter: blur(4px); }\n.ghcn-lightbox__frame { display: grid; gap: 12px; justify-items: center; }\n.ghcn-lightbox__toolbar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n.ghcn-lightbox__counter { font-size: 13px; color: #d4d4d8; font-variant-numeric: tabular-nums; }\n.ghcn-lightbox__stage { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }\n.ghcn-lightbox__img { display: block; max-width: 100%; max-height: 76dvh; border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); object-fit: contain; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); }\n.ghcn-lightbox__btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 9999px; background: rgba(24, 24, 27, 0.8); color: #fafafa; font: inherit; font-size: 16px; cursor: pointer; }\n.ghcn-lightbox__btn[hidden] { display: none; }\n.ghcn-lightbox__btn:hover { background: rgba(255, 255, 255, 0.16); }\n.ghcn-lightbox__caption { margin: 0; max-width: 64ch; text-align: center; font-size: 13px; color: #d4d4d8; }\n.ghcn-lightbox__caption:empty { display: none; }\n.ghcn-lightbox:focus-visible, :where(.ghcn-lightbox) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
25
+ },
26
+ {
27
+ "name": "image-lightbox.js",
28
+ "type": "js",
29
+ "target": "assets/js/components/image-lightbox.js",
30
+ "content": "/* ghostcn image-lightbox: click-to-zoom native <dialog> viewer for Ghost Koenig image/gallery cards. */\n(() => {\n function init() {\n document.querySelectorAll('[data-ghcn-lightbox]').forEach(root => {\n if (root.dataset.ghcnLightboxReady) return;\n const modal = root.querySelector('dialog');\n const stageImg = root.querySelector('[data-lightbox-img]');\n const captionEl = root.querySelector('[data-lightbox-caption]');\n const counterEl = root.querySelector('[data-lightbox-counter]');\n const prevBtn = root.querySelector('[data-lightbox-prev]');\n const nextBtn = root.querySelector('[data-lightbox-next]');\n if (!modal || !stageImg) return;\n root.dataset.ghcnLightboxReady = 'true';\n\n let scope = document;\n try {\n const target = document.querySelector(root.dataset.contentSelector || '.ghcn-article-content');\n if (target) scope = target;\n } catch {}\n\n const images = [...scope.querySelectorAll('.kg-image-card img, .kg-gallery-card img, [data-ghcn-zoomable]')].filter(img => !img.closest('a'));\n if (!images.length) return;\n let current = 0;\n\n const show = index => {\n current = ((index % images.length) + images.length) % images.length;\n const img = images[current];\n stageImg.src = img.currentSrc || img.src;\n stageImg.alt = img.alt || '';\n const fig = img.closest('figure');\n const cap = fig?.querySelector('figcaption')?.textContent?.trim() || img.alt || '';\n if (captionEl) captionEl.textContent = cap;\n if (counterEl) counterEl.textContent = images.length > 1 ? (current + 1) + ' / ' + images.length : '';\n if (prevBtn) prevBtn.hidden = images.length < 2;\n if (nextBtn) nextBtn.hidden = images.length < 2;\n };\n\n images.forEach((img, index) => {\n img.classList.add('ghcn-lightbox-trigger');\n img.setAttribute('tabindex', '0');\n img.setAttribute('role', 'button');\n img.setAttribute('aria-label', (img.alt ? img.alt + ' — ' : '') + 'Zoom image');\n const open = () => {\n show(index);\n if (typeof modal.showModal === 'function') modal.showModal();\n else modal.setAttribute('open', '');\n };\n img.addEventListener('click', open);\n img.addEventListener('keydown', event => {\n if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); open(); }\n });\n });\n\n root.querySelector('[data-lightbox-close]')?.addEventListener('click', () => modal.close());\n prevBtn?.addEventListener('click', () => show(current - 1));\n nextBtn?.addEventListener('click', () => show(current + 1));\n modal.addEventListener('click', event => { if (event.target === modal) modal.close(); });\n modal.addEventListener('keydown', event => {\n if (event.key === 'ArrowLeft' && images.length > 1) { event.preventDefault(); show(current - 1); }\n else if (event.key === 'ArrowRight' && images.length > 1) { event.preventDefault(); show(current + 1); }\n });\n });\n }\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
31
+ }
32
+ ],
33
+ "gscan": {
34
+ "rules_satisfied": [
35
+ "GS010-PJ-VALID"
36
+ ],
37
+ "notes": "Uses native <dialog> element and enhances unlinked .kg-image-card and .kg-gallery-card images."
38
+ },
39
+ "styleSlots": {
40
+ "class": [
41
+ ".ghcn-lightbox"
42
+ ]
43
+ }
44
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "magazine-grid",
3
+ "type": "components:content",
4
+ "description": "Editorial newsroom grid pairing a large featured lead story with a stacked right-hand dispatch rail.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Layout style: default, reversed, or compact.",
10
+ "options": [
11
+ "default",
12
+ "reversed",
13
+ "compact"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "heading": {
18
+ "description": "Optional section heading."
19
+ },
20
+ "actionText": {
21
+ "description": "Optional header link label.",
22
+ "default": "View all"
23
+ },
24
+ "actionHref": {
25
+ "description": "Optional header link URL."
26
+ }
27
+ },
28
+ "files": [
29
+ {
30
+ "name": "magazine-grid.hbs",
31
+ "type": "partial",
32
+ "target": "partials/components/magazine-grid.hbs",
33
+ "content": "{{!-- Styling parameters: class, titleClass, gridClass, itemClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if posts}}\n<section class=\"ghcn-magazine{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"reversed\"}}reversed{{else}}{{#match variant \"compact\"}}compact{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}Featured stories{{/if}}\">\n {{#if heading}}\n <header class=\"ghcn-magazine__header\">\n <h2 class=\"ghcn-magazine__heading{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</h2>\n {{#if actionHref}}<a class=\"ghcn-magazine__more\" href=\"{{actionHref}}\">{{#if actionText}}{{actionText}}{{else}}View all{{/if}} →</a>{{/if}}\n </header>\n {{/if}}\n <div class=\"ghcn-magazine__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts limit=\"5\"}}\n <article class=\"ghcn-magazine__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}} {{#if @first}}ghcn-magazine__item--lead{{else}}ghcn-magazine__item--side{{/if}}\">\n {{#if @first}}\n {{#if feature_image}}\n <a class=\"ghcn-magazine__lead-media\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img class=\"ghcn-magazine__img\" src=\"{{img_url feature_image size=\"l\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" loading=\"lazy\" />\n </a>\n {{/if}}\n <div class=\"ghcn-magazine__lead-body\">\n <div class=\"ghcn-magazine__meta\">\n {{#if primary_tag}}<a class=\"ghcn-magazine__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a><span aria-hidden=\"true\">·</span>{{/if}}\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span aria-hidden=\"true\">·</span>\n <span>{{reading_time}}</span>\n </div>\n <h3 class=\"ghcn-magazine__lead-title\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-magazine__excerpt\">{{excerpt words=\"28\"}}</p>{{/if}}\n {{#primary_author}}<p class=\"ghcn-magazine__author\">By <a href=\"{{url}}\">{{name}}</a></p>{{/primary_author}}\n </div>\n {{else}}\n <div class=\"ghcn-magazine__side-body\">\n <div class=\"ghcn-magazine__meta\">\n {{#if primary_tag}}<a class=\"ghcn-magazine__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a><span aria-hidden=\"true\">·</span>{{/if}}\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM\"}}</time>\n </div>\n <h3 class=\"ghcn-magazine__side-title\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-magazine__side-excerpt\">{{excerpt words=\"16\"}}</p>{{/if}}\n </div>\n {{#if feature_image}}\n <a class=\"ghcn-magazine__side-media\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img class=\"ghcn-magazine__img\" src=\"{{img_url feature_image size=\"s\"}}\" alt=\"\" loading=\"lazy\" />\n </a>\n {{/if}}\n {{/if}}\n </article>\n {{/foreach}}\n </div>\n</section>\n{{/if}}\n{{/with}}"
34
+ },
35
+ {
36
+ "name": "magazine-grid.css",
37
+ "type": "style",
38
+ "target": "assets/css/components/magazine-grid.css",
39
+ "content": ".ghcn-magazine { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-magazine *, .ghcn-magazine *::before, .ghcn-magazine *::after { box-sizing: border-box; }\n.ghcn-magazine__header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }\n.ghcn-magazine__heading { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; }\n.ghcn-magazine__more { font-size: 13.5px; font-weight: 600; color: var(--muted-foreground); text-decoration: none; white-space: nowrap; transition: color 150ms ease; }\n.ghcn-magazine__more:hover { color: var(--foreground); }\n.ghcn-magazine__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }\n@media (min-width: 820px) {\n .ghcn-magazine__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }\n .ghcn-magazine__item--lead { grid-column: 1; grid-row: 1 / span 6; }\n .ghcn-magazine__item--side { grid-column: 2; }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__item--lead { grid-column: 2; }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__item--side { grid-column: 1; }\n}\n.ghcn-magazine__item--lead { display: grid; gap: 18px; }\n.ghcn-magazine__lead-media { display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px); overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); }\n.ghcn-magazine__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }\n.ghcn-magazine__item:hover .ghcn-magazine__img { transform: scale(1.03); }\n.ghcn-magazine__lead-body { display: grid; gap: 10px; }\n.ghcn-magazine__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted-foreground); }\n.ghcn-magazine__tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; background: var(--secondary); color: var(--foreground); font-size: 11.5px; font-weight: 600; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }\n.ghcn-magazine__tag:hover { background: var(--primary); color: var(--primary-foreground); }\n.ghcn-magazine__lead-title { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.035em; }\n.ghcn-magazine__lead-title a, .ghcn-magazine__side-title a { color: inherit; text-decoration: none; transition: opacity 150ms ease; }\n.ghcn-magazine__lead-title a:hover, .ghcn-magazine__side-title a:hover { opacity: 0.78; }\n.ghcn-magazine__excerpt { margin: 0; color: var(--muted-foreground); font-size: 15.5px; line-height: 1.6; }\n.ghcn-magazine__author { margin: 4px 0 0; font-size: 13px; color: var(--muted-foreground); }\n.ghcn-magazine__author a { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-magazine__author a:hover { text-decoration: underline; }\n.ghcn-magazine__item--side { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-block: 18px; border-bottom: 1px solid var(--border); }\n.ghcn-magazine__item--side:nth-child(2) { padding-top: 0; }\n.ghcn-magazine__item--side:last-child { border-bottom: 0; padding-bottom: 0; }\n.ghcn-magazine__side-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }\n.ghcn-magazine__side-title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; font-size: 17px; line-height: 1.3; }\n.ghcn-magazine__side-excerpt { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.ghcn-magazine:where([data-variant=\"compact\"]) .ghcn-magazine__side-excerpt { display: none; }\n.ghcn-magazine__side-media { flex: 0 0 112px; aspect-ratio: 4 / 3; border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); }\n@media (prefers-reduced-motion: reduce) { .ghcn-magazine__img { transition: none; transform: none; } }\n.ghcn-magazine:focus-visible, :where(.ghcn-magazine) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
40
+ }
41
+ ],
42
+ "gscan": {
43
+ "rules_satisfied": [
44
+ "GS010-PJ-VALID"
45
+ ],
46
+ "notes": "Uses standard Ghost post loop helpers (feature_image, primary_tag, excerpt, reading_time, primary_author)."
47
+ },
48
+ "styleSlots": {
49
+ "class": [
50
+ ".ghcn-magazine"
51
+ ],
52
+ "titleClass": [
53
+ ".ghcn-magazine__heading"
54
+ ],
55
+ "gridClass": [
56
+ ".ghcn-magazine__grid"
57
+ ],
58
+ "itemClass": [
59
+ ".ghcn-magazine__item"
60
+ ]
61
+ }
62
+ }