ghostcn 1.1.0 → 1.4.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 (70) hide show
  1. package/README.md +225 -3
  2. package/dist/commands/add.d.ts +6 -1
  3. package/dist/commands/add.js +121 -83
  4. package/dist/commands/create.js +8 -1
  5. package/dist/commands/diff.d.ts +5 -0
  6. package/dist/commands/diff.js +54 -0
  7. package/dist/commands/doctor.d.ts +1 -0
  8. package/dist/commands/doctor.js +7 -0
  9. package/dist/commands/init.js +5 -0
  10. package/dist/commands/pack.d.ts +1 -0
  11. package/dist/commands/pack.js +8 -0
  12. package/dist/commands/playground.d.ts +3 -0
  13. package/dist/commands/playground.js +29 -0
  14. package/dist/index.js +20 -2
  15. package/dist/registry/components/alert.json +62 -0
  16. package/dist/registry/components/archive-header.json +57 -0
  17. package/dist/registry/components/author-card.json +23 -2
  18. package/dist/registry/components/author-list.json +55 -0
  19. package/dist/registry/components/badge.json +51 -0
  20. package/dist/registry/components/button.json +74 -0
  21. package/dist/registry/components/card.json +70 -0
  22. package/dist/registry/components/featured-posts.json +18 -1
  23. package/dist/registry/components/input.json +94 -0
  24. package/dist/registry/components/member-cta.json +15 -1
  25. package/dist/registry/components/newsletter-form.json +23 -2
  26. package/dist/registry/components/pagination.json +12 -1
  27. package/dist/registry/components/post-card.json +25 -2
  28. package/dist/registry/components/post-grid.json +54 -0
  29. package/dist/registry/components/post-header.json +18 -1
  30. package/dist/registry/components/post-navigation.json +41 -0
  31. package/dist/registry/components/pricing-table.json +34 -5
  32. package/dist/registry/components/related-posts.json +53 -0
  33. package/dist/registry/components/site-footer.json +15 -1
  34. package/dist/registry/components/site-header.json +17 -2
  35. package/dist/registry/components/table-of-contents.json +47 -0
  36. package/dist/registry/components/tag-grid.json +64 -0
  37. package/dist/registry/components/tag-list.json +38 -0
  38. package/dist/registry/index.json +131 -0
  39. package/dist/templates/playground/index.html +5 -0
  40. package/dist/templates/playground/playground.css +18 -0
  41. package/dist/templates/playground/playground.js +71 -0
  42. package/dist/templates/playground/preview.css +5 -0
  43. package/dist/templates/playground/preview.js +12 -0
  44. package/dist/templates/theme-tools.mjs +178 -0
  45. package/dist/utils/component-diff.d.ts +18 -0
  46. package/dist/utils/component-diff.js +93 -0
  47. package/dist/utils/component-files.d.ts +9 -0
  48. package/dist/utils/component-files.js +48 -0
  49. package/dist/utils/component-history.d.ts +11 -0
  50. package/dist/utils/component-history.js +47 -0
  51. package/dist/utils/component-installer.d.ts +2 -0
  52. package/dist/utils/component-installer.js +34 -36
  53. package/dist/utils/component-plan.d.ts +7 -0
  54. package/dist/utils/component-plan.js +43 -0
  55. package/dist/utils/playground-server.d.ts +9 -0
  56. package/dist/utils/playground-server.js +189 -0
  57. package/dist/utils/preview-renderer.d.ts +143 -0
  58. package/dist/utils/preview-renderer.js +70 -0
  59. package/dist/utils/registry.d.ts +7 -0
  60. package/dist/utils/registry.js +12 -18
  61. package/dist/utils/styles.d.ts +3 -0
  62. package/dist/utils/styles.js +20 -0
  63. package/dist/utils/theme-files.d.ts +2 -0
  64. package/dist/utils/theme-files.js +46 -4
  65. package/dist/utils/theme-project.js +9 -4
  66. package/dist/utils/theme-scaffold.js +61 -24
  67. package/dist/utils/theme-tooling.d.ts +2 -0
  68. package/dist/utils/theme-tooling.js +20 -0
  69. package/dist/utils/theme.js +4 -2
  70. package/package.json +6 -4
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "input",
3
+ "type": "components:ui",
4
+ "description": "An accessible labeled native input, with optional hint and invalid/disabled states.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment; unknown values fall back to default.",
10
+ "options": [
11
+ "default",
12
+ "filled"
13
+ ],
14
+ "default": "default"
15
+ },
16
+ "size": {
17
+ "description": "Component scale; unknown values fall back to default.",
18
+ "options": [
19
+ "sm",
20
+ "default",
21
+ "lg"
22
+ ],
23
+ "default": "default"
24
+ },
25
+ "label": {
26
+ "description": "Visible accessible label.",
27
+ "default": "Input"
28
+ },
29
+ "type": {
30
+ "description": "Native input type.",
31
+ "options": [
32
+ "text",
33
+ "email",
34
+ "search",
35
+ "url",
36
+ "number",
37
+ "password"
38
+ ],
39
+ "default": "text"
40
+ },
41
+ "name": {
42
+ "description": "Form field name."
43
+ },
44
+ "value": {
45
+ "description": "Initial field value."
46
+ },
47
+ "placeholder": {
48
+ "description": "Optional placeholder (not a label)."
49
+ },
50
+ "hint": {
51
+ "description": "Optional help text."
52
+ },
53
+ "hintId": {
54
+ "description": "Unique ID for help text; provide with hint for aria-describedby."
55
+ },
56
+ "invalid": {
57
+ "description": "Boolean invalid state."
58
+ },
59
+ "required": {
60
+ "description": "Boolean required state."
61
+ },
62
+ "disabled": {
63
+ "description": "Boolean disabled state."
64
+ }
65
+ },
66
+ "files": [
67
+ {
68
+ "name": "input.hbs",
69
+ "type": "partial",
70
+ "target": "partials/components/input.hbs",
71
+ "content": "{{!-- Styling parameters: class, labelClass, inputClass, descriptionClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-ui-field{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"filled\"}}filled{{else}}default{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\">\n <label class=\"ghcn-ui-field__label\"><span class=\"ghcn-ui-field__label-text{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">{{#if label}}{{label}}{{else}}Input{{/if}}{{#if required}} (required){{/if}}</span>\n <input class=\"ghcn-ui-field__input{{#if ghostcnStyles.inputClass}} {{ghostcnStyles.inputClass}}{{/if}}\" type=\"{{#match type \"email\"}}email{{else}}{{#match type \"search\"}}search{{else}}{{#match type \"url\"}}url{{else}}{{#match type \"number\"}}number{{else}}{{#match type \"password\"}}password{{else}}text{{/match}}{{/match}}{{/match}}{{/match}}{{/match}}\" {{#if name}}name=\"{{name}}\"{{/if}} value=\"{{value}}\" placeholder=\"{{placeholder}}\" {{#if required}}required{{/if}} {{#if disabled}}disabled{{/if}} {{#if invalid}}aria-invalid=\"true\"{{/if}} {{#if hintId}}aria-describedby=\"{{hintId}}\"{{/if}} />\n </label>\n {{#if hint}}<p class=\"ghcn-ui-field__hint{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\" {{#if hintId}}id=\"{{hintId}}\"{{/if}}>{{hint}}</p>{{/if}}\n</div>\n{{/with}}"
72
+ },
73
+ {
74
+ "name": "input.css",
75
+ "type": "style",
76
+ "target": "assets/css/components/input.css",
77
+ "content": ".ghcn-ui-field { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-field, .ghcn-ui-field * { box-sizing: border-box; }\n.ghcn-ui-field:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-field:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-field:focus-visible, .ghcn-ui-field :focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }\n.ghcn-ui-field { width: 100%; }\n.ghcn-ui-field__label { display: grid; gap: .375em; font-weight: 500; }\n.ghcn-ui-field__input { width: 100%; min-width: 0; min-height: 2.5em; padding: .5em .75em; border: 1px solid var(--input); border-radius: var(--radius); background: var(--background); color: var(--foreground); font: inherit; }\n:where(.ghcn-ui-field[data-variant=\"filled\"]) .ghcn-ui-field__input { background: var(--muted); }\n.ghcn-ui-field__input::placeholder { color: var(--muted-foreground); }\n.ghcn-ui-field__input[aria-invalid=\"true\"] { border-color: var(--destructive); }\n.ghcn-ui-field__input:disabled { opacity: .5; cursor: not-allowed; }\n.ghcn-ui-field__hint { color: var(--muted-foreground); font-size: .875em; margin: .5em 0 0; }\n"
78
+ }
79
+ ],
80
+ "styleSlots": {
81
+ "class": [
82
+ ".ghcn-ui-field"
83
+ ],
84
+ "labelClass": [
85
+ ".ghcn-ui-field__label-text"
86
+ ],
87
+ "inputClass": [
88
+ ".ghcn-ui-field__input"
89
+ ],
90
+ "descriptionClass": [
91
+ ".ghcn-ui-field__hint"
92
+ ]
93
+ }
94
+ }
@@ -9,7 +9,7 @@
9
9
  "name": "member-cta.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/member-cta.hbs",
12
- "content": "{{!-- Component: Member CTA | Usage: inside {{#post}} after {{content}} --}}\n<aside class=\"ghcn-member-cta\">\n {{#if access}}\n {{#if @member}}\n <span class=\"ghcn-badge\">Member access</span>\n <h2>You’re all caught up</h2>\n <p>Manage your subscription, email preferences, and account details in Portal.</p>\n <a class=\"ghcn-button ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{else}}\n <span class=\"ghcn-badge\">Join the publication</span>\n <h2>Enjoying this story?</h2>\n <p>Subscribe for new posts and member updates delivered directly to your inbox.</p>\n <div class=\"ghcn-member-cta__actions\"><a class=\"ghcn-button\" href=\"#/portal/signup\" data-portal=\"signup\">Subscribe</a><a class=\"ghcn-button ghcn-button--ghost\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a></div>\n {{/if}}\n {{else}}\n {{#if @member.paid}}\n <span class=\"ghcn-badge\">Account required</span>\n <h2>This post isn’t included in your plan</h2>\n <p>Open your account to review your membership and available plans.</p>\n <a class=\"ghcn-button\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">View plans</a>\n {{else if @member}}\n <span class=\"ghcn-badge\">Paid members</span>\n <h2>Upgrade to continue reading</h2>\n <p>Become a paid member to unlock this post and the complete archive.</p>\n <a class=\"ghcn-button\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">Upgrade membership</a>\n {{else}}\n <span class=\"ghcn-badge\">Members only</span>\n <h2>Continue reading with a membership</h2>\n <p>Sign up to unlock this post. Already a member? Sign in to continue.</p>\n <div class=\"ghcn-member-cta__actions\"><a class=\"ghcn-button\" href=\"#/portal/signup\" data-portal=\"signup\">Become a member</a><a class=\"ghcn-button ghcn-button--outline\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a></div>\n {{/if}}\n {{/if}}\n</aside>"
12
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Member CTA | Usage: inside {{#post}} after {{content}} --}}\n{{#if @site.members_enabled}}\n<aside class=\"ghcn-member-cta{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n {{#if access}}\n {{#if @member}}\n <span class=\"ghcn-badge\">Member access</span>\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">You’re all caught up</h2>\n <p class=\"ghcn-member-cta__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">Manage your subscription, email preferences, and account details in Portal.</p>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{else}}\n {{#if @site.allow_self_signup}}\n <span class=\"ghcn-badge\">Join the publication</span>\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Enjoying this story?</h2>\n <p class=\"ghcn-member-cta__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">Subscribe for new posts and member updates delivered directly to your inbox.</p>\n <div class=\"ghcn-member-cta__actions\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup\" data-portal=\"signup\">Subscribe</a><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--ghost\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a></div>\n {{else}}\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Already a member?</h2>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a>\n {{/if}}\n {{/if}}\n {{else}}\n {{#if @member.paid}}\n <span class=\"ghcn-badge\">Account required</span>\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">This post isn’t included in your plan</h2>\n <p class=\"ghcn-member-cta__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">Open your account to review your membership and available plans.</p>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{else if @member}}\n {{#if @site.paid_members_enabled}}\n {{#if @site.allow_self_signup}}\n <span class=\"ghcn-badge\">Paid members</span>\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Upgrade to continue reading</h2>\n <p class=\"ghcn-member-cta__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">Review the available plans to find one that includes this post.</p>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">Upgrade membership</a>\n {{else}}\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">This post requires a different membership</h2>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{/if}}\n {{else}}\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">This post is not available with your membership</h2>\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{/if}}\n {{else}}\n <span class=\"ghcn-badge\">Members only</span>\n <h2 class=\"ghcn-member-cta__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Continue reading with a membership</h2>\n <p class=\"ghcn-member-cta__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">This post requires a membership with access. Already a member? Sign in to continue.</p>\n <div class=\"ghcn-member-cta__actions\">{{#if @site.allow_self_signup}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup\" data-portal=\"signup\">View memberships</a>{{/if}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a></div>\n {{/if}}\n {{/if}}\n</aside>\n{{/if}}\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "member-cta.css",
@@ -23,5 +23,19 @@
23
23
  "GS010-PJ-VALID"
24
24
  ],
25
25
  "notes": "Uses post access, member state, paid status, and native Portal triggers."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".ghcn-member-cta"
30
+ ],
31
+ "titleClass": [
32
+ ".ghcn-member-cta__title"
33
+ ],
34
+ "descriptionClass": [
35
+ ".ghcn-member-cta__description"
36
+ ],
37
+ "buttonClass": [
38
+ ".ghcn-button"
39
+ ]
26
40
  }
