ghostcn 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.js +10 -3
- package/dist/commands/diff.js +47 -5
- package/dist/commands/init.js +17 -8
- package/dist/commands/list.js +22 -4
- package/dist/registry/components/accordion.json +66 -0
- package/dist/registry/components/account-card.json +57 -0
- package/dist/registry/components/announcement-bar.json +79 -0
- package/dist/registry/components/archive-header.json +1 -1
- package/dist/registry/components/author-card.json +2 -2
- package/dist/registry/components/author-list.json +1 -1
- package/dist/registry/components/author-stack.json +63 -0
- package/dist/registry/components/avatar.json +62 -0
- package/dist/registry/components/back-to-top.json +72 -0
- package/dist/registry/components/breadcrumbs.json +59 -0
- package/dist/registry/components/button.json +1 -1
- package/dist/registry/components/callout.json +56 -0
- package/dist/registry/components/checkbox.json +82 -0
- package/dist/registry/components/code-copy.json +52 -0
- package/dist/registry/components/comments-section.json +56 -0
- package/dist/registry/components/dialog.json +83 -0
- package/dist/registry/components/dropdown.json +85 -0
- package/dist/registry/components/empty-state.json +65 -0
- package/dist/registry/components/error-card.json +74 -0
- package/dist/registry/components/faq-section.json +83 -0
- package/dist/registry/components/featured-posts.json +2 -2
- package/dist/registry/components/hero.json +89 -0
- package/dist/registry/components/image-lightbox.json +44 -0
- package/dist/registry/components/input.json +8 -2
- package/dist/registry/components/magazine-grid.json +62 -0
- package/dist/registry/components/member-cta.json +1 -1
- package/dist/registry/components/mobile-dock.json +69 -0
- package/dist/registry/components/newsletter-form.json +12 -3
- package/dist/registry/components/pagination.json +2 -2
- package/dist/registry/components/post-card.json +2 -2
- package/dist/registry/components/post-grid.json +2 -2
- package/dist/registry/components/post-header.json +2 -2
- package/dist/registry/components/post-list.json +62 -0
- package/dist/registry/components/pricing-table.json +24 -4
- package/dist/registry/components/pull-quote.json +70 -0
- package/dist/registry/components/radio-group.json +94 -0
- package/dist/registry/components/reader-controls.json +60 -0
- package/dist/registry/components/reading-meta.json +49 -0
- package/dist/registry/components/reading-progress.json +73 -0
- package/dist/registry/components/related-posts.json +7 -1
- package/dist/registry/components/search-trigger.json +68 -0
- package/dist/registry/components/select.json +94 -0
- package/dist/registry/components/separator.json +46 -0
- package/dist/registry/components/series-nav.json +62 -0
- package/dist/registry/components/share-buttons.json +76 -0
- package/dist/registry/components/site-footer.json +2 -2
- package/dist/registry/components/site-header.json +1 -1
- package/dist/registry/components/skeleton.json +48 -0
- package/dist/registry/components/skip-link.json +53 -0
- package/dist/registry/components/social-links.json +74 -0
- package/dist/registry/components/stat-strip.json +85 -0
- package/dist/registry/components/sticky-subscribe.json +82 -0
- package/dist/registry/components/subscribe-bar.json +61 -0
- package/dist/registry/components/switch.json +76 -0
- package/dist/registry/components/table-of-contents.json +12 -2
- package/dist/registry/components/tabs.json +81 -0
- package/dist/registry/components/tag-bar.json +63 -0
- package/dist/registry/components/tag-grid.json +1 -1
- package/dist/registry/components/tag-list.json +1 -1
- package/dist/registry/components/textarea.json +95 -0
- package/dist/registry/components/theme-toggle.json +65 -0
- package/dist/registry/components/tier-comparison.json +55 -0
- package/dist/registry/components/timeline.json +85 -0
- package/dist/registry/components/tooltip.json +65 -0
- package/dist/registry/components/visibility-badge.json +71 -0
- package/dist/registry/index.json +478 -4
- package/dist/templates/playground/index.html +2 -2
- package/dist/templates/playground/playground.css +8 -1
- package/dist/templates/playground/playground.js +39 -5
- package/dist/templates/playground/preview.css +1 -0
- package/dist/templates/theme-tools.mjs +62 -24
- package/dist/utils/component-diff.d.ts +1 -1
- package/dist/utils/component-diff.js +46 -17
- package/dist/utils/component-files.js +3 -2
- package/dist/utils/component-history.js +1 -1
- package/dist/utils/playground-server.js +40 -12
- package/dist/utils/preview-renderer.d.ts +77 -0
- package/dist/utils/preview-renderer.js +68 -8
- package/dist/utils/registry.js +15 -5
- package/dist/utils/theme-files.js +14 -7
- package/dist/utils/theme-project.js +6 -4
- package/dist/utils/theme-scaffold.js +22 -7
- package/dist/utils/theme.js +39 -32
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "magazine-grid",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Editorial newsroom grid pairing a large featured lead story with a stacked right-hand dispatch rail.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Layout style: default, reversed, or compact.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"reversed",
|
|
13
|
+
"compact"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"heading": {
|
|
18
|
+
"description": "Optional section heading."
|
|
19
|
+
},
|
|
20
|
+
"actionText": {
|
|
21
|
+
"description": "Optional header link label.",
|
|
22
|
+
"default": "View all"
|
|
23
|
+
},
|
|
24
|
+
"actionHref": {
|
|
25
|
+
"description": "Optional header link URL."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{
|
|
30
|
+
"name": "magazine-grid.hbs",
|
|
31
|
+
"type": "partial",
|
|
32
|
+
"target": "partials/components/magazine-grid.hbs",
|
|
33
|
+
"content": "{{!-- Styling parameters: class, titleClass, gridClass, itemClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if posts}}\n<section class=\"ghcn-magazine{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"reversed\"}}reversed{{else}}{{#match variant \"compact\"}}compact{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}Featured stories{{/if}}\">\n {{#if heading}}\n <header class=\"ghcn-magazine__header\">\n <h2 class=\"ghcn-magazine__heading{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</h2>\n {{#if actionHref}}<a class=\"ghcn-magazine__more\" href=\"{{actionHref}}\">{{#if actionText}}{{actionText}}{{else}}View all{{/if}} →</a>{{/if}}\n </header>\n {{/if}}\n <div class=\"ghcn-magazine__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts limit=\"5\"}}\n <article class=\"ghcn-magazine__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}} {{#if @first}}ghcn-magazine__item--lead{{else}}ghcn-magazine__item--side{{/if}}\">\n {{#if @first}}\n {{#if feature_image}}\n <a class=\"ghcn-magazine__lead-media\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img class=\"ghcn-magazine__img\" src=\"{{img_url feature_image size=\"l\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" loading=\"lazy\" />\n </a>\n {{/if}}\n <div class=\"ghcn-magazine__lead-body\">\n <div class=\"ghcn-magazine__meta\">\n {{#if primary_tag}}<a class=\"ghcn-magazine__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a><span aria-hidden=\"true\">·</span>{{/if}}\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span aria-hidden=\"true\">·</span>\n <span>{{reading_time}}</span>\n </div>\n <h3 class=\"ghcn-magazine__lead-title\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-magazine__excerpt\">{{excerpt words=\"28\"}}</p>{{/if}}\n {{#primary_author}}<p class=\"ghcn-magazine__author\">By <a href=\"{{url}}\">{{name}}</a></p>{{/primary_author}}\n </div>\n {{else}}\n <div class=\"ghcn-magazine__side-body\">\n <div class=\"ghcn-magazine__meta\">\n {{#if primary_tag}}<a class=\"ghcn-magazine__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a><span aria-hidden=\"true\">·</span>{{/if}}\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM\"}}</time>\n </div>\n <h3 class=\"ghcn-magazine__side-title\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-magazine__side-excerpt\">{{excerpt words=\"16\"}}</p>{{/if}}\n </div>\n {{#if feature_image}}\n <a class=\"ghcn-magazine__side-media\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img class=\"ghcn-magazine__img\" src=\"{{img_url feature_image size=\"s\"}}\" alt=\"\" loading=\"lazy\" />\n </a>\n {{/if}}\n {{/if}}\n </article>\n {{/foreach}}\n </div>\n</section>\n{{/if}}\n{{/with}}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "magazine-grid.css",
|
|
37
|
+
"type": "style",
|
|
38
|
+
"target": "assets/css/components/magazine-grid.css",
|
|
39
|
+
"content": ".ghcn-magazine { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-magazine *, .ghcn-magazine *::before, .ghcn-magazine *::after { box-sizing: border-box; }\n.ghcn-magazine__header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }\n.ghcn-magazine__heading { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; }\n.ghcn-magazine__more { font-size: 13.5px; font-weight: 600; color: var(--muted-foreground); text-decoration: none; white-space: nowrap; transition: color 150ms ease; }\n.ghcn-magazine__more:hover { color: var(--foreground); }\n.ghcn-magazine__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }\n@media (min-width: 820px) {\n .ghcn-magazine__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }\n .ghcn-magazine__item--lead { grid-column: 1; grid-row: 1 / span 6; }\n .ghcn-magazine__item--side { grid-column: 2; }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__item--lead { grid-column: 2; }\n .ghcn-magazine:where([data-variant=\"reversed\"]) .ghcn-magazine__item--side { grid-column: 1; }\n}\n.ghcn-magazine__item--lead { display: grid; gap: 18px; }\n.ghcn-magazine__lead-media { display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px); overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); }\n.ghcn-magazine__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }\n.ghcn-magazine__item:hover .ghcn-magazine__img { transform: scale(1.03); }\n.ghcn-magazine__lead-body { display: grid; gap: 10px; }\n.ghcn-magazine__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted-foreground); }\n.ghcn-magazine__tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; background: var(--secondary); color: var(--foreground); font-size: 11.5px; font-weight: 600; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }\n.ghcn-magazine__tag:hover { background: var(--primary); color: var(--primary-foreground); }\n.ghcn-magazine__lead-title { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.035em; }\n.ghcn-magazine__lead-title a, .ghcn-magazine__side-title a { color: inherit; text-decoration: none; transition: opacity 150ms ease; }\n.ghcn-magazine__lead-title a:hover, .ghcn-magazine__side-title a:hover { opacity: 0.78; }\n.ghcn-magazine__excerpt { margin: 0; color: var(--muted-foreground); font-size: 15.5px; line-height: 1.6; }\n.ghcn-magazine__author { margin: 4px 0 0; font-size: 13px; color: var(--muted-foreground); }\n.ghcn-magazine__author a { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-magazine__author a:hover { text-decoration: underline; }\n.ghcn-magazine__item--side { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-block: 18px; border-bottom: 1px solid var(--border); }\n.ghcn-magazine__item--side:nth-child(2) { padding-top: 0; }\n.ghcn-magazine__item--side:last-child { border-bottom: 0; padding-bottom: 0; }\n.ghcn-magazine__side-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }\n.ghcn-magazine__side-title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; font-size: 17px; line-height: 1.3; }\n.ghcn-magazine__side-excerpt { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.ghcn-magazine:where([data-variant=\"compact\"]) .ghcn-magazine__side-excerpt { display: none; }\n.ghcn-magazine__side-media { flex: 0 0 112px; aspect-ratio: 4 / 3; border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); }\n@media (prefers-reduced-motion: reduce) { .ghcn-magazine__img { transition: none; transform: none; } }\n.ghcn-magazine:focus-visible, :where(.ghcn-magazine) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"gscan": {
|
|
43
|
+
"rules_satisfied": [
|
|
44
|
+
"GS010-PJ-VALID"
|
|
45
|
+
],
|
|
46
|
+
"notes": "Uses standard Ghost post loop helpers (feature_image, primary_tag, excerpt, reading_time, primary_author)."
|
|
47
|
+
},
|
|
48
|
+
"styleSlots": {
|
|
49
|
+
"class": [
|
|
50
|
+
".ghcn-magazine"
|
|
51
|
+
],
|
|
52
|
+
"titleClass": [
|
|
53
|
+
".ghcn-magazine__heading"
|
|
54
|
+
],
|
|
55
|
+
"gridClass": [
|
|
56
|
+
".ghcn-magazine__grid"
|
|
57
|
+
],
|
|
58
|
+
"itemClass": [
|
|
59
|
+
".ghcn-magazine__item"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "member-cta.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/member-cta.css",
|
|
18
|
-
"content": "/* ghostcn: Member CTA */\n.ghcn-member-cta { box-sizing: border-box; min-width: 0;
|
|
18
|
+
"content": "/* ghostcn: Member CTA */\n.ghcn-member-cta { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; width: min(100% - 32px, 704px); margin-inline: auto; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); text-align: center; }\n.ghcn-member-cta *, .ghcn-member-cta *::before, .ghcn-member-cta *::after { box-sizing: border-box; }\n.ghcn-member-cta__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 12px 0 8px; color: inherit; }\n.ghcn-member-cta__description { max-width: 60ch; margin: 0 auto 16px; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); }\n.ghcn-member-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-dock",
|
|
3
|
+
"type": "components:layout",
|
|
4
|
+
"description": "Thumb-friendly mobile bottom navigation bar with Home, Ghost Search, Member Portal, and Top actions.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Dock style: default (edge-to-edge), floating (pill), or minimal.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"floating",
|
|
13
|
+
"minimal"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"ariaLabel": {
|
|
18
|
+
"description": "Accessible nav label.",
|
|
19
|
+
"default": "Mobile navigation"
|
|
20
|
+
},
|
|
21
|
+
"homeLabel": {
|
|
22
|
+
"description": "Home item label.",
|
|
23
|
+
"default": "Home"
|
|
24
|
+
},
|
|
25
|
+
"searchLabel": {
|
|
26
|
+
"description": "Search item label.",
|
|
27
|
+
"default": "Search"
|
|
28
|
+
},
|
|
29
|
+
"subscribeLabel": {
|
|
30
|
+
"description": "Subscribe item label for visitors.",
|
|
31
|
+
"default": "Subscribe"
|
|
32
|
+
},
|
|
33
|
+
"topLabel": {
|
|
34
|
+
"description": "Top anchor label.",
|
|
35
|
+
"default": "Top"
|
|
36
|
+
},
|
|
37
|
+
"alwaysVisible": {
|
|
38
|
+
"description": "Render inline at all viewport widths (useful for previews)."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
{
|
|
43
|
+
"name": "mobile-dock.hbs",
|
|
44
|
+
"type": "partial",
|
|
45
|
+
"target": "partials/components/mobile-dock.hbs",
|
|
46
|
+
"content": "{{!-- Styling parameters: class, linkClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-mobile-dock{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"floating\"}}floating{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}\" data-always-visible=\"{{#if alwaysVisible}}true{{else}}false{{/if}}\" aria-label=\"{{#if ariaLabel}}{{ariaLabel}}{{else}}Mobile navigation{{/if}}\">\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{@site.url}}\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 9.5 10 3.5l7 6V16.5a1 1 0 0 1-1 1h-4v-5H8v5H4a1 1 0 0 1-1-1V9.5Z\"/></svg>\n <span>{{#if homeLabel}}{{homeLabel}}{{else}}Home{{/if}}</span>\n </a>\n <button type=\"button\" class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" data-ghost-search>\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\"><circle cx=\"9\" cy=\"9\" r=\"5.5\"/><path d=\"m13.5 13.5 3.5 3.5\"/></svg>\n <span>{{#if searchLabel}}{{searchLabel}}{{else}}Search{{/if}}</span>\n </button>\n {{#if @site.members_enabled}}\n {{#if @member}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"#/portal/account\" data-portal=\"account\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"7\" r=\"3.25\"/><path d=\"M4 16.5a6 6 0 0 1 12 0\"/></svg>\n <span>Account</span>\n </a>\n {{else}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}} ghcn-mobile-dock__item--accent\" href=\"#/portal/signup\" data-portal=\"signup\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"4.5\" width=\"15\" height=\"11\" rx=\"2\"/><path d=\"m3.5 6 6.5 4.75L16.5 6\"/></svg>\n <span>{{#if subscribeLabel}}{{subscribeLabel}}{{else}}Subscribe{{/if}}</span>\n </a>\n {{/if}}\n {{/if}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"#top\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 15.5V4.5M5.5 9 10 4.5 14.5 9\"/></svg>\n <span>{{#if topLabel}}{{topLabel}}{{else}}Top{{/if}}</span>\n </a>\n</nav>\n{{/with}}"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "mobile-dock.css",
|
|
50
|
+
"type": "style",
|
|
51
|
+
"target": "assets/css/components/mobile-dock.css",
|
|
52
|
+
"content": ".ghcn-mobile-dock { box-sizing: border-box; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: inherit; }\n.ghcn-mobile-dock *, .ghcn-mobile-dock *::before, .ghcn-mobile-dock *::after { box-sizing: border-box; }\n@media (min-width: 768px) { .ghcn-mobile-dock:not([data-always-visible=\"true\"]) { display: none; } }\n.ghcn-mobile-dock[data-always-visible=\"true\"] { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; width: min(100%, 420px); margin-inline: auto; }\n.ghcn-mobile-dock:where([data-variant=\"floating\"]) { left: 12px; right: 12px; bottom: 12px; max-width: 420px; margin-inline: auto; border: 1px solid var(--border); border-radius: 9999px; padding: 6px 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }\n.ghcn-mobile-dock:where([data-variant=\"floating\"][data-always-visible=\"true\"]) { left: auto; right: auto; bottom: auto; }\n.ghcn-mobile-dock:where([data-variant=\"minimal\"]) { background: var(--background); backdrop-filter: none; -webkit-backdrop-filter: none; }\n.ghcn-mobile-dock__item { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 46px; padding: 4px 6px; border: 0; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: transparent; color: var(--muted-foreground); font: inherit; font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }\n.ghcn-mobile-dock:where([data-variant=\"floating\"]) .ghcn-mobile-dock__item { border-radius: 9999px; }\n.ghcn-mobile-dock__item:hover { color: var(--foreground); background: var(--secondary); }\n.ghcn-mobile-dock__item--accent { color: var(--primary); }\n.ghcn-mobile-dock:focus-visible, :where(.ghcn-mobile-dock) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"gscan": {
|
|
56
|
+
"rules_satisfied": [
|
|
57
|
+
"GS010-PJ-VALID"
|
|
58
|
+
],
|
|
59
|
+
"notes": "Uses Ghost native @site.url, data-ghost-search, and data-portal actions."
|
|
60
|
+
},
|
|
61
|
+
"styleSlots": {
|
|
62
|
+
"class": [
|
|
63
|
+
".ghcn-mobile-dock"
|
|
64
|
+
],
|
|
65
|
+
"linkClass": [
|
|
66
|
+
".ghcn-mobile-dock__item"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newsletter-form",
|
|
3
|
-
"type": "components:
|
|
3
|
+
"type": "components:members",
|
|
4
4
|
"description": "A native Ghost members subscription form with state handling.",
|
|
5
5
|
"dependencies": [],
|
|
6
6
|
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"title": {
|
|
9
|
+
"description": "Optional heading override.",
|
|
10
|
+
"default": "Subscribe to our newsletter"
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"description": "Optional introductory text override."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
7
16
|
"files": [
|
|
8
17
|
{
|
|
9
18
|
"name": "newsletter-form.hbs",
|
|
10
19
|
"type": "partial",
|
|
11
20
|
"target": "partials/components/newsletter-form.hbs",
|
|
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
|
|
21
|
+
"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 <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 8.5 6.5 12 13 4\"/></svg>\n <span>Check your inbox to confirm your subscription!</span>\n </div>\n <div class=\"gh-newsletter-msg-error message-error\" role=\"alert\" data-members-error>\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 4l8 8M12 4l-8 8\"/></svg>\n <span>Please enter a valid email address.</span>\n </div>\n </form>\n {{/if}}\n</section>\n{{/unless}}\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
|
|
13
22
|
},
|
|
14
23
|
{
|
|
15
24
|
"name": "newsletter-form.css",
|
|
16
25
|
"type": "style",
|
|
17
26
|
"target": "assets/css/components/newsletter-form.css",
|
|
18
|
-
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box; min-width: 0;
|
|
27
|
+
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b);\n margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px));\n font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n padding: clamp(28px, 4.5vw, 48px) clamp(24px, 4.5vw, 52px);\n text-align: center;\n width: min(100% - 32px, 1152px);\n margin-inline: auto;\n border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px);\n display: grid;\n gap: 24px;\n align-items: center;\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-form {\n grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);\n text-align: left;\n gap: 40px;\n }\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: 0; }\n\n.gh-newsletter-title {\n font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance;\n font-size: clamp(24px, 3vw, 32px);\n margin: 0 0 8px;\n color: inherit;\n}\n\n.gh-newsletter-desc {\n color: var(--muted-foreground, #71717a);\n font-size: 15px;\n line-height: 1.6;\n margin: 0 auto;\n max-width: 46ch;\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-desc { margin: 0; }\n}\n\n.gh-newsletter-fields {\n display: grid;\n gap: 8px;\n width: 100%;\n max-width: 460px;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n grid-template-columns: minmax(0, 1fr) auto;\n }\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-fields {\n margin: 0 0 0 auto;\n }\n}\n\n.gh-newsletter-input {\n min-width: 0;\n min-height: 44px;\n padding: 0 14px;\n background-color: var(--background, #ffffff);\n color: var(--foreground, #09090b);\n border: 1px solid var(--input, #e4e4e7);\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: 14.5px;\n line-height: 1.25;\n}\n\n.gh-newsletter-form:focus-visible, :where(.gh-newsletter-form) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n\n.gh-newsletter-btn {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n min-height: 44px;\n padding: 0 22px;\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.25;\n border: 1px solid transparent;\n cursor: pointer;\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 grid-column: 1 / -1;\n font-size: 12px;\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: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\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: var(--success, #15803d);\n}\n\n.gh-newsletter-msg-error {\n color: var(--destructive, #dc2626);\n}\n"
|
|
19
28
|
}
|
|
20
29
|
],
|
|
21
30
|
"gscan": {
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/pagination.hbs",
|
|
12
12
|
"placement": "theme",
|
|
13
|
-
"content": "{{!-- Styling parameters: class, buttonClass, statusClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"
|
|
13
|
+
"content": "{{!-- Styling parameters: class, buttonClass, statusClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if prev}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url prev}}\" rel=\"prev\"><span aria-hidden=\"true\">←</span> Newer</a></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\">→</span></a>{{/if}}</div>\n</nav>\n{{else}}{{#if next}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\"></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\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url next}}\" rel=\"next\">Older <span aria-hidden=\"true\">→</span></a></div>\n</nav>\n{{/if}}{{/if}}\n{{/with}}"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "pagination.css",
|
|
17
17
|
"type": "style",
|
|
18
18
|
"target": "assets/css/components/pagination.css",
|
|
19
|
-
"content": "/* ghostcn: Pagination */\n.ghcn-pagination { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--ghcn-grid-gap, 16px); }\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:
|
|
19
|
+
"content": "/* ghostcn: Pagination */\n.ghcn-pagination { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--ghcn-grid-gap, 16px); }\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: 13px; }\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
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"gscan": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"name": "post-card.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/post-card.hbs",
|
|
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=\"
|
|
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\" tabindex=\"-1\" aria-hidden=\"true\">\n <img src=\"{{img_url feature_image size=\"m\"}}\" alt=\"\" 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\" aria-hidden=\"true\">•</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
|
|
18
|
+
"content": "/* ghostcn: Post Card Styles — Biron editorial frameless card */\n.gh-post-card {\n box-sizing: border-box;\n min-width: 0;\n overflow-wrap: anywhere;\n background: transparent;\n color: var(--card-foreground, var(--foreground, #09090b));\n font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n gap: 16px;\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-image {\n aspect-ratio: 16 / 10;\n overflow: hidden;\n display: block;\n border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 4px);\n border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-post-card-image img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.gh-post-card:hover .gh-post-card-image img {\n transform: scale(1.035);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gh-post-card, .gh-post-card-image img { transition: none; transform: none; }\n}\n\n.gh-post-card-content {\n padding: 0 2px;\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 14px;\n}\n\n.gh-post-card-meta {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 10px;\n color: var(--muted-foreground);\n font-size: 12.5px;\n}\n\n.gh-post-card-tag {\n display: inline-flex;\n align-items: center;\n padding: 3px 10px;\n border-radius: 9999px;\n background: var(--secondary);\n color: var(--foreground);\n font-size: 11.5px;\n font-weight: 600;\n letter-spacing: 0.01em;\n text-decoration: none;\n transition: background-color 150ms ease, color 150ms ease;\n}\n\n.gh-post-card-tag:hover {\n background: var(--primary);\n color: var(--primary-foreground);\n}\n\n.gh-post-card-title {\n font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit;\n line-height: 1.28;\n margin: 0 0 8px;\n}\n\n.gh-post-card-title a {\n color: inherit;\n text-decoration: none;\n transition: opacity 150ms ease;\n}\n\n.gh-post-card-title a:hover {\n opacity: 0.78;\n}\n\n.gh-post-card-excerpt {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n color: var(--muted-foreground, #71717a);\n font-size: 14.5px;\n line-height: 1.58;\n margin: 0;\n}\n\n.gh-post-card-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 4px 12px;\n font-size: 12.5px;\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-post-card-reading-time { color: var(--muted-foreground); }\n.gh-post-card-separator { color: color-mix(in srgb, var(--muted-foreground) 45%, transparent); }\n.gh-post-card-author { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--foreground); }\n.gh-post-card:focus-visible, :where(.gh-post-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.gh-post-card-image:focus-visible { outline-offset: -3px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"name": "post-grid.hbs",
|
|
20
20
|
"type": "partial",
|
|
21
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}}"
|
|
22
|
+
"content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, cardTitleClass, imageClass, descriptionClass --}}\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
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "post-grid.css",
|
|
26
26
|
"type": "style",
|
|
27
27
|
"target": "assets/css/components/post-grid.css",
|
|
28
|
-
"content": ".ghcn-post-grid { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-post-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0
|
|
28
|
+
"content": ".ghcn-post-grid { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-post-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 24px; }\n.ghcn-post-grid__grid { display: grid; grid-template-columns: 1fr; gap: 36px 28px; }\n@media (min-width: 640px) { .ghcn-post-grid__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@media (min-width: 980px) { .ghcn-post-grid__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n.ghcn-post-grid__grid > * { min-width: 0; }\n.ghcn-post-grid__empty { color: var(--muted-foreground); }"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
"styleSlots": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"name": "post-header.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/post-header.hbs",
|
|
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
|
|
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 <span aria-hidden=\"true\">•</span>\n {{/primary_author}}\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span aria-hidden=\"true\">•</span>\n <span>{{reading_time}}</span>\n </div>\n {{#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",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/post-header.css",
|
|
18
|
-
"content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); text-align: center; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; max-width:
|
|
18
|
+
"content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1040px); margin: 20px auto 36px; text-align: center; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(32px, 4.6vw, 52px); max-width: 22ch; margin: 14px auto 14px; }\n.ghcn-post-header__excerpt { max-width: 58ch; margin: 0 auto 20px; color: var(--muted-foreground); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }\n.ghcn-post-header__meta, .ghcn-post-header__author { display: flex; align-items: center; justify-content: center; gap: 10px; }\n.ghcn-post-header__meta { flex-wrap: wrap; color: var(--muted-foreground); font-size: 13.5px; }\n.ghcn-post-header__author { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-post-header__author .ghcn-avatar { width: 32px; height: 32px; border-radius: 9999px; object-fit: cover; }\n.ghcn-post-header__media { margin: 32px auto 0; max-width: 1040px; }\n.ghcn-post-header__image { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 580px; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); object-fit: cover; }\n.ghcn-post-header__media figcaption { margin-top: 12px; color: var(--muted-foreground); font-size: 13px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "post-list",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Compact editorial post list for newsletter archives, feeds, and sidebars.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Feed layout treatment.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"compact",
|
|
13
|
+
"bordered",
|
|
14
|
+
"minimal"
|
|
15
|
+
],
|
|
16
|
+
"default": "default"
|
|
17
|
+
},
|
|
18
|
+
"heading": {
|
|
19
|
+
"description": "Optional section heading."
|
|
20
|
+
},
|
|
21
|
+
"showImage": {
|
|
22
|
+
"description": "Boolean. Show feature image thumbnails beside each post."
|
|
23
|
+
},
|
|
24
|
+
"emptyText": {
|
|
25
|
+
"description": "Optional message when no posts are available."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{
|
|
30
|
+
"name": "post-list.hbs",
|
|
31
|
+
"type": "partial",
|
|
32
|
+
"target": "partials/components/post-list.hbs",
|
|
33
|
+
"content": "{{!-- Styling parameters: class, titleClass, itemClass, postTitleClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if posts}}\n<section class=\"ghcn-post-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"compact\"}}compact{{else}}{{#match variant \"bordered\"}}bordered{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}Posts{{/if}}\">\n {{#if heading}}<h2 class=\"ghcn-post-list__heading{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</h2>{{/if}}\n <div class=\"ghcn-post-list__items\">\n {{#foreach posts}}\n <article class=\"ghcn-post-list__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n {{#if ghostcnStyles.showImage}}{{#if feature_image}}\n <a class=\"ghcn-post-list__thumb\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img src=\"{{img_url feature_image size=\"s\"}}\" alt=\"\" loading=\"lazy\" />\n </a>\n {{/if}}{{/if}}\n <div class=\"ghcn-post-list__body\">\n <div class=\"ghcn-post-list__meta\">\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n {{#if primary_tag}}<span aria-hidden=\"true\">•</span><a class=\"ghcn-post-list__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a>{{/if}}\n <span aria-hidden=\"true\">•</span>\n <span>{{reading_time}}</span>\n </div>\n <h3 class=\"ghcn-post-list__title{{#if ghostcnStyles.postTitleClass}} {{ghostcnStyles.postTitleClass}}{{/if}}\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-post-list__excerpt\">{{excerpt words=\"24\"}}</p>{{/if}}\n </div>\n <a class=\"ghcn-post-list__arrow\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">→</a>\n </article>\n {{/foreach}}\n </div>\n</section>\n{{else}}{{#if emptyText}}<section class=\"ghcn-post-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"><p class=\"ghcn-post-list__empty\">{{emptyText}}</p></section>{{/if}}{{/if}}\n{{/with}}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "post-list.css",
|
|
37
|
+
"type": "style",
|
|
38
|
+
"target": "assets/css/components/post-list.css",
|
|
39
|
+
"content": ".ghcn-post-list { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 820px); margin-inline: auto; }\n.ghcn-post-list *, .ghcn-post-list *::before, .ghcn-post-list *::after { box-sizing: border-box; }\n.ghcn-post-list__heading { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); }\n.ghcn-post-list__items { display: grid; }\n.ghcn-post-list__item { display: flex; align-items: flex-start; gap: 18px; padding-block: 20px; border-bottom: 1px solid var(--border); transition: background-color 150ms ease, border-color 150ms ease; }\n.ghcn-post-list__item:first-child { border-top: 1px solid var(--border); }\n.ghcn-post-list__thumb { flex: 0 0 112px; aspect-ratio: 16 / 10; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); overflow: hidden; background: var(--muted); border: 1px solid var(--border); }\n.ghcn-post-list__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-post-list__body { min-width: 0; flex: 1; }\n.ghcn-post-list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); font-variant-numeric: tabular-nums; }\n.ghcn-post-list__tag { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-post-list__tag:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-post-list__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.ghcn-post-list__title a { color: inherit; text-decoration: none; }\n.ghcn-post-list__title a:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-post-list__excerpt { margin: 6px 0 0; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); line-height: 1.55; }\n.ghcn-post-list__arrow { flex: 0 0 auto; align-self: center; color: var(--muted-foreground); text-decoration: none; font-size: 18px; transition: transform 160ms ease, color 160ms ease; }\n.ghcn-post-list__item:hover .ghcn-post-list__arrow { transform: translateX(3px); color: var(--foreground); }\n.ghcn-post-list__empty { color: var(--muted-foreground); }\n\n/* Compact: hide excerpts and tighten row rhythm */\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__item { padding-block: 13px; align-items: center; }\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__excerpt { display: none; }\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__title { font-size: 16px; }\n\n/* Bordered: individual elevated surface rows */\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__items { gap: 12px; }\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__item { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); padding: 18px 20px; }\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__item:hover { border-color: color-mix(in srgb, var(--foreground) 22%, var(--border)); }\n\n/* Minimal: clean date-left archive layout without arrows */\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__excerpt,\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__arrow { display: none; }\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__item { padding-block: 12px; border-color: color-mix(in srgb, var(--border) 60%, transparent); }\n\n@media (max-width: 560px) {\n .ghcn-post-list__thumb { flex-basis: 84px; }\n .ghcn-post-list__arrow { display: none; }\n}\n.ghcn-post-list:focus-visible, :where(.ghcn-post-list) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-post-list__item, .ghcn-post-list__arrow { transition: none; transform: none; } }\n"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"gscan": {
|
|
43
|
+
"rules_satisfied": [
|
|
44
|
+
"GS010-PJ-VALID"
|
|
45
|
+
],
|
|
46
|
+
"notes": "Uses native Ghost content and site helpers."
|
|
47
|
+
},
|
|
48
|
+
"styleSlots": {
|
|
49
|
+
"class": [
|
|
50
|
+
".ghcn-post-list"
|
|
51
|
+
],
|
|
52
|
+
"titleClass": [
|
|
53
|
+
".ghcn-post-list__heading"
|
|
54
|
+
],
|
|
55
|
+
"itemClass": [
|
|
56
|
+
".ghcn-post-list__item"
|
|
57
|
+
],
|
|
58
|
+
"postTitleClass": [
|
|
59
|
+
".ghcn-post-list__title"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,28 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pricing-table",
|
|
3
3
|
"type": "components:members",
|
|
4
|
-
"description": "Live Ghost tiers, prices, currencies and
|
|
4
|
+
"description": "Live Ghost tiers, prices, currencies, benefits, and progressive monthly/yearly toggle with Portal checkout.",
|
|
5
5
|
"dependencies": [],
|
|
6
6
|
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"title": {
|
|
9
|
+
"description": "Optional section heading override.",
|
|
10
|
+
"default": "Choose your membership"
|
|
11
|
+
},
|
|
12
|
+
"defaultBilling": {
|
|
13
|
+
"description": "Initial interval when the progressive billing toggle activates.",
|
|
14
|
+
"options": [
|
|
15
|
+
"monthly",
|
|
16
|
+
"yearly"
|
|
17
|
+
],
|
|
18
|
+
"default": "monthly"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
7
21
|
"files": [
|
|
8
22
|
{
|
|
9
23
|
"name": "pricing-table.hbs",
|
|
10
24
|
"type": "partial",
|
|
11
25
|
"target": "partials/components/pricing-table.hbs",
|
|
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 <header class=\"gh-pricing-card__header\">\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 </header>\n <div class=\"gh-pricing-card__rates\"><p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">Free</p></div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/if}}\n <div class=\"gh-pricing-actions\">\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}}</div>\n</article>\n {{else}}\n {{#if @site.paid_members_enabled}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}} gh-pricing-card--paid\">\n <header class=\"gh-pricing-card__header\">\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 </header>\n <div class=\"gh-pricing-card__rates\">\n {{#if monthly_price}}\n <p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">{{price monthly_price currency=currency}} <span>/ month</span></p>\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}} gh-pricing-price--alternate\">{{price yearly_price currency=currency}} <span>
|
|
26
|
+
"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}}\" data-ghcn-pricing data-default-billing=\"{{#match defaultBilling \"yearly\"}}yearly{{else}}monthly{{/match}}\" 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-billing\" data-ghcn-billing-toggle role=\"group\" aria-label=\"Billing interval\" hidden>\n <button type=\"button\" class=\"gh-pricing-billing__btn\" data-billing-choice=\"monthly\" aria-pressed=\"true\">Monthly</button>\n <button type=\"button\" class=\"gh-pricing-billing__btn\" data-billing-choice=\"yearly\" aria-pressed=\"false\">Yearly <span class=\"gh-pricing-billing__badge\" data-billing-savings hidden></span></button>\n </div>\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 {{#if tiers}}\n {{#foreach tiers}}\n {{#match type \"free\"}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n <header class=\"gh-pricing-card__header\">\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 </header>\n <div class=\"gh-pricing-card__rates\"><p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">Free</p></div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/if}}\n <div class=\"gh-pricing-actions\">\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}}</div>\n</article>\n {{else}}\n {{#if @site.paid_members_enabled}}\n {{#if monthly_price}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}} gh-pricing-card--paid\"{{#if monthly_price}} data-monthly-cents=\"{{monthly_price}}\"{{/if}}{{#if yearly_price}} data-yearly-cents=\"{{yearly_price}}\"{{/if}}>\n <header class=\"gh-pricing-card__header\">\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 </header>\n <div class=\"gh-pricing-card__rates\">\n {{#if monthly_price}}\n <p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\"{{#if yearly_price}} data-pricing-interval=\"monthly\"{{/if}}>{{price monthly_price currency=currency}} <span>/ month</span></p>\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}} gh-pricing-price--alternate\" data-pricing-interval=\"yearly\">{{price yearly_price currency=currency}} <span>/ year</span></p>{{/if}}\n {{else}}\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 {{/if}}</div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/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}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\"{{#if yearly_price}} data-pricing-interval=\"monthly\"{{/if}} href=\"#/portal/signup/{{id}}/monthly\" data-portal=\"signup/{{id}}/monthly\" aria-label=\"Subscribe monthly to {{name}}\">Subscribe monthly</a>\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} gh-pricing-alternate\" data-pricing-interval=\"yearly\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\" aria-label=\"Subscribe yearly to {{name}}\">Subscribe yearly</a>{{/if}}\n {{else}}\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\" aria-label=\"Subscribe yearly to {{name}}\">Subscribe yearly</a>{{/if}}\n {{/if}}\n {{/if}}</div>\n</article>\n {{else if yearly_price}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}} gh-pricing-card--paid\"{{#if monthly_price}} data-monthly-cents=\"{{monthly_price}}\"{{/if}}{{#if yearly_price}} data-yearly-cents=\"{{yearly_price}}\"{{/if}}>\n <header class=\"gh-pricing-card__header\">\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 </header>\n <div class=\"gh-pricing-card__rates\">\n {{#if monthly_price}}\n <p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\"{{#if yearly_price}} data-pricing-interval=\"monthly\"{{/if}}>{{price monthly_price currency=currency}} <span>/ month</span></p>\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}} gh-pricing-price--alternate\" data-pricing-interval=\"yearly\">{{price yearly_price currency=currency}} <span>/ year</span></p>{{/if}}\n {{else}}\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 {{/if}}</div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/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}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\"{{#if yearly_price}} data-pricing-interval=\"monthly\"{{/if}} href=\"#/portal/signup/{{id}}/monthly\" data-portal=\"signup/{{id}}/monthly\" aria-label=\"Subscribe monthly to {{name}}\">Subscribe monthly</a>\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} gh-pricing-alternate\" data-pricing-interval=\"yearly\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\" aria-label=\"Subscribe yearly to {{name}}\">Subscribe yearly</a>{{/if}}\n {{else}}\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\" aria-label=\"Subscribe yearly to {{name}}\">Subscribe yearly</a>{{/if}}\n {{/if}}\n {{/if}}</div>\n</article>\n {{/if}}\n {{/if}}\n {{/match}}\n {{/foreach}}\n {{else}}\n <p class=\"gh-pricing-empty\">Membership plans are currently unavailable.</p>\n {{/if}}\n {{else}}\n <p class=\"gh-pricing-empty\">Membership plans are currently unavailable.</p>\n {{/get}}\n </div>\n</section>\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
|
|
13
27
|
},
|
|
14
28
|
{
|
|
15
29
|
"name": "pricing-table.css",
|
|
16
30
|
"type": "style",
|
|
17
31
|
"target": "assets/css/components/pricing-table.css",
|
|
18
|
-
"content": "/* ghostcn: live membership pricing */\n.gh-pricing { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 960px); margin-inline: auto; }\n.gh-pricing *, .gh-pricing *::before, .gh-pricing *::after { box-sizing: border-box; }\n.gh-pricing-title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); text-align: center; }\n.gh-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.gh-pricing-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); display: flex; flex-direction: column; gap: 16px; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.gh-pricing-card--paid { border-color: color-mix(in srgb, var(--foreground) 24%, var(--border)); }\n.gh-pricing-card:only-child { width: min(100%, 440px); justify-self: center; }\n.gh-pricing-card__header { display: grid; gap: 4px; }\n.gh-pricing-card__rates { display: grid; gap: 4px; }\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 { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.gh-pricing-description { margin: 0; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-block-start: 1px solid var(--border); list-style: none; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits li { display: flex; align-items: baseline; gap: 10px; color: inherit; }\n.gh-pricing-benefits li::before { content: \"\"; flex: 0 0 5px; height: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }\n.gh-pricing-price { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; color: inherit; font-variant-numeric: tabular-nums; }\n.gh-pricing-price span { font-size: var(--ghcn-text-small, 14px); font-weight: 400; letter-spacing: normal; color: inherit; }\n.gh-pricing-price--alternate { font-size: var(--ghcn-text-small, 14px); font-weight: 600; line-height: 1.5; letter-spacing: normal; }\n.gh-pricing-actions { display: grid; align-content: start; gap: 4px; margin-block-start: auto; padding-block-start: 4px; }\n.gh-pricing-actions:empty, .gh-pricing-card__rates:empty { display: none; }\n:where(.gh-pricing-actions) .ghcn-button--outline { background: var(--background); }\n.gh-pricing-alternate { justify-self: center; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }\n@media (min-width: 640px) {\n :where(.gh-pricing-grid:has(.gh-pricing-price--alternate)) .gh-pricing-card__rates { min-block-size: calc(1.18 * var(--ghcn-title-section, clamp(24px, 3vw, 32px)) + 25px); align-content: start; }\n :where(.gh-pricing-grid:has(.gh-pricing-alternate)) .gh-pricing-actions { min-block-size: calc(2 * var(--ghcn-control-height, 40px) + 8px); }\n}\n"
|
|
32
|
+
"content": "/* ghostcn: live membership pricing */\n.gh-pricing { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 960px); margin-inline: auto; }\n.gh-pricing *, .gh-pricing *::before, .gh-pricing *::after { box-sizing: border-box; }\n.gh-pricing-title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 16px; text-align: center; }\n.gh-pricing-billing { display: flex; align-items: center; justify-content: center; gap: 4px; width: fit-content; margin: 0 auto var(--ghcn-section-gap, 20px); padding: 4px; border: 1px solid var(--border); border-radius: 9999px; background: var(--secondary); }\n.gh-pricing-billing[hidden] { display: none; }\n.gh-pricing-billing__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid transparent; border-radius: 9999px; background: transparent; color: var(--muted-foreground); font: inherit; font-size: var(--ghcn-text-small, 14px); font-weight: 600; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }\n.gh-pricing-billing__btn:hover { color: var(--foreground); }\n.gh-pricing-billing__btn[aria-pressed=\"true\"] { background: var(--background); color: var(--foreground); border-color: var(--border); box-shadow: 0 1px 2px #0001; }\n.gh-pricing-billing__badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 700; }\n.gh-pricing-billing__badge[hidden] { display: none; }\n.gh-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.gh-pricing-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); display: flex; flex-direction: column; gap: 16px; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.gh-pricing-card--paid { border-color: color-mix(in srgb, var(--foreground) 24%, var(--border)); }\n.gh-pricing-card:only-child { width: min(100%, 440px); justify-self: center; }\n.gh-pricing-card__header { display: grid; gap: 4px; }\n.gh-pricing-card__rates { display: grid; gap: 4px; }\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 { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.gh-pricing-description { margin: 0; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-block-start: 1px solid var(--border); list-style: none; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits li { display: flex; align-items: baseline; gap: 10px; color: inherit; }\n.gh-pricing-benefits li::before { content: \"\"; flex: 0 0 5px; height: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }\n.gh-pricing-price { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; color: inherit; font-variant-numeric: tabular-nums; }\n.gh-pricing-price span { font-size: var(--ghcn-text-small, 14px); font-weight: 400; letter-spacing: normal; color: inherit; }\n.gh-pricing-price--alternate { font-size: var(--ghcn-text-small, 14px); font-weight: 600; line-height: 1.5; letter-spacing: normal; }\n.gh-pricing-actions { display: grid; align-content: start; gap: 4px; margin-block-start: auto; padding-block-start: 4px; }\n.gh-pricing-actions:empty, .gh-pricing-card__rates:empty { display: none; }\n:where(.gh-pricing-actions) .ghcn-button--outline { background: var(--background); }\n.gh-pricing-alternate { justify-self: center; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }\n/* Progressive billing toggle: when JS activates, promote the selected interval to primary */\n.gh-pricing:where([data-billing=\"monthly\"]) [data-pricing-interval=\"yearly\"],\n.gh-pricing:where([data-billing=\"yearly\"]) [data-pricing-interval=\"monthly\"] { display: none; }\n.gh-pricing:where([data-billing=\"yearly\"]) .gh-pricing-price--alternate { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; }\n.gh-pricing:where([data-billing=\"yearly\"]) .gh-pricing-alternate { justify-self: stretch; background: var(--primary); color: var(--primary-foreground); text-decoration: none; }\n.gh-pricing:focus-visible, :where(.gh-pricing) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (min-width: 640px) {\n :where(.gh-pricing:not([data-billing]) .gh-pricing-grid:has(.gh-pricing-price--alternate)) .gh-pricing-card__rates { min-block-size: calc(1.18 * var(--ghcn-title-section, clamp(24px, 3vw, 32px)) + 25px); align-content: start; }\n :where(.gh-pricing:not([data-billing]) .gh-pricing-grid:has(.gh-pricing-price--alternate)) .gh-pricing-actions { min-block-size: calc(2 * var(--ghcn-control-height, 40px) + 8px); }\n}\n@media (prefers-reduced-motion: reduce) { .gh-pricing-billing__btn { transition: none; } }\n"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "pricing-table.js",
|
|
36
|
+
"type": "js",
|
|
37
|
+
"target": "assets/js/components/pricing-table.js",
|
|
38
|
+
"content": "/* ghostcn pricing billing toggle: progressive enhancement, zero-JS fallback, repeat-safe. */\n(() => {\n function init() {\n document.querySelectorAll('[data-ghcn-pricing]').forEach(section => {\n if (section.dataset.ghcnPricingReady) return;\n const toggle = section.querySelector('[data-ghcn-billing-toggle]');\n if (!toggle) return;\n const dualCards = [...section.querySelectorAll('.gh-pricing-card--paid[data-monthly-cents][data-yearly-cents]')];\n if (!dualCards.length) return;\n section.dataset.ghcnPricingReady = 'true';\n\n let bestSavings = 0;\n for (const card of dualCards) {\n const monthly = Number(card.dataset.monthlyCents);\n const yearly = Number(card.dataset.yearlyCents);\n if (monthly > 0 && yearly > 0 && yearly < monthly * 12) {\n bestSavings = Math.max(bestSavings, Math.round((1 - yearly / (monthly * 12)) * 100));\n }\n }\n const savingsBadge = toggle.querySelector('[data-billing-savings]');\n if (savingsBadge && bestSavings >= 5) {\n savingsBadge.textContent = 'Save ' + bestSavings + '%';\n savingsBadge.hidden = false;\n }\n\n const buttons = [...toggle.querySelectorAll('[data-billing-choice]')];\n const setIntervalMode = (mode) => {\n section.dataset.billing = mode;\n buttons.forEach(btn => btn.setAttribute('aria-pressed', String(btn.dataset.billingChoice === mode)));\n };\n buttons.forEach(btn => btn.addEventListener('click', () => setIntervalMode(btn.dataset.billingChoice)));\n toggle.hidden = false;\n setIntervalMode(section.dataset.defaultBilling === 'yearly' ? 'yearly' : 'monthly');\n });\n }\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
|
|
19
39
|
}
|
|
20
40
|
],
|
|
21
41
|
"gscan": {
|
|
22
42
|
"rules_satisfied": [
|
|
23
43
|
"GS010-PJ-VALID"
|
|
24
44
|
],
|
|
25
|
-
"notes": "Reads public Ghost tiers;
|
|
45
|
+
"notes": "Reads public Ghost tiers; progressive monthly/yearly toggle with zero-JS fallback."
|
|
26
46
|
},
|
|
27
47
|
"styleSlots": {
|
|
28
48
|
"class": [
|