ghostcn 1.0.3 → 1.1.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "newsletter-form",
3
3
  "type": "components:ui",
4
- "description": "A native Ghost members subscription form.",
4
+ "description": "A native Ghost members subscription form with state handling.",
5
5
  "dependencies": [],
6
6
  "ghost_version": ">=5.0.0",
7
7
  "files": [
@@ -9,17 +9,20 @@
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!\"}} \n--}}\n<section class=\"gh-newsletter-form bg-slate-50 border border-slate-200 p-8 rounded-xl text-center max-w-2xl mx-auto my-8\">\n <h3 class=\"gh-newsletter-title text-2xl font-bold mb-2 text-slate-900\">{{#if title}}{{title}}{{else}}Subscribe to our newsletter{{/if}}</h3>\n <p class=\"gh-newsletter-desc text-slate-600 mb-6\">{{#if description}}{{description}}{{else}}Get the latest posts delivered right to your inbox.{{/if}}</p>\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 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500\" \n />\n <button type=\"submit\" class=\"gh-newsletter-btn bg-indigo-600 text-white px-6 py-2 rounded-lg font-medium hover:bg-indigo-700 transition-colors flex items-center justify-center\">\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-8 left-0 right-0 text-sm text-green-600 font-medium\" data-members-success>\n Success! Check your inbox to confirm.\n </div>\n <div class=\"gh-newsletter-msg-error message-error hidden absolute -bottom-8 left-0 right-0 text-sm text-red-600 font-medium\" data-members-error>\n Please enter a valid email address.\n </div>\n </form>\n</section>"
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>"
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": "/* Ghost UI: Newsletter Form Styles (Vanilla CSS fallback) */\n.gh-newsletter-form {\n background-color: var(--ghost-accent-bg, #f8fafc);\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 0.75rem;\n padding: 2rem;\n text-align: center;\n max-width: 42rem;\n margin: 2rem auto;\n}\n\n.gh-newsletter-title {\n font-size: 1.5rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n color: var(--ghost-heading-color, #0f172a);\n}\n\n.gh-newsletter-desc {\n color: var(--ghost-text-muted, #475569);\n margin-bottom: 1.5rem;\n}\n\n.gh-newsletter-fields {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n max-width: 28rem;\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.625rem 1rem;\n border: 1px solid #cbd5e1;\n border-radius: 0.5rem;\n font-size: 1rem;\n outline: none;\n}\n\n.gh-newsletter-input:focus {\n border-color: var(--ghost-accent-color, #4f46e5);\n box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);\n}\n\n.gh-newsletter-btn {\n background-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n padding: 0.625rem 1.5rem;\n border-radius: 0.5rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n transition: background-color 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 position: absolute;\n bottom: -2rem;\n left: 0;\n right: 0;\n font-size: 0.875rem;\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-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": {
22
- "rules_satisfied": ["GS010-PJ-VALID", "GS050-MEMBERS-FORM"],
23
- "notes": "Uses Ghost's native `data-members-form` attributes. No custom JS required."
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID",
24
+ "GS050-MEMBERS-FORM"
25
+ ],
26
+ "notes": "Uses Ghost's native data-members-form attributes. No custom JS required."
24
27
  }
25
- }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "pagination",
3
+ "type": "components:navigation",
4
+ "description": "Accessible, responsive replacement for Ghost’s native pagination markup.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "pagination.hbs",
10
+ "type": "partial",
11
+ "target": "partials/pagination.hbs",
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>"
14
+ },
15
+ {
16
+ "name": "pagination.css",
17
+ "type": "style",
18
+ "target": "assets/css/components/pagination.css",
19
+ "content": "/* ghostcn: Pagination */\n.ghcn-pagination { box-sizing: border-box; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1em; width: min(100% - 2em,72em); margin: 3em auto; color: var(--foreground); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-pagination *, .ghcn-pagination *::before, .ghcn-pagination *::after { box-sizing: border-box; }\n.ghcn-pagination__side { display: flex; }\n.ghcn-pagination__side--end { justify-content: flex-end; }\n.ghcn-pagination__status { color: var(--muted-foreground); font-size: 0.8125em; }\n@media (max-width: 480px) { .ghcn-pagination { grid-template-columns: 1fr 1fr; } .ghcn-pagination__status { grid-column: 1 / -1; grid-row: 1; text-align: center; } }\n"
20
+ }
21
+ ],
22
+ "gscan": {
23
+ "rules_satisfied": [
24
+ "GS010-PJ-VALID"
25
+ ],
26
+ "notes": "Installs as partials/pagination.hbs so the native pagination helper uses it."
27
+ }
28
+ }
@@ -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-white border border-slate-200 rounded-xl 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-slate-100\">\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-indigo-600 uppercase tracking-wider hover:underline\">{{primary_tag.name}}</a>\n <span class=\"text-slate-300\">&bull;</span>\n {{/if}}\n <span class=\"gh-post-card-reading-time text-slate-500\">{{reading_time}}</span>\n </div>\n\n <h3 class=\"gh-post-card-title text-xl font-bold text-slate-900 mb-2 leading-snug group-hover:text-indigo-600 transition-colors\">\n <a href=\"{{url}}\">{{title}}</a>\n </h3>\n\n {{#if excerpt}}\n <p class=\"gh-post-card-excerpt text-slate-600 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-slate-100 flex items-center justify-between text-xs text-slate-500\">\n <div class=\"flex items-center gap-2\">\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": "{{!--\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>"
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": "/* Ghost UI: Post Card Styles (Vanilla CSS fallback) */\n.gh-post-card {\n background-color: var(--ghost-card-bg, #ffffff);\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 0.75rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\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: #f1f5f9;\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.25rem;\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(--ghost-accent-color, #4f46e5);\n font-size: 0.75rem;\n font-weight: 600;\n text-decoration: none;\n text-transform: uppercase;\n}\n\n.gh-post-card-tag:hover {\n text-decoration: underline;\n}\n\n.gh-post-card-title {\n font-size: 1.25rem;\n font-weight: 700;\n margin: 0.5rem 0;\n line-height: 1.35;\n}\n\n.gh-post-card-title a {\n color: var(--ghost-heading-color, #0f172a);\n text-decoration: none;\n}\n\n.gh-post-card-title a:hover {\n color: var(--ghost-accent-color, #4f46e5);\n}\n\n.gh-post-card-excerpt {\n color: var(--ghost-text-muted, #475569);\n font-size: 0.875rem;\n line-height: 1.5;\n margin-bottom: 1rem;\n}\n\n.gh-post-card-footer {\n padding-top: 1rem;\n border-top: 1px solid var(--ghost-border, #f1f5f9);\n display: flex;\n justify-content: space-between;\n font-size: 0.75rem;\n color: #64748b;\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}\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"
19
19
  }
20
20
  ],