27
41
  }
@@ -9,13 +9,13 @@
9
9
  "name": "newsletter-form.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/newsletter-form.hbs",
12
- "content": "{{!--\n Component: Newsletter Form\n Usage: {{> \"components/newsletter-form\" title=\"Subscribe to our newsletter\" description=\"Get the latest posts delivered right to your inbox.\"}}\n--}}\n<section class=\"gh-newsletter-form bg-card text-card-foreground border border-border p-8 rounded-ghostcn text-center max-w-2xl mx-auto my-8 shadow-sm\">\n <div class=\"mb-6\">\n <h3 class=\"gh-newsletter-title text-2xl font-bold tracking-tight mb-2 text-foreground\">\n {{#if title}}{{title}}{{else}}Subscribe to our newsletter{{/if}}\n </h3>\n <p class=\"gh-newsletter-desc text-muted-foreground max-w-md mx-auto text-sm leading-relaxed\">\n {{#if description}}{{description}}{{else}}Get the latest stories, news, and perspectives delivered directly to your inbox.{{/if}}\n </p>\n </div>\n\n {{!-- Ghost native members form handling --}}\n <form data-members-form=\"subscribe\" class=\"gh-newsletter-fields flex flex-col sm:flex-row gap-3 max-w-md mx-auto relative\">\n <label for=\"gh-email\" class=\"sr-only\">Email address</label>\n <input\n data-members-email\n type=\"email\"\n id=\"gh-email\"\n required\n placeholder=\"jamie@example.com\"\n class=\"gh-newsletter-input flex-1 px-4 py-2.5 bg-background text-foreground border border-input rounded-ghostcn text-sm focus:outline-none focus:ring-2 focus:ring-ring transition-shadow\"\n />\n <button type=\"submit\" class=\"gh-newsletter-btn bg-primary text-primary-foreground px-6 py-2.5 rounded-ghostcn text-sm font-medium hover:opacity-90 transition-opacity flex items-center justify-center shadow-sm\">\n <span class=\"button-text\">Subscribe</span>\n </button>\n\n {{!-- Ghost automatic states (hidden by default, shown via Ghost Portal JS) --}}\n <div class=\"gh-newsletter-msg-success message-success hidden absolute -bottom-7 left-0 right-0 text-xs text-green-600 dark:text-green-400 font-medium\" data-members-success>\n ✓ Check your inbox to confirm your subscription!\n </div>\n <div class=\"gh-newsletter-msg-error message-error hidden absolute -bottom-7 left-0 right-0 text-xs text-red-600 dark:text-red-400 font-medium\" data-members-error>\n ✕ Please enter a valid email address.\n </div>\n </form>\n</section>"
12
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, formClass, inputClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!--\n Component: Newsletter Form\n Usage: {{> \"components/newsletter-form\" title=\"Subscribe to our newsletter\" description=\"Get the latest posts delivered right to your inbox.\"}}\n--}}\n{{#if @site.members_enabled}}\n{{#unless @site.members_invite_only}}\n{{#if @site.allow_self_signup}}\n{{#unless @member}}\n<section class=\"gh-newsletter-form{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n <div class=\"gh-newsletter-heading\">\n <h3 class=\"gh-newsletter-title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">\n {{#if title}}{{title}}{{else}}Subscribe to our newsletter{{/if}}\n </h3>\n <p class=\"gh-newsletter-desc{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">\n {{#if description}}{{description}}{{else}}Get the latest stories, news, and perspectives delivered directly to your inbox.{{/if}}\n </p>\n </div>\n\n {{!-- Ghost native members form handling --}}\n {{#if @site.portal_signup_checkbox_required}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup\" data-portal=\"signup\">Subscribe</a>\n {{else}}\n <form data-members-form=\"subscribe\" class=\"gh-newsletter-fields{{#if ghostcnStyles.formClass}} {{ghostcnStyles.formClass}}{{/if}}\">\n <input\n data-members-email\n type=\"email\"\n aria-label=\"Email address\"\n autocomplete=\"email\"\n required\n placeholder=\"jamie@example.com\"\n class=\"gh-newsletter-input{{#if ghostcnStyles.inputClass}} {{ghostcnStyles.inputClass}}{{/if}}\"\n />\n <button type=\"submit\" class=\"gh-newsletter-btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\">\n <span class=\"button-text\">Subscribe</span>\n </button>\n\n {{!-- Ghost automatic states (hidden by default, shown via Ghost Portal JS) --}}\n <div class=\"gh-newsletter-msg-success message-success\" role=\"status\" data-members-success>\n ✓ Check your inbox to confirm your subscription!\n </div>\n <div class=\"gh-newsletter-msg-error message-error\" role=\"alert\" data-members-error>\n ✕ Please enter a valid email address.\n </div>\n </form>\n {{/if}}\n</section>\n{{/unless}}\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "newsletter-form.css",
16
16
  "type": "style",
17
17
  "target": "assets/css/components/newsletter-form.css",
18
- "content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n padding: 2em;\n text-align: center;\n max-width: 42em;\n margin: 2em auto;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-newsletter-form *,\n.gh-newsletter-form *::before,\n.gh-newsletter-form *::after {\n box-sizing: border-box;\n}\n\n.gh-newsletter-title {\n font-size: 1.5em;\n font-weight: 700;\n letter-spacing: -0.025em;\n margin-bottom: 0.5em;\n color: var(--foreground, #09090b);\n}\n\n.gh-newsletter-desc {\n color: var(--muted-foreground, #71717a);\n font-size: 0.875em;\n line-height: 1.5;\n margin: 0 auto 1.5em;\n max-width: 28em;\n}\n\n.gh-newsletter-fields {\n display: flex;\n flex-direction: column;\n gap: 0.75em;\n max-width: 28em;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n flex-direction: row;\n }\n}\n\n.gh-newsletter-input {\n flex: 1;\n padding: 0.625em 1em;\n background-color: var(--background, #ffffff);\n color: var(--foreground, #09090b);\n border: 1px solid var(--input, #e4e4e7);\n border-radius: var(--radius, 0.5em);\n font-size: 0.875em;\n outline: none;\n transition: box-shadow 0.15s ease, border-color 0.15s ease;\n}\n\n.gh-newsletter-input:focus {\n border-color: var(--ring, #18181b);\n box-shadow: 0 0 0 2px var(--ring, #18181b);\n}\n\n.gh-newsletter-btn {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n padding: 0.625em 1.5em;\n border-radius: var(--radius, 0.5em);\n font-size: 0.875em;\n font-weight: 500;\n border: none;\n cursor: pointer;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n transition: opacity 0.15s ease;\n}\n\n.gh-newsletter-btn:hover {\n opacity: 0.9;\n}\n\n.gh-newsletter-msg-success,\n.gh-newsletter-msg-error {\n display: none;\n position: absolute;\n bottom: -1.75em;\n left: 0;\n right: 0;\n font-size: 0.75em;\n font-weight: 500;\n}\n\n.gh-newsletter-fields.success .gh-newsletter-msg-success,\n.gh-newsletter-fields.error .gh-newsletter-msg-error {\n display: block;\n}\n\n.gh-newsletter-form .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.gh-newsletter-msg-success {\n color: #16a34a;\n}\n\n.gh-newsletter-msg-error {\n color: #dc2626;\n}\n"
18
+ "content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n padding: 2em;\n text-align: center;\n max-width: 42em;\n margin: 2em auto;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-newsletter-form *,\n.gh-newsletter-form *::before,\n.gh-newsletter-form *::after {\n box-sizing: border-box;\n}\n\n.gh-newsletter-heading { margin-bottom: 1.5em; }\n\n.gh-newsletter-title {\n font-size: 1.5em;\n font-weight: 700;\n letter-spacing: -0.025em;\n margin-bottom: 0.5em;\n color: var(--foreground, #09090b);\n}\n\n.gh-newsletter-desc {\n color: var(--muted-foreground, #71717a);\n font-size: 0.875em;\n line-height: 1.5;\n margin: 0 auto 1.5em;\n max-width: 28em;\n}\n\n.gh-newsletter-fields {\n display: flex;\n flex-direction: column;\n gap: 0.75em;\n max-width: 28em;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n flex-direction: row;\n }\n}\n\n.gh-newsletter-input {\n flex: 1;\n padding: 0.625em 1em;\n background-color: var(--background, #ffffff);\n color: var(--foreground, #09090b);\n border: 1px solid var(--input, #e4e4e7);\n border-radius: var(--radius, 0.5em);\n font-size: 0.875em;\n outline: none;\n transition: box-shadow 0.15s ease, border-color 0.15s ease;\n}\n\n.gh-newsletter-input:focus {\n border-color: var(--ring, #18181b);\n box-shadow: 0 0 0 2px var(--ring, #18181b);\n}\n\n.gh-newsletter-btn {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n padding: 0.625em 1.5em;\n border-radius: var(--radius, 0.5em);\n font-size: 0.875em;\n font-weight: 500;\n border: none;\n cursor: pointer;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n transition: opacity 0.15s ease;\n}\n\n.gh-newsletter-btn:hover {\n opacity: 0.9;\n}\n\n.gh-newsletter-msg-success,\n.gh-newsletter-msg-error {\n display: none;\n position: absolute;\n bottom: -1.75em;\n left: 0;\n right: 0;\n font-size: 0.75em;\n font-weight: 500;\n}\n\n.gh-newsletter-fields.success .gh-newsletter-msg-success,\n.gh-newsletter-fields.error .gh-newsletter-msg-error {\n display: block;\n}\n\n.gh-newsletter-form .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.gh-newsletter-msg-success {\n color: #16a34a;\n}\n\n.gh-newsletter-msg-error {\n color: #dc2626;\n}\n"
19
19
  }
20
20
  ],
21
21
  "gscan": {
@@ -24,5 +24,26 @@
24
24
  "GS050-MEMBERS-FORM"
25
25
  ],
26
26
  "notes": "Uses Ghost's native data-members-form attributes. No custom JS required."
27
+ },
28
+ "styleSlots": {
29
+ "class": [
30
+ ".gh-newsletter-form"
31
+ ],
32
+ "titleClass": [
33
+ ".gh-newsletter-title"
34
+ ],
35
+ "descriptionClass": [
36
+ ".gh-newsletter-desc"
37
+ ],
38
+ "formClass": [
39
+ ".gh-newsletter-fields"
40
+ ],
41
+ "inputClass": [
42
+ ".gh-newsletter-input"
43
+ ],
44
+ "buttonClass": [
45
+ ".gh-newsletter-btn",
46
+ ".ghcn-button"
47
+ ]
27
48
  }
28
49
  }