21
21
  "gscan": {
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "post-header",
3
+ "type": "components:content",
4
+ "description": "Editorial post heading with tags, author metadata, reading time, and responsive feature image.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "post-header.hbs",
10
+ "type": "partial",
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>"
13
+ },
14
+ {
15
+ "name": "post-header.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/post-header.css",
18
+ "content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box; margin-block: 4em 2.5em; color: var(--foreground); text-align: center; font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header h1 { max-width: 58em; margin: 1em auto; font-size: clamp(2.5em,7vw,5em); line-height: 0.98; letter-spacing: -0.055em; text-wrap: balance; }\n.ghcn-post-header__excerpt { max-width: 44em; margin: 1.25em auto; color: var(--muted-foreground); font-size: clamp(1.05em,2vw,1.25em); }\n.ghcn-post-header__meta, .ghcn-post-header__author { display: flex; align-items: center; justify-content: center; gap: 0.625em; }\n.ghcn-post-header__meta { flex-wrap: wrap; color: var(--muted-foreground); font-size: 0.8125em; }\n.ghcn-post-header__author { color: var(--foreground); font-weight: 700; text-decoration: none; }\n.ghcn-post-header__author .ghcn-avatar { width: 2em; height: 2em; }\n.ghcn-post-header__media { margin: 3em 0 0; }\n.ghcn-post-header__media img { display: block; width: 100%; max-height: 44em; border-radius: min(var(--radius),1.25em); object-fit: cover; }\n.ghcn-post-header__media figcaption { margin-top: 0.75em; color: var(--muted-foreground); font-size: 0.75em; }\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses native post, author, image, tag, date, and reading-time data."
26
+ }
27
+ }
@@ -9,13 +9,13 @@
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-white py-12 px-4 sm:px-6 lg:px-8 max-w-5xl mx-auto my-8\">\n <div class=\"text-center mb-10\">\n <h2 class=\"gh-pricing-title text-3xl font-extrabold text-slate-900 mb-3\">{{#if title}}{{title}}{{else}}Choose the right plan for you{{/if}}</h2>\n <p class=\"gh-pricing-desc text-slate-600 max-w-xl mx-auto\">{{#if description}}{{description}}{{else}}Unlock unlimited access to exclusive content, newsletters, and community discussions.{{/if}}</p>\n </div>\n\n <div class=\"gh-pricing-grid grid grid-cols-1 md:grid-cols-3 gap-8\">\n {{!-- Free Tier --}}\n <div class=\"gh-pricing-card border border-slate-200 rounded-2xl p-6 bg-slate-50 flex flex-col justify-between hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Free</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Preview public posts</p>\n <div class=\"text-3xl font-extrabold text-slate-900 mb-6\">$0 <span class=\"text-sm font-normal text-slate-500\">/ forever</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Access to public posts</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</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-lg font-medium border border-slate-300 text-slate-700 bg-white hover:bg-slate-100 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 border-2 border-indigo-600 rounded-2xl p-6 bg-white 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-indigo-600 text-white text-xs font-semibold px-3 py-1 rounded-full uppercase tracking-wider\">Most Popular</span>\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Monthly</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Full access billed monthly</p>\n <div class=\"text-3xl font-extrabold text-indigo-600 mb-6\">$5 <span class=\"text-sm font-normal text-slate-500\">/ month</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Full archive access</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Member-only newsletter</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Member community comments</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-lg font-medium text-white bg-indigo-600 hover:bg-indigo-700 transition-colors shadow-sm\">\n Subscribe monthly\n </a>\n </div>\n\n {{!-- Annual Tier --}}\n <div class=\"gh-pricing-card border border-slate-200 rounded-2xl p-6 bg-slate-50 flex flex-col justify-between hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Annual</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Save 20% with annual billing</p>\n <div class=\"text-3xl font-extrabold text-slate-900 mb-6\">$48 <span class=\"text-sm font-normal text-slate-500\">/ year</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Everything in Monthly</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> 2 months free</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</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-lg font-medium border border-slate-300 text-slate-700 bg-white hover:bg-slate-100 transition-colors\">\n Subscribe yearly\n </a>\n </div>\n </div>\n</section>"
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>"
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": "/* Ghost UI: Pricing Table Styles (Vanilla CSS fallback) */\n.gh-pricing {\n max-width: 64rem;\n margin: 2rem auto;\n padding: 2rem 1rem;\n}\n\n.gh-pricing-title {\n font-size: 1.875rem;\n font-weight: 800;\n text-align: center;\n color: var(--ghost-heading-color, #0f172a);\n margin-bottom: 0.75rem;\n}\n\n.gh-pricing-desc {\n text-align: center;\n color: var(--ghost-text-muted, #475569);\n margin-bottom: 2.5rem;\n}\n\n.gh-pricing-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 2rem;\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(--ghost-border, #e2e8f0);\n border-radius: 1rem;\n padding: 1.5rem;\n background-color: var(--ghost-card-bg, #f8fafc);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n}\n\n.gh-pricing-card-featured {\n border: 2px solid var(--ghost-accent-color, #4f46e5);\n background-color: #ffffff;\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.75rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n font-size: 0.75rem;\n font-weight: 600;\n padding: 0.25rem 0.75rem;\n border-radius: 9999px;\n}\n\n.gh-pricing-btn {\n display: block;\n width: 100%;\n text-align: center;\n padding: 0.625rem 1rem;\n border-radius: 0.5rem;\n font-weight: 500;\n text-decoration: none;\n border: 1px solid #cbd5e1;\n color: #334155;\n background-color: #ffffff;\n margin-top: 1.5rem;\n transition: background-color 0.15s ease;\n}\n\n.gh-pricing-btn:hover {\n background-color: #f1f5f9;\n}\n\n.gh-pricing-btn-primary {\n background-color: var(--ghost-accent-color, #4f46e5);\n border-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n}\n\n.gh-pricing-btn-primary:hover {\n opacity: 0.9;\n}"
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"
19
19
  }
20
20
  ],
21
21
  "gscan": {
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "site-footer",
3
+ "type": "components:layout",
4
+ "description": "Publication footer with secondary navigation, social links, and Ghost attribution.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "site-footer.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/site-footer.hbs",
12
+ "content": "{{!-- Component: Site Footer | Usage: {{> \"components/site-footer\"}} --}}\n<footer class=\"ghcn-footer\">\n <div class=\"ghcn-footer__inner ghcn-container\">\n <div class=\"ghcn-footer__brand\">\n <a href=\"{{@site.url}}\">{{@site.title}}</a>\n {{#if @site.description}}<p>{{@site.description}}</p>{{/if}}\n </div>\n <nav class=\"ghcn-footer__nav\" aria-label=\"Footer navigation\">{{navigation type=\"secondary\"}}</nav>\n <div class=\"ghcn-footer__social\">\n {{#if @site.facebook}}<a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener\">Facebook</a>{{/if}}\n {{#if @site.twitter}}<a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener\">X</a>{{/if}}\n <a href=\"{{@site.url}}/rss/\">RSS</a>\n </div>\n </div>\n <div class=\"ghcn-footer__legal ghcn-container\">\n <span>&copy; {{date format=\"YYYY\"}} {{@site.title}}</span>\n <span>Published with <a href=\"https://ghost.org\" target=\"_blank\" rel=\"noopener\">Ghost</a></span>\n </div>\n</footer>"
13
+ },
14
+ {
15
+ "name": "site-footer.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/site-footer.css",
18
+ "content": "/* ghostcn: Site Footer */\n.ghcn-footer { box-sizing: border-box; border-top: 1px solid var(--border); color: var(--foreground); background: var(--card); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-footer *, .ghcn-footer *::before, .ghcn-footer *::after { box-sizing: border-box; }\n.ghcn-footer__inner { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; gap: 3em; padding-block: 3em; }\n.ghcn-footer__brand a { color: var(--foreground); font-size: 1.125em; font-weight: 800; text-decoration: none; }\n.ghcn-footer__brand p { max-width: 30em; margin: 0.5em 0 0; color: var(--muted-foreground); font-size: 0.875em; }\n.ghcn-footer .nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5em 1.5em; margin: 0; padding: 0; list-style: none; }\n.ghcn-footer a { color: var(--muted-foreground); font-size: 0.875em; text-decoration: none; }\n.ghcn-footer a:hover { color: var(--foreground); }\n.ghcn-footer__social { display: flex; flex-direction: column; gap: 0.5em; }\n.ghcn-footer__legal { display: flex; justify-content: space-between; gap: 1em; border-top: 1px solid var(--border); padding-block: 1.25em; color: var(--muted-foreground); font-size: 0.75em; }\n@media (max-width: 720px) { .ghcn-footer__inner { grid-template-columns: 1fr; gap: 2em; } .ghcn-footer__social { flex-direction: row; flex-wrap: wrap; } }\n@media (max-width: 480px) { .ghcn-footer__legal { align-items: flex-start; flex-direction: column; } }\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses Ghost secondary navigation and site globals."
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "site-header",
3
+ "type": "components:layout",
4
+ "description": "Responsive Ghost navigation with search, member actions, and an accessible mobile menu.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "site-header.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/site-header.hbs",
12
+ "content": "{{!-- Component: Site Header | Usage: {{> \"components/site-header\"}} --}}\n<header class=\"ghcn-header\">\n <div class=\"ghcn-header__inner ghcn-container\">\n <a class=\"ghcn-header__brand\" href=\"{{@site.url}}\" aria-label=\"{{@site.title}} home\">\n {{#if @site.logo}}\n <img src=\"{{@site.logo}}\" alt=\"{{@site.title}}\" />\n {{else}}\n <span>{{@site.title}}</span>\n {{/if}}\n </a>\n\n <nav class=\"ghcn-header__nav\" aria-label=\"Primary navigation\">{{navigation}}</nav>\n\n <div class=\"ghcn-header__actions\">\n {{search}}\n {{#if @member}}\n <a class=\"ghcn-button ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Account</a>\n {{else}}\n <a class=\"ghcn-header__signin\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a>\n <a class=\"ghcn-button\" href=\"#/portal/signup\" data-portal=\"signup\">Subscribe</a>\n {{/if}}\n </div>\n\n <details class=\"ghcn-header__mobile\">\n <summary class=\"ghcn-icon-button ghcn-button--outline\" aria-label=\"Open navigation\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\"><path d=\"M4 7h16M4 12h16M4 17h16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n </summary>\n <div class=\"ghcn-header__panel\">\n <nav aria-label=\"Mobile navigation\">{{navigation}}</nav>\n <div class=\"ghcn-header__mobile-actions\">\n {{search}}\n {{#if @member}}\n <a class=\"ghcn-button ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Account</a>\n {{else}}\n <a class=\"ghcn-button ghcn-button--outline\" href=\"#/portal/signin\" data-portal=\"signin\">Sign in</a>\n <a class=\"ghcn-button\" href=\"#/portal/signup\" data-portal=\"signup\">Subscribe</a>\n {{/if}}\n </div>\n </div>\n </details>\n </div>\n</header>"
13
+ },
14
+ {
15
+ "name": "site-header.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/site-header.css",
18
+ "content": "/* ghostcn: Site Header */\n.ghcn-header { box-sizing: border-box; position: relative; z-index: 30; border-bottom: 1px solid var(--border); color: var(--foreground); background: color-mix(in srgb, var(--background) 92%, transparent); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-header *, .ghcn-header *::before, .ghcn-header *::after { box-sizing: border-box; }\n.ghcn-header__inner { display: flex; min-height: 4.5em; align-items: center; gap: 1.5em; }\n.ghcn-header__brand { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--foreground); font-size: 1.125em; font-weight: 800; letter-spacing: -0.025em; text-decoration: none; }\n.ghcn-header__brand img { display: block; width: auto; max-width: 11em; max-height: 2.25em; }\n.ghcn-header__nav { min-width: 0; flex: 1; }\n.ghcn-header .nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25em; margin: 0; padding: 0; list-style: none; }\n.ghcn-header .nav a, .ghcn-header__signin { color: var(--muted-foreground); font-size: 0.875em; font-weight: 600; text-decoration: none; }\n.ghcn-header .nav a:hover, .ghcn-header .nav-current a, .ghcn-header__signin:hover { color: var(--foreground); }\n.ghcn-header__actions { display: flex; align-items: center; gap: 0.75em; }\n.ghcn-header__actions .gh-search-icon { color: var(--foreground) !important; }\n.ghcn-header__mobile { display: none; margin-left: auto; }\n.ghcn-header__mobile summary { list-style: none; }\n.ghcn-header__mobile summary::-webkit-details-marker { display: none; }\n.ghcn-header__panel { position: absolute; top: calc(100% + 0.5em); right: 1em; left: 1em; border: 1px solid var(--border); border-radius: min(var(--radius), 1em); padding: 1em; background: var(--popover); box-shadow: 0 1em 2.5em rgba(0,0,0,.14); }\n.ghcn-header__panel .nav { align-items: stretch; flex-direction: column; gap: 0.25em; }\n.ghcn-header__panel .nav a { display: block; border-radius: var(--radius); padding: 0.625em 0.75em; }\n.ghcn-header__panel .nav a:hover { background: var(--muted); }\n.ghcn-header__mobile-actions { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.5em; margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--border); }\n@media (max-width: 800px) { .ghcn-header__nav, .ghcn-header__actions { display: none; } .ghcn-header__mobile { display: block; } }\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses Ghost navigation, search, member state, and Portal triggers."
26
+ }
27
+ }
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
3
  "name": "newsletter-form",