@@ -10,7 +10,7 @@
10
10
  "type": "partial",
11
11
  "target": "partials/pagination.hbs",
12
12
  "placement": "theme",
13
- "content": "<nav class=\"ghcn-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\">{{#if prev}}<a class=\"ghcn-button ghcn-button--outline\" href=\"{{page_url prev}}\" rel=\"prev\"><span aria-hidden=\"true\">&larr;</span> Newer</a>{{/if}}</div>\n <span class=\"ghcn-pagination__status\">Page <strong>{{page}}</strong> of <strong>{{pages}}</strong></span>\n <div class=\"ghcn-pagination__side ghcn-pagination__side--end\">{{#if next}}<a class=\"ghcn-button ghcn-button--outline\" href=\"{{page_url next}}\" rel=\"next\">Older <span aria-hidden=\"true\">&rarr;</span></a>{{/if}}</div>\n</nav>"
13
+ "content": "{{!-- Styling parameters: class, buttonClass, statusClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\">{{#if prev}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url prev}}\" rel=\"prev\"><span aria-hidden=\"true\">&larr;</span> Newer</a>{{/if}}</div>\n <span class=\"ghcn-pagination__status{{#if ghostcnStyles.statusClass}} {{ghostcnStyles.statusClass}}{{/if}}\">Page <strong>{{page}}</strong> of <strong>{{pages}}</strong></span>\n <div class=\"ghcn-pagination__side ghcn-pagination__side--end\">{{#if next}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url next}}\" rel=\"next\">Older <span aria-hidden=\"true\">&rarr;</span></a>{{/if}}</div>\n</nav>\n{{/with}}"
14
14
  },