4
- "description": "A native Ghost members subscription form.",
4
+ "description": "A native Ghost members subscription form with state handling.",
5
5
  "category": "components:ui",
6
6
  "ghost_version": ">=5.0.0",
7
7
  "files": [
@@ -38,5 +38,65 @@
38
38
  "post-card.hbs",
39
39
  "post-card.css"
40
40
  ]
41
+ },
42
+ {
43
+ "name": "site-header",
44
+ "description": "Responsive Ghost navigation with search, member actions, and an accessible mobile menu.",
45
+ "category": "components:layout",
46
+ "ghost_version": ">=5.0.0",
47
+ "files": [
48
+ "site-header.hbs",
49
+ "site-header.css"
50
+ ]
51
+ },
52
+ {
53
+ "name": "site-footer",
54
+ "description": "Publication footer with secondary navigation, social links, and Ghost attribution.",
55
+ "category": "components:layout",
56
+ "ghost_version": ">=5.0.0",
57
+ "files": [
58
+ "site-footer.hbs",
59
+ "site-footer.css"
60
+ ]
61
+ },
62
+ {
63
+ "name": "featured-posts",
64
+ "description": "Responsive homepage hero populated from Ghost featured posts.",
65
+ "category": "components:content",
66
+ "ghost_version": ">=5.0.0",
67
+ "files": [
68
+ "featured-posts.hbs",
69
+ "featured-posts.css"
70
+ ]
71
+ },
72
+ {
73
+ "name": "pagination",
74
+ "description": "Accessible, responsive replacement for Ghost’s native pagination markup.",
75
+ "category": "components:navigation",
76
+ "ghost_version": ">=5.0.0",
77
+ "files": [
78
+ "pagination.hbs",
79
+ "pagination.css"
80
+ ]
81
+ },
82
+ {
83
+ "name": "post-header",
84
+ "description": "Editorial post heading with tags, author metadata, reading time, and responsive feature image.",
85
+ "category": "components:content",
86
+ "ghost_version": ">=5.0.0",
87
+ "files": [
88
+ "post-header.hbs",
89
+ "post-header.css"
90
+ ]
91
+ },
92
+ {
93
+ "name": "member-cta",
94
+ "description": "Context-aware member CTA for visitors, free members, paid members, and protected posts.",
95
+ "category": "components:members",
96
+ "ghost_version": ">=5.0.0",
97
+ "files": [
98
+ "member-cta.hbs",
99
+ "member-cta.css"
100
+ ]
41
101
  }