15
15
  {
16
16
  "name": "pagination.css",
@@ -24,5 +24,16 @@
24
24
  "GS010-PJ-VALID"
25
25
  ],
26
26
  "notes": "Installs as partials/pagination.hbs so the native pagination helper uses it."
27
+ },
28
+ "styleSlots": {
29
+ "class": [
30
+ ".ghcn-pagination"
31
+ ],
32
+ "buttonClass": [
33
+ ".ghcn-button"
34
+ ],
35
+ "statusClass": [
36
+ ".ghcn-pagination__status"
37
+ ]
27
38
  }
28
39
  }
@@ -9,13 +9,13 @@
9
9
  "name": "post-card.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/post-card.hbs",
12
- "content": "{{!--\n Component: Post Card\n Usage: Inside {{#foreach posts}} ... {{> \"components/post-card\"}} ... {{/foreach}}\n--}}\n<article class=\"gh-post-card group bg-card text-card-foreground border border-border rounded-ghostcn overflow-hidden hover:shadow-lg transition-all duration-200 flex flex-col\">\n {{#if feature_image}}\n <a href=\"{{url}}\" class=\"gh-post-card-image block aspect-video overflow-hidden bg-muted\">\n <img src=\"{{img_url feature_image size=\"m\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" class=\"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300\" loading=\"lazy\" />\n </a>\n {{/if}}\n\n <div class=\"gh-post-card-content p-5 flex-1 flex flex-col justify-between\">\n <div>\n <div class=\"flex items-center gap-2 mb-2 text-xs font-semibold\">\n {{#if primary_tag}}\n <a href=\"{{primary_tag.url}}\" class=\"gh-post-card-tag text-primary uppercase tracking-wider hover:underline\">{{primary_tag.name}}</a>\n <span class=\"text-muted-foreground/40\">&bull;</span>\n {{/if}}\n <span class=\"gh-post-card-reading-time text-muted-foreground\">{{reading_time}}</span>\n </div>\n\n <h3 class=\"gh-post-card-title text-xl font-bold tracking-tight text-foreground mb-2 leading-snug group-hover:text-primary transition-colors\">\n <a href=\"{{url}}\">{{title}}</a>\n </h3>\n\n {{#if excerpt}}\n <p class=\"gh-post-card-excerpt text-muted-foreground text-sm line-clamp-3 mb-4 leading-relaxed\">{{excerpt words=\"25\"}}</p>\n {{/if}}\n </div>\n\n <div class=\"gh-post-card-footer pt-4 border-t border-border flex items-center justify-between text-xs text-muted-foreground\">\n <div class=\"flex items-center gap-2 font-medium\">\n {{#primary_author}}\n <span>{{name}}</span>\n {{/primary_author}}\n </div>\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n </div>\n </div>\n</article>"
12
+ "content": "{{!-- Styling parameters: class, imageClass, contentClass, titleClass, descriptionClass, metaClass, footerClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!--\n Component: Post Card\n Usage: Inside {{#foreach posts}} ... {{> \"components/post-card\"}} ... {{/foreach}}\n--}}\n<article class=\"gh-post-card{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}} group\">\n {{#if feature_image}}\n <a href=\"{{url}}\" class=\"gh-post-card-image\">\n <img src=\"{{img_url feature_image size=\"m\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" class=\"gh-post-card-img{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" loading=\"lazy\" />\n </a>\n {{/if}}\n\n <div class=\"gh-post-card-content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">\n <div>\n <div class=\"gh-post-card-meta{{#if ghostcnStyles.metaClass}} {{ghostcnStyles.metaClass}}{{/if}}\">\n {{#if primary_tag}}\n <a href=\"{{primary_tag.url}}\" class=\"gh-post-card-tag\">{{primary_tag.name}}</a>\n <span class=\"gh-post-card-separator\">&bull;</span>\n {{/if}}\n <span class=\"gh-post-card-reading-time\">{{reading_time}}</span>\n </div>\n\n <h3 class=\"gh-post-card-title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">\n <a href=\"{{url}}\">{{title}}</a>\n </h3>\n\n {{#if excerpt}}\n <p class=\"gh-post-card-excerpt{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{excerpt words=\"25\"}}</p>\n {{/if}}\n </div>\n\n <div class=\"gh-post-card-footer{{#if ghostcnStyles.footerClass}} {{ghostcnStyles.footerClass}}{{/if}}\">\n <div class=\"gh-post-card-author\">\n {{#primary_author}}\n <span>{{name}}</span>\n {{/primary_author}}\n </div>\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n </div>\n </div>\n</article>\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "post-card.css",
16
16
  "type": "style",
17
17
  "target": "assets/css/components/post-card.css",
18
- "content": "/* ghostcn: Post Card Styles */\n.gh-post-card {\n box-sizing: border-box;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-post-card *,\n.gh-post-card *::before,\n.gh-post-card *::after {\n box-sizing: border-box;\n}\n\n.gh-post-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n}\n\n.gh-post-card-image {\n aspect-ratio: 16 / 9;\n overflow: hidden;\n display: block;\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-post-card-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.gh-post-card:hover .gh-post-card-image img {\n transform: scale(1.03);\n}\n\n.gh-post-card-content {\n padding: 1.25em;\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.gh-post-card-tag {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n font-size: 0.75em;\n font-weight: 600;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n.gh-post-card-tag:hover {\n text-decoration: underline;\n}\n\n.gh-post-card-title {\n font-size: 1.25em;\n font-weight: 700;\n letter-spacing: -0.025em;\n margin: 0.5em 0;\n line-height: 1.35;\n}\n\n.gh-post-card-title a {\n color: var(--foreground, #09090b);\n text-decoration: none;\n transition: color 0.15s ease;\n}\n\n.gh-post-card-title a:hover {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n}\n\n.gh-post-card-excerpt {\n color: var(--muted-foreground, #71717a);\n font-size: 0.875em;\n line-height: 1.5;\n margin-bottom: 1em;\n}\n\n.gh-post-card-footer {\n padding-top: 1em;\n border-top: 1px solid var(--border, #e4e4e7);\n display: flex;\n justify-content: space-between;\n font-size: 0.75em;\n color: var(--muted-foreground, #71717a);\n}\n"
18
+ "content": "/* ghostcn: Post Card Styles */\n.gh-post-card {\n box-sizing: border-box;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-post-card *,\n.gh-post-card *::before,\n.gh-post-card *::after {\n box-sizing: border-box;\n}\n\n.gh-post-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n}\n\n.gh-post-card-image {\n aspect-ratio: 16 / 9;\n overflow: hidden;\n display: block;\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-post-card-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.gh-post-card:hover .gh-post-card-image img {\n transform: scale(1.03);\n}\n\n.gh-post-card-content {\n padding: 1.25em;\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.gh-post-card-tag {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n font-size: 0.75em;\n font-weight: 600;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n.gh-post-card-tag:hover {\n text-decoration: underline;\n}\n\n.gh-post-card-title {\n font-size: 1.25em;\n font-weight: 700;\n letter-spacing: -0.025em;\n margin: 0.5em 0;\n line-height: 1.35;\n color: var(--foreground, #09090b);\n}\n\n.gh-post-card-title a {\n color: inherit;\n text-decoration: none;\n transition: color 0.15s ease;\n}\n\n.gh-post-card-title:hover {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n}\n\n.gh-post-card-excerpt {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n overflow: hidden;\n color: var(--muted-foreground, #71717a);\n font-size: 0.875em;\n line-height: 1.5;\n margin-bottom: 1em;\n}\n\n.gh-post-card-footer {\n padding-top: 1em;\n border-top: 1px solid var(--border, #e4e4e7);\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.75em;\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-post-card-meta { display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.5em; font-size: 0.75em; font-weight: 600; }\n.gh-post-card-reading-time { color: var(--muted-foreground); }\n.gh-post-card-separator { color: color-mix(in srgb, var(--muted-foreground) 40%, transparent); }\n.gh-post-card-author { display: flex; align-items: center; gap: 0.5em; font-weight: 500; }\n"
19
19
  }
20
20
  ],
21
21
  "gscan": {
@@ -23,5 +23,28 @@
23
23
  "GS010-PJ-VALID"
24
24
  ],
25
25
  "notes": "Uses standard Ghost post helpers (feature_image, primary_tag, reading_time, excerpt, date)."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".gh-post-card"
30
+ ],
31
+ "imageClass": [
32
+ ".gh-post-card-img"
33
+ ],
34
+ "contentClass": [
35
+ ".gh-post-card-content"
36
+ ],
37
+ "titleClass": [
38
+ ".gh-post-card-title"
39
+ ],
40
+ "descriptionClass": [
41
+ ".gh-post-card-excerpt"
42
+ ],
43
+ "metaClass": [
44
+ ".gh-post-card-meta"
45
+ ],
46
+ "footerClass": [
47
+ ".gh-post-card-footer"
48
+ ]
26
49
  }