42
102
  ]
@@ -0,0 +1,16 @@
1
+ import { GhostcnConfig } from './theme-project';
2
+ import { StyleSyncResult } from './theme-files';
3
+ export interface InstallComponentOptions {
4
+ themeRoot: string;
5
+ componentName: string;
6
+ config: GhostcnConfig;
7
+ overwrite?: boolean;
8
+ shouldOverwrite?: (relativePath: string) => Promise<boolean>;
9
+ }
10
+ export interface InstallComponentResult {
11
+ name: string;
12
+ installed: string[];
13
+ skipped: string[];
14
+ styleSync?: StyleSyncResult;
15
+ }
16
+ export declare function installComponent(options: InstallComponentOptions): Promise<InstallComponentResult>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.installComponent = installComponent;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const registry_1 = require("./registry");
10
+ const theme_files_1 = require("./theme-files");
11
+ function aliasedTarget(config, file) {
12
+ if (file.placement === 'theme') {
13
+ if (!file.target)
14
+ throw new Error(`Registry file "${file.name}" is missing its theme target.`);
15
+ return file.target;
16
+ }
17
+ let alias = '';
18
+ if (file.type === 'partial')
19
+ alias = config.aliases?.partials || 'partials/components';
20
+ if (file.type === 'style')
21
+ alias = config.aliases?.styles || 'assets/css/components';
22
+ if (file.type === 'js')
23
+ alias = config.aliases?.js || 'assets/js/components';
24
+ if (!alias)
25
+ throw new Error(`Unsupported registry file type "${file.type}".`);
26
+ return path_1.default.join(alias, file.name);
27
+ }
28
+ async function installComponent(options) {
29
+ const name = (0, registry_1.sanitizeComponentName)(options.componentName);
30
+ const manifest = await (0, registry_1.getComponent)(name);
31
+ if (!manifest)
32
+ throw new Error(`Component "${name}" was not found in the registry.`);
33
+ const result = { name, installed: [], skipped: [] };
34
+ for (const file of manifest.files) {
35
+ if (path_1.default.basename(file.name) !== file.name) {
36
+ throw new Error(`Registry returned an unsafe file name for "${name}".`);
37
+ }
38
+ const relativeTarget = aliasedTarget(options.config, file);
39
+ const targetPath = (0, theme_files_1.resolveWithinTheme)(options.themeRoot, relativeTarget);
40
+ if (fs_1.default.existsSync(targetPath) && !options.overwrite) {
41
+ const replace = options.shouldOverwrite ? await options.shouldOverwrite(relativeTarget.replace(/\\/g, '/')) : false;
42
+ if (!replace) {
43
+ result.skipped.push(relativeTarget);
44
+ continue;
45
+ }
46
+ }
47
+ fs_1.default.mkdirSync(path_1.default.dirname(targetPath), { recursive: true });
48
+ fs_1.default.writeFileSync(targetPath, file.content, 'utf8');
49
+ result.installed.push(relativeTarget);
50
+ }
51
+ if (manifest.files.some(file => file.type === 'style')) {
52
+ result.styleSync = (0, theme_files_1.syncGhostcnStyles)({
53
+ themeRoot: options.themeRoot,
54
+ cssFile: options.config.cssFile || 'assets/css/ghostcn.css',
55
+ stylesDir: options.config.aliases?.styles || 'assets/css/components'
56
+ });
57
+ }
58
+ return result;
59
+ }
@@ -3,6 +3,7 @@ export interface ComponentFile {
3
3
  name: string;
4
4
  type: 'partial' | 'style' | 'js';
5
5
  target: string;
6
+ placement?: 'alias' | 'theme';
6
7
  content: string;
7
8
  }