27
50
  }
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "post-grid",
3
+ "type": "components:content",
4
+ "description": "A responsive grid using post-card; pass posts from a loop, archive or get query.",
5
+ "dependencies": [
6
+ "post-card"
7
+ ],
8
+ "ghost_version": ">=5.0.0",
9
+ "parameters": {
10
+ "heading": {
11
+ "description": "Optional section heading."
12
+ },
13
+ "emptyText": {
14
+ "description": "Optional message when no content is available; otherwise render nothing."
15
+ }
16
+ },
17
+ "files": [
18
+ {
19
+ "name": "post-grid.hbs",
20
+ "type": "partial",
21
+ "target": "partials/components/post-grid.hbs",
22
+ "content": "{{!-- Styling parameters: class, titleClass, gridClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if posts}}\n<section class=\"ghcn-post-grid{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Posts\">\n {{#if heading}}<h2 class=\"ghcn-post-grid__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</h2>{{/if}}\n <div class=\"ghcn-post-grid__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">{{#foreach posts}}\n {{> \"components/post-card\" class=ghostcnStyles.cardClass titleClass=ghostcnStyles.cardTitleClass imageClass=ghostcnStyles.imageClass descriptionClass=ghostcnStyles.descriptionClass}}\n {{/foreach}}</div>\n</section>\n{{else}}{{#if emptyText}}<section class=\"ghcn-post-grid{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"><p class=\"ghcn-post-grid__empty\">{{emptyText}}</p></section>{{/if}}{{/if}}\n{{/with}}"
23
+ },
24
+ {
25
+ "name": "post-grid.css",
26
+ "type": "style",
27
+ "target": "assets/css/components/post-grid.css",
28
+ "content": ".ghcn-post-grid { font-size: 16px; color: var(--foreground); margin-block: 2em; }\n.ghcn-post-grid__title { font-size: 1.5em; line-height: 1.25; margin: 0 0 1em; }\n.ghcn-post-grid__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5em; }\n.ghcn-post-grid__grid > * { min-width: 0; }\n.ghcn-post-grid__empty { color: var(--muted-foreground); }\n@media(max-width:900px) { .ghcn-post-grid__grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }\n@media(max-width:620px) { .ghcn-post-grid__grid { grid-template-columns: 1fr; } }"
29
+ }
30
+ ],
31
+ "styleSlots": {
32
+ "class": [
33
+ ".ghcn-post-grid"
34
+ ],
35
+ "titleClass": [
36
+ ".ghcn-post-grid__title"
37
+ ],
38
+ "gridClass": [
39
+ ".ghcn-post-grid__grid"
40
+ ],
41
+ "cardClass": [
42
+ ".gh-post-card"
43
+ ],
44
+ "cardTitleClass": [
45
+ ".gh-post-card-title"
46
+ ],
47
+ "imageClass": [
48
+ ".gh-post-card-img"
49
+ ],
50
+ "descriptionClass": [
51
+ ".gh-post-card-excerpt"
52
+ ]
53
+ }
54
+ }
@@ -9,7 +9,7 @@
9
9
  "name": "post-header.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/post-header.hbs",
12
- "content": "{{!-- Component: Post Header | Usage: inside {{#post}} --}}\n<header class=\"ghcn-post-header ghcn-container\">\n {{#if primary_tag}}<a class=\"ghcn-badge\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a>{{/if}}\n <h1>{{title}}</h1>\n {{#if custom_excerpt}}<p class=\"ghcn-post-header__excerpt\">{{custom_excerpt}}</p>{{/if}}\n <div class=\"ghcn-post-header__meta\">\n {{#primary_author}}\n <a class=\"ghcn-post-header__author\" href=\"{{url}}\">\n {{#if profile_image}}<img class=\"ghcn-avatar\" src=\"{{img_url profile_image size=\"xs\"}}\" alt=\"\" />{{/if}}\n <span>{{name}}</span>\n </a>\n {{/primary_author}}\n <span aria-hidden=\"true\">&bull;</span>\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span aria-hidden=\"true\">&bull;</span>\n <span>{{reading_time}}</span>\n </div>\n {{#if feature_image}}\n <figure class=\"ghcn-post-header__media\">\n <img srcset=\"{{img_url feature_image size=\"s\"}} 400w, {{img_url feature_image size=\"m\"}} 750w, {{img_url feature_image size=\"l\"}} 1200w, {{img_url feature_image size=\"xl\"}} 2000w\" sizes=\"(min-width: 1200px) 1120px, 92vw\" src=\"{{img_url feature_image size=\"xl\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" />\n {{#if feature_image_caption}}<figcaption>{{feature_image_caption}}</figcaption>{{/if}}\n </figure>\n {{/if}}\n</header>"
12
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, metaClass, imageClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Post Header | Usage: inside {{#post}} --}}\n<header class=\"ghcn-post-header{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}} ghcn-container\">\n {{#if primary_tag}}<a class=\"ghcn-badge\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a>{{/if}}\n <h1 class=\"ghcn-post-header__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{title}}</h1>\n {{#if custom_excerpt}}<p class=\"ghcn-post-header__excerpt{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{custom_excerpt}}</p>{{/if}}\n <div class=\"ghcn-post-header__meta{{#if ghostcnStyles.metaClass}} {{ghostcnStyles.metaClass}}{{/if}}\">\n {{#primary_author}}\n <a class=\"ghcn-post-header__author\" href=\"{{url}}\">\n {{#if profile_image}}<img class=\"ghcn-avatar\" src=\"{{img_url profile_image size=\"xs\"}}\" alt=\"\" />{{/if}}\n <span>{{name}}</span>\n </a>\n {{/primary_author}}\n <span aria-hidden=\"true\">&bull;</span>\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span aria-hidden=\"true\">&bull;</span>\n <span>{{reading_time}}</span>\n </div>\n {{#if feature_image}}\n <figure class=\"ghcn-post-header__media\">\n <img class=\"ghcn-post-header__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" srcset=\"{{img_url feature_image size=\"s\"}} 400w, {{img_url feature_image size=\"m\"}} 750w, {{img_url feature_image size=\"l\"}} 1200w, {{img_url feature_image size=\"xl\"}} 2000w\" sizes=\"(min-width: 1200px) 1120px, 92vw\" src=\"{{img_url feature_image size=\"xl\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" />\n {{#if feature_image_caption}}<figcaption>{{feature_image_caption}}</figcaption>{{/if}}\n </figure>\n {{/if}}\n</header>\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "post-header.css",
@@ -23,5 +23,22 @@
23
23
  "GS010-PJ-VALID"
24
24
  ],
25
25
  "notes": "Uses native post, author, image, tag, date, and reading-time data."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".ghcn-post-header"
30
+ ],
31
+ "titleClass": [
32
+ ".ghcn-post-header__title"
33
+ ],
34
+ "descriptionClass": [
35
+ ".ghcn-post-header__excerpt"
36
+ ],
37
+ "metaClass": [
38
+ ".ghcn-post-header__meta"
39
+ ],
40
+ "imageClass": [
41
+ ".ghcn-post-header__image"
42
+ ]
26
43
  }
27
44
  }
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "post-navigation",
3
+ "type": "components:content",
4
+ "description": "Accessible chronological previous/next post links, with no dead links at either end.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "post-navigation.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/post-navigation.hbs",
12
+ "content": "{{!-- Styling parameters: class, cardClass, titleClass, labelClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Use inside {{#post}}. Native helpers hide missing neighbors. --}}\n<nav class=\"ghcn-post-navigation{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Post navigation\">{{~#prev_post~}}<a class=\"ghcn-post-navigation__link{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\" href=\"{{url}}\" rel=\"prev\"><span class=\"ghcn-post-navigation__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">Previous post</span><span class=\"ghcn-post-navigation__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{title}}</span></a>{{~/prev_post~}}{{~#next_post~}}<a class=\"ghcn-post-navigation__link{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}} ghcn-post-navigation__link--next\" href=\"{{url}}\" rel=\"next\"><span class=\"ghcn-post-navigation__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">Next post</span><span class=\"ghcn-post-navigation__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{title}}</span></a>{{~/next_post~}}</nav>\n{{/with}}"
13
+ },
14
+ {
15
+ "name": "post-navigation.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/post-navigation.css",
18
+ "content": "\n.ghcn-post-navigation { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1em; margin-block: 2em; }\n.ghcn-post-navigation:empty { display: none; }\n.ghcn-post-navigation__link { min-width: 0; display: flex; flex-direction: column; gap: .5em; padding: 1.25em; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--card-foreground); text-decoration: none; }\n.ghcn-post-navigation__link--next { grid-column: 2; text-align: right; }\n.ghcn-post-navigation__label { font-size: .75em; color: var(--muted-foreground); }\n.ghcn-post-navigation__title { font-weight: 600; overflow-wrap: anywhere; }\n.ghcn-post-navigation__link:hover .ghcn-post-navigation__title { text-decoration: underline; }\n.ghcn-post-navigation__link:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }\n@media(max-width:620px) { .ghcn-post-navigation { grid-template-columns: 1fr; } .ghcn-post-navigation__link--next { grid-column: 1; } }\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses native Ghost post data and optional progressive enhancement."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".ghcn-post-navigation"
30
+ ],
31
+ "cardClass": [
32
+ ".ghcn-post-navigation__link"
33
+ ],
34
+ "titleClass": [
35
+ ".ghcn-post-navigation__title"
36
+ ],
37
+ "labelClass": [
38
+ ".ghcn-post-navigation__label"
39
+ ]
40
+ }
41
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pricing-table",
3
- "type": "components:ui",
4
- "description": "Membership tiers and pricing plans with native Ghost Portal checkout triggers.",
3
+ "type": "components:members",
4
+ "description": "Live Ghost tiers, prices, currencies and benefits with tier-specific Portal checkout.",
5
5
  "dependencies": [],
6
6
  "ghost_version": ">=5.0.0",