8
9
  export interface ComponentManifest {
@@ -83,39 +83,62 @@ function findLocalManifest(componentName) {
83
83
  }
84
84
  }
85
85
  async function getRegistryIndex() {
86
- const registryBaseUrl = process.env.GHOST_UI_REGISTRY_URL || exports.DEFAULT_REGISTRY_URL;
87
- // 1. Try remote fetch
86
+ // If custom registry URL explicitly configured, try remote first
87
+ if (process.env.GHOST_UI_REGISTRY_URL) {
88
+ try {
89
+ const res = await fetchWithTimeout(`${process.env.GHOST_UI_REGISTRY_URL}/index.json`);
90
+ if (res.ok) {
91
+ return (await res.json());
92
+ }
93
+ }
94
+ catch {
95
+ // Fallback to local
96
+ }
97
+ }
98
+ // 1. Try local bundled registry first (zero-latency, offline-first)
99
+ const localIndex = findLocalIndex();
100
+ if (localIndex && localIndex.length > 0) {
101
+ return localIndex;
102
+ }
103
+ // 2. Fallback to default remote registry
88
104
  try {
89
- const res = await fetchWithTimeout(`${registryBaseUrl}/index.json`);
105
+ const res = await fetchWithTimeout(`${exports.DEFAULT_REGISTRY_URL}/index.json`);
90
106
  if (res.ok) {
91
- const data = await res.json();
92
- return data;
107
+ return (await res.json());
93
108
  }
94
109
  }
95
110
  catch {
96
- // Network or abort error, continue to fallback
97
- }
98
- // 2. Fallback to local
99
- const localIndex = findLocalIndex();
100
- if (localIndex) {
101
- return localIndex;
111
+ // Network or abort error
102
112
  }
103
113
  return [];
104
114
  }