7
7
  "files": [
@@ -9,19 +9,48 @@
9
9
  "name": "pricing-table.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/pricing-table.hbs",
12
- "content": "{{!--\n Component: Pricing Table\n Usage: {{> \"components/pricing-table\" title=\"Choose your plan\"}}\n--}}\n<section class=\"gh-pricing bg-background py-12 px-4 sm:px-6 lg:px-8 max-w-5xl mx-auto my-8\">\n <div class=\"text-center mb-12\">\n <h2 class=\"gh-pricing-title text-3xl font-extrabold tracking-tight text-foreground mb-3\">\n {{#if title}}{{title}}{{else}}Choose the right plan for you{{/if}}\n </h2>\n <p class=\"gh-pricing-desc text-muted-foreground text-base max-w-xl mx-auto\">\n {{#if description}}{{description}}{{else}}Unlock unlimited access to exclusive content, newsletters, and member-only discussions.{{/if}}\n </p>\n </div>\n\n <div class=\"gh-pricing-grid grid grid-cols-1 md:grid-cols-3 gap-8 items-stretch\">\n {{!-- Free Tier --}}\n <div class=\"gh-pricing-card bg-card text-card-foreground border border-border rounded-ghostcn p-6 flex flex-col justify-between shadow-sm hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-foreground mb-1\">Free</h3>\n <p class=\"text-muted-foreground text-sm mb-4\">Preview public posts</p>\n <div class=\"text-3xl font-extrabold text-foreground mb-6\">$0 <span class=\"text-sm font-normal text-muted-foreground\">/ forever</span></div>\n <ul class=\"space-y-3 text-sm text-muted-foreground mb-6\">\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Access to public posts</li>\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Regular email newsletters</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/free\" data-portal=\"signup/free\" class=\"gh-pricing-btn block w-full text-center py-2.5 px-4 rounded-ghostcn text-sm font-medium border border-input text-foreground bg-background hover:bg-muted transition-colors\">\n Sign up free\n </a>\n </div>\n\n {{!-- Monthly Tier (Featured) --}}\n <div class=\"gh-pricing-card gh-pricing-card-featured bg-card text-card-foreground border-2 border-primary rounded-ghostcn p-6 flex flex-col justify-between shadow-lg relative\">\n <span class=\"gh-pricing-badge absolute -top-3 left-1/2 -translate-x-1/2 bg-primary text-primary-foreground text-xs font-semibold px-3 py-1 rounded-full uppercase tracking-wider shadow-sm\">\n Most Popular\n </span>\n <div>\n <h3 class=\"text-xl font-bold text-foreground mb-1\">Monthly</h3>\n <p class=\"text-muted-foreground text-sm mb-4\">Full access billed monthly</p>\n <div class=\"text-3xl font-extrabold text-primary mb-6\">$5 <span class=\"text-sm font-normal text-muted-foreground\">/ month</span></div>\n <ul class=\"space-y-3 text-sm text-muted-foreground mb-6\">\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Full archive access</li>\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Member-only newsletter</li>\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Community discussions</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/monthly\" data-portal=\"signup/monthly\" class=\"gh-pricing-btn gh-pricing-btn-primary block w-full text-center py-2.5 px-4 rounded-ghostcn text-sm font-medium text-primary-foreground bg-primary hover:opacity-90 transition-opacity shadow-sm\">\n Subscribe monthly\n </a>\n </div>\n\n {{!-- Annual Tier --}}\n <div class=\"gh-pricing-card bg-card text-card-foreground border border-border rounded-ghostcn p-6 flex flex-col justify-between shadow-sm hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-foreground mb-1\">Annual</h3>\n <p class=\"text-muted-foreground text-sm mb-4\">Save 20% with annual billing</p>\n <div class=\"text-3xl font-extrabold text-foreground mb-6\">$48 <span class=\"text-sm font-normal text-muted-foreground\">/ year</span></div>\n <ul class=\"space-y-3 text-sm text-muted-foreground mb-6\">\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> Everything in Monthly</li>\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> 2 months free included</li>\n <li class=\"flex items-center gap-2\"><span class=\"text-primary font-bold\">✓</span> VIP priority support</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/yearly\" data-portal=\"signup/yearly\" class=\"gh-pricing-btn block w-full text-center py-2.5 px-4 rounded-ghostcn text-sm font-medium border border-input text-foreground bg-background hover:bg-muted transition-colors\">\n Subscribe yearly\n </a>\n </div>\n </div>\n</section>"
12
+ "content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, buttonClass, cardTitleClass, descriptionClass, priceClass, benefitsClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Pricing Table | Usage: {{> \"components/pricing-table\"}} --}}\n{{#if @site.members_enabled}}\n{{#unless @site.members_invite_only}}\n{{#if @site.allow_self_signup}}\n<section class=\"gh-pricing{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Membership plans\">\n <h2 class=\"gh-pricing-title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if title}}{{title}}{{else}}Choose your membership{{/if}}</h2>\n <div class=\"gh-pricing-grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#get \"tiers\" filter=\"visibility:public+active:true\" include=\"monthly_price,yearly_price,benefits\"}}\n {{#foreach tiers}}\n {{#match type \"free\"}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n <h3 class=\"gh-pricing-card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\">{{name}}</h3>\n {{#if description}}<p class=\"gh-pricing-description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{/if}}\n <p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">Free</p>\n {{#if benefits}}<ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>{{/if}}\n {{#if @member}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{else}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/signup/free\" data-portal=\"signup/free\">Join free</a>{{/if}}\n </article>\n {{else}}\n {{#if @site.paid_members_enabled}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n <h3 class=\"gh-pricing-card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\">{{name}}</h3>\n {{#if description}}<p class=\"gh-pricing-description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{/if}}\n {{#if benefits}}<ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>{{/if}}\n {{#if monthly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">{{price monthly_price currency=currency}} <span>/ month</span></p>{{/if}}\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">{{price yearly_price currency=currency}} <span>/ year</span></p>{{/if}}\n <div class=\"gh-pricing-actions\">\n {{#if @member}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">{{#if @member.paid}}Manage plan{{else}}Upgrade membership{{/if}}</a>\n {{else}}\n {{#if monthly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/monthly\" data-portal=\"signup/{{id}}/monthly\">Subscribe monthly</a>{{/if}}\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\">Subscribe yearly</a>{{/if}}\n {{/if}}\n </div>\n </article>\n {{/if}}\n {{/match}}\n {{/foreach}}\n {{else}}\n <p>Membership plans are currently unavailable.</p>\n {{/get}}\n </div>\n</section>\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "pricing-table.css",
16
16
  "type": "style",
17
17
  "target": "assets/css/components/pricing-table.css",
18
- "content": "/* ghostcn: Pricing Table Styles */\n.gh-pricing {\n box-sizing: border-box;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n max-width: 64em;\n margin: 2em auto;\n padding: 2em 1em;\n}\n\n.gh-pricing *,\n.gh-pricing *::before,\n.gh-pricing *::after {\n box-sizing: border-box;\n}\n\n.gh-pricing-title {\n font-size: 1.875em;\n font-weight: 800;\n letter-spacing: -0.025em;\n text-align: center;\n color: var(--foreground, #09090b);\n margin-bottom: 0.75em;\n}\n\n.gh-pricing-desc {\n text-align: center;\n color: var(--muted-foreground, #71717a);\n margin-bottom: 2.5em;\n}\n\n.gh-pricing-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 2em;\n}\n\n@media (min-width: 768px) {\n .gh-pricing-grid {\n grid-template-columns: repeat(3, 1fr);\n }\n}\n\n.gh-pricing-card {\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n padding: 1.5em;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);\n transition: box-shadow 0.2s ease;\n}\n\n.gh-pricing-card:hover {\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n}\n\n.gh-pricing-card-featured {\n border: 2px solid var(--primary, var(--ghost-accent-color, #18181b));\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n}\n\n.gh-pricing-badge {\n position: absolute;\n top: -0.75em;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n font-size: 0.75em;\n font-weight: 600;\n padding: 0.25em 0.75em;\n border-radius: 9999px;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n}\n\n.gh-pricing-btn {\n display: block;\n width: 100%;\n text-align: center;\n padding: 0.625em 1em;\n border-radius: var(--radius, 0.5em);\n font-size: 0.875em;\n font-weight: 500;\n text-decoration: none;\n border: 1px solid var(--input, #e4e4e7);\n color: var(--foreground, #09090b);\n background-color: var(--background, #ffffff);\n margin-top: 1.5em;\n transition: background-color 0.15s ease;\n}\n\n.gh-pricing-btn:hover {\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-pricing-btn-primary {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n border-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-pricing-btn-primary:hover {\n opacity: 0.9;\n}\n"
18
+ "content": "/* ghostcn: live membership pricing */\n.gh-pricing { box-sizing: border-box; width: min(100% - 2em, 72em); margin: 3em auto; color: var(--foreground); font-size: 16px; line-height: 1.5; }\n.gh-pricing *, .gh-pricing *::before, .gh-pricing *::after { box-sizing: border-box; }\n.gh-pricing-title { margin: 0 0 1.5em; text-align: center; font-size: 2em; }\n.gh-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18em), 1fr)); gap: 1.25em; }\n.gh-pricing-card { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 1em; padding: 1.5em; border: 1px solid var(--border); border-radius: min(var(--radius), 1.5em); background: var(--card); color: var(--card-foreground); }\n/* Follow the card's local foreground, not the page's dark/light tokens.\n A custom background must be paired with a readable foreground at the call site. */\n.gh-pricing-card-title { margin: 0; font-size: 1.25em; color: inherit; }\n.gh-pricing-card p { margin: 0; }\n.gh-pricing-description { color: inherit; }\n.gh-pricing-benefits { margin: 0; padding-left: 1.25em; color: inherit; }\n.gh-pricing-benefits li { color: inherit; }\n.gh-pricing-price { font-size: 1.75em; font-weight: 700; color: inherit; }\n.gh-pricing-price span { font-size: 0.875em; font-weight: 400; color: inherit; }\n.gh-pricing-actions { display: flex; flex-wrap: wrap; gap: 0.5em; margin-top: auto; }\n"
19
19
  }
20
20
  ],
21
21
  "gscan": {
22
22
  "rules_satisfied": [
23
23
  "GS010-PJ-VALID"
24
24
  ],
25
- "notes": "Uses Ghost native data-portal attributes for seamless checkout without third-party scripts."
25
+ "notes": "Reads public Ghost tiers; no placeholder pricing or invented benefits."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".gh-pricing"
30
+ ],
31
+ "titleClass": [
32
+ ".gh-pricing-title"
33
+ ],
34
+ "gridClass": [
35
+ ".gh-pricing-grid"
36
+ ],
37
+ "cardClass": [
38
+ ".gh-pricing-card"
39
+ ],
40
+ "buttonClass": [
41
+ ".ghcn-button"
42
+ ],
43
+ "cardTitleClass": [
44
+ ".gh-pricing-card-title"
45
+ ],
46
+ "descriptionClass": [
47
+ ".gh-pricing-description"
48
+ ],
49
+ "priceClass": [
50
+ ".gh-pricing-price"
51
+ ],
52
+ "benefitsClass": [
53
+ ".gh-pricing-benefits"
54
+ ]
26
55
  }
27
56
  }
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "related-posts",
3
+ "type": "components:content",
4
+ "description": "Related reading from the same primary tag, excluding the current post; recent posts when untagged.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "related-posts.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/related-posts.hbs",
12
+ "content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, cardTitleClass, imageClass, contentClass, descriptionClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Use inside {{#post}}. heading overrides the section title. Empty results render nothing. --}}\n{{#if primary_tag}}\n{{#get \"posts\" filter=\"id:-{{id}}+tag:{{primary_tag.slug}}\" limit=\"3\" include=\"tags,authors\"}}{{#if posts}}\n<section class=\"ghcn-related{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Related posts\">\n <h2 class=\"ghcn-related__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}Keep reading{{/if}}</h2>\n <div class=\"ghcn-related__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts}}\n <article class=\"ghcn-related__card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n {{#if feature_image}}<a class=\"ghcn-related__image-link\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\"><img class=\"ghcn-related__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url feature_image size=\"m\"}}\" alt=\"\" loading=\"lazy\" /></a>{{/if}}\n <div class=\"ghcn-related__content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\"><h3 class=\"ghcn-related__card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\"><a href=\"{{url}}\">{{title}}</a></h3><p class=\"ghcn-related__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{excerpt words=\"20\"}}</p></div>\n </article>\n {{/foreach}}\n </div>\n</section>\n{{/if}}{{/get}}\n{{else}}\n{{#get \"posts\" filter=\"id:-{{id}}\" limit=\"3\" include=\"tags,authors\"}}{{#if posts}}\n<section class=\"ghcn-related{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Related posts\">\n <h2 class=\"ghcn-related__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}Keep reading{{/if}}</h2>\n <div class=\"ghcn-related__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts}}\n <article class=\"ghcn-related__card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n {{#if feature_image}}<a class=\"ghcn-related__image-link\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\"><img class=\"ghcn-related__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url feature_image size=\"m\"}}\" alt=\"\" loading=\"lazy\" /></a>{{/if}}\n <div class=\"ghcn-related__content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\"><h3 class=\"ghcn-related__card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\"><a href=\"{{url}}\">{{title}}</a></h3><p class=\"ghcn-related__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{excerpt words=\"20\"}}</p></div>\n </article>\n {{/foreach}}\n </div>\n</section>\n{{/if}}{{/get}}\n{{/if}}\n{{/with}}"
13
+ },
14
+ {
15
+ "name": "related-posts.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/related-posts.css",
18
+ "content": "\n.ghcn-related { margin-block: 2em; color: var(--foreground); }\n.ghcn-related__title { margin: 0 0 1em; font-size: 1.5em; line-height: 1.2; }\n.ghcn-related__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1em; }\n.ghcn-related__card { min-width: 0; overflow: hidden; background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius); }\n.ghcn-related__image-link { display: block; aspect-ratio: 16/9; overflow: hidden; }\n.ghcn-related__image { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-related__content { padding: 1.25em; }\n.ghcn-related__card-title { font-size: 1.125em; line-height: 1.3; margin: 0 0 .75em; }\n.ghcn-related__card-title a { color: inherit; text-decoration: none; }\n.ghcn-related__card-title a:hover { text-decoration: underline; }\n.ghcn-related__description { color: var(--muted-foreground); font-size: .875em; margin: 0; }\n.ghcn-related a:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }\n@media(max-width:760px) { .ghcn-related__grid { grid-template-columns: 1fr; } }\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses native Ghost post data and optional progressive enhancement."
26
+ },
27
+ "styleSlots": {
28
+ "class": [
29
+ ".ghcn-related"
30
+ ],
31
+ "titleClass": [
32
+ ".ghcn-related__title"
33
+ ],
34
+ "gridClass": [
35
+ ".ghcn-related__grid"
36
+ ],
37
+ "cardClass": [
38
+ ".ghcn-related__card"
39
+ ],
40
+ "cardTitleClass": [
41
+ ".ghcn-related__card-title"
42
+ ],
43
+ "imageClass": [
44
+ ".ghcn-related__image"
45
+ ],
46
+ "contentClass": [
47
+ ".ghcn-related__content"
48
+ ],
49
+ "descriptionClass": [
50
+ ".ghcn-related__description"
51
+ ]
52
+ }
53
+ }