105
115
  async function getComponent(componentName) {
106
116
  const sanitized = sanitizeComponentName(componentName);
107
- const registryBaseUrl = process.env.GHOST_UI_REGISTRY_URL || exports.DEFAULT_REGISTRY_URL;
108
- // 1. Try remote fetch
117
+ // If custom registry URL explicitly configured, try remote first
118
+ if (process.env.GHOST_UI_REGISTRY_URL) {
119
+ try {
120
+ const res = await fetchWithTimeout(`${process.env.GHOST_UI_REGISTRY_URL}/components/${sanitized}.json`);
121
+ if (res.ok) {
122
+ return (await res.json());
123
+ }
124
+ }
125
+ catch {
126
+ // Fallback to local
127
+ }
128
+ }
129
+ // 1. Try local bundled registry first (zero-latency, offline-first)
130
+ const local = findLocalManifest(sanitized);
131
+ if (local)
132
+ return local;
133
+ // 2. Fallback to default remote registry
109
134
  try {
110
- const res = await fetchWithTimeout(`${registryBaseUrl}/components/${sanitized}.json`);
135
+ const res = await fetchWithTimeout(`${exports.DEFAULT_REGISTRY_URL}/components/${sanitized}.json`);
111
136
  if (res.ok) {
112
- const data = await res.json();
113
- return data;
137
+ return (await res.json());
114
138
  }
115
139
  }
116
140
  catch {
117
- // Network or abort error, continue to fallback
141
+ // Network or abort error
118
142
  }
119
- // 2. Fallback to local
120
- return findLocalManifest(sanitized);
143
+ return null;
121
144
  }
@@ -0,0 +1,13 @@
1
+ export interface StyleSyncOptions {
2
+ themeRoot: string;
3
+ cssFile: string;
4
+ stylesDir: string;
5
+ }
6
+ export interface StyleSyncResult {
7
+ status: 'updated' | 'unchanged' | 'missing-template';
8
+ templatePath: string;
9
+ assetPaths: string[];
10
+ }
11
+ export declare function resolveWithinTheme(themeRoot: string, relativePath: string): string;
12
+ export declare function toGhostAssetPath(themeRelativePath: string): string;
13
+ export declare function syncGhostcnStyles(options: StyleSyncOptions): StyleSyncResult;