ghostcn 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/commands/create.js +10 -3
  2. package/dist/commands/diff.js +47 -5
  3. package/dist/commands/init.js +17 -8
  4. package/dist/commands/list.js +22 -4
  5. package/dist/registry/components/accordion.json +66 -0
  6. package/dist/registry/components/announcement-bar.json +79 -0
  7. package/dist/registry/components/archive-header.json +1 -1
  8. package/dist/registry/components/author-card.json +2 -2
  9. package/dist/registry/components/author-list.json +1 -1
  10. package/dist/registry/components/avatar.json +62 -0
  11. package/dist/registry/components/breadcrumbs.json +59 -0
  12. package/dist/registry/components/button.json +1 -1
  13. package/dist/registry/components/featured-posts.json +2 -2
  14. package/dist/registry/components/input.json +8 -2
  15. package/dist/registry/components/member-cta.json +1 -1
  16. package/dist/registry/components/newsletter-form.json +12 -3
  17. package/dist/registry/components/pagination.json +2 -2
  18. package/dist/registry/components/post-card.json +2 -2
  19. package/dist/registry/components/post-grid.json +1 -1
  20. package/dist/registry/components/post-header.json +2 -2
  21. package/dist/registry/components/pricing-table.json +24 -4
  22. package/dist/registry/components/reading-progress.json +73 -0
  23. package/dist/registry/components/related-posts.json +6 -0
  24. package/dist/registry/components/share-buttons.json +76 -0
  25. package/dist/registry/components/site-footer.json +2 -2
  26. package/dist/registry/components/site-header.json +1 -1
  27. package/dist/registry/components/table-of-contents.json +12 -2
  28. package/dist/registry/components/tag-grid.json +1 -1
  29. package/dist/registry/components/tag-list.json +1 -1
  30. package/dist/registry/components/theme-toggle.json +65 -0
  31. package/dist/registry/components/visibility-badge.json +71 -0
  32. package/dist/registry/index.json +89 -4
  33. package/dist/templates/playground/index.html +2 -2
  34. package/dist/templates/playground/playground.css +8 -1
  35. package/dist/templates/playground/playground.js +39 -5
  36. package/dist/templates/playground/preview.css +1 -0
  37. package/dist/templates/theme-tools.mjs +62 -24
  38. package/dist/utils/component-diff.d.ts +1 -1
  39. package/dist/utils/component-diff.js +46 -17
  40. package/dist/utils/component-files.js +3 -2
  41. package/dist/utils/component-history.js +1 -1
  42. package/dist/utils/playground-server.js +34 -12
  43. package/dist/utils/preview-renderer.d.ts +5 -0
  44. package/dist/utils/preview-renderer.js +20 -6
  45. package/dist/utils/registry.js +15 -5
  46. package/dist/utils/theme-files.js +14 -7
  47. package/dist/utils/theme-project.js +6 -4
  48. package/dist/utils/theme-scaffold.js +22 -7
  49. package/dist/utils/theme.js +39 -32
  50. package/package.json +1 -1
@@ -25,6 +25,12 @@ async function create(themeNameArgument, options = {}) {
25
25
  let optionalComponents = ['newsletter-form', 'author-card'];
26
26
  let installDependencies = !options.skipInstall;
27
27
  if (!options.yes) {
28
+ if (!process.stdin.isTTY) {
29
+ console.error(chalk_1.default.red('Interactive theme creation requires a TTY. Pass --yes (and a theme name) to use defaults.'));
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ let cancelled = false;
28
34
  const response = await (0, prompts_1.default)([
29
35
  ...(!themeName ? [{ type: 'text', name: 'themeName', message: 'What should the theme be called?', initial: 'my-ghost-theme' }] : []),
30
36
  { type: 'select', name: 'style', message: 'Which styling system?', choices: [{ title: 'Tailwind CSS', value: 'tailwind' }, { title: 'Vanilla CSS', value: 'css' }], initial: 0 },
@@ -39,10 +45,12 @@ async function create(themeNameArgument, options = {}) {
39
45
  ...(!options.skipInstall ? [{ type: 'confirm', name: 'installDependencies', message: 'Install dependencies now?', initial: true }] : [])
40
46
  ], {
41
47
  onCancel: () => {
48
+ cancelled = true;
42
49
  console.log(chalk_1.default.yellow('\nTheme creation cancelled.'));
43
- process.exit(0);
44
50
  }
45
51
  });
52
+ if (cancelled)
53
+ return;
46
54
  themeName = response.themeName || themeName;
47
55
  style = response.style || style;
48
56
  baseColor = response.baseColor || baseColor;
@@ -83,8 +91,7 @@ async function create(themeNameArgument, options = {}) {
83
91
  }
84
92
  spinner.succeed(chalk_1.default.green(`Created ${themeName} with ${components.length} components.`));
85
93
  if (installDependencies) {
86
- const installSpinner = (0, ora_1.default)(`Installing dependencies with ${packageManager}...`).start();
87
- installSpinner.stop();
94
+ console.log(chalk_1.default.dim(`Installing dependencies with ${packageManager}...`));
88
95
  const installed = (0, child_process_1.spawnSync)(packageManager, ['install'], {
89
96
  cwd: scaffold.themeRoot,
90
97
  stdio: 'inherit',
@@ -6,14 +6,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.diff = diff;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
+ const chalk_1 = __importDefault(require("chalk"));
9
10
  const component_diff_1 = require("../utils/component-diff");
10
11
  const registry_1 = require("../utils/registry");
11
12
  const component_history_1 = require("../utils/component-history");
12
13
  const component_files_1 = require("../utils/component-files");
14
+ function formatDiffText(diffText) {
15
+ if (!process.stdout.isTTY)
16
+ return diffText;
17
+ return diffText
18
+ .split('\n')
19
+ .map(line => {
20
+ if (line.startsWith('+++') || line.startsWith('---'))
21
+ return chalk_1.default.bold(line);
22
+ if (line.startsWith('@@'))
23
+ return chalk_1.default.cyan(line);
24
+ if (line.startsWith('+'))
25
+ return chalk_1.default.green(line);
26
+ if (line.startsWith('-'))
27
+ return chalk_1.default.red(line);
28
+ return line;
29
+ })
30
+ .join('\n');
31
+ }
13
32
  async function diff(component, options = {}) {
14
33
  try {
15
34
  const root = process.cwd();
16
- const config = JSON.parse(fs_1.default.readFileSync(path_1.default.join(root, 'components.json'), 'utf8').replace(/^\uFEFF/, ''));
35
+ const configPath = path_1.default.join(root, 'components.json');
36
+ if (!fs_1.default.existsSync(configPath)) {
37
+ throw new Error('components.json was not found. Run "npx ghostcn init" from your Ghost theme root first.');
38
+ }
39
+ const config = JSON.parse(fs_1.default.readFileSync(configPath, 'utf8').replace(/^\uFEFF/, ''));
17
40
  let names;
18
41
  if (component)
19
42
  names = [(0, registry_1.sanitizeComponentName)(component)];
@@ -28,8 +51,24 @@ async function diff(component, options = {}) {
28
51
  names = [...new Set([...tracked, ...installed])];
29
52
  }
30
53
  const results = [];
31
- for (const name of names)
32
- results.push((0, component_diff_1.compareComponent)(root, config, await (0, component_diff_1.comparisonManifest)(name, !!options.latest)));
54
+ for (const name of names) {
55
+ try {
56
+ results.push((0, component_diff_1.compareComponent)(root, config, await (0, component_diff_1.comparisonManifest)(name, !!options.latest)));
57
+ }
58
+ catch (err) {
59
+ if (!component && /was not found|HTTP 404/i.test(String(err?.message || ''))) {
60
+ const saved = (0, component_history_1.readHistory)(root).components[name];
61
+ results.push({
62
+ name,
63
+ installedRevision: saved?.revision,
64
+ incomingRevision: 'removed',
65
+ files: Object.keys(saved?.files || {}).sort().map((relative) => ({ path: relative, status: 'removed-upstream' }))
66
+ });
67
+ continue;
68
+ }
69
+ throw err;
70
+ }
71
+ }
33
72
  if (options.json)
34
73
  console.log(JSON.stringify({ source: options.latest ? 'latest-registry' : 'installed-cli-registry', components: results }, null, 2));
35
74
  else {
@@ -40,8 +79,11 @@ async function diff(component, options = {}) {
40
79
  console.log(`\n${result.name}: ${result.installedRevision?.slice(0, 12) || 'unknown baseline'} -> ${result.incomingRevision.slice(0, 12)}`);
41
80
  for (const file of result.files) {
42
81
  console.log(` ${file.status}: ${file.path}`);
43
- if (!options.summary && file.local !== file.incoming)
44
- console.log((0, component_diff_1.unifiedDiff)(file.local, file.incoming, file.path));
82
+ if (!options.summary && file.local?.replace(/\r\n/g, '\n') !== file.incoming?.replace(/\r\n/g, '\n')) {
83
+ const output = (0, component_diff_1.unifiedDiff)(file.local, file.incoming, file.path);
84
+ if (output)
85
+ console.log(formatDiffText(output));
86
+ }
45
87
  }
46
88
  }
47
89
  console.log('\nKeep your local files; manually merge the changes you want. Do not use add -y to review updates.');
@@ -10,6 +10,7 @@ const prompts_1 = __importDefault(require("prompts"));
10
10
  const chalk_1 = __importDefault(require("chalk"));
11
11
  const ora_1 = __importDefault(require("ora"));
12
12
  const theme_project_1 = require("../utils/theme-project");
13
+ const theme_files_1 = require("../utils/theme-files");
13
14
  async function init(options = {}) {
14
15
  console.log(chalk_1.default.bold.blue('\n✨ Initializing ghostcn theming system...\n'));
15
16
  const cwd = process.cwd();
@@ -17,7 +18,8 @@ async function init(options = {}) {
17
18
  const packageJsonPath = path_1.default.join(cwd, 'package.json');
18
19
  if (!fs_1.default.existsSync(packageJsonPath)) {
19
20
  console.error(chalk_1.default.red('No package.json found. Please run this command from the root of a Ghost theme.'));
20
- process.exit(1);
21
+ process.exitCode = 1;
22
+ return;
21
23
  }
22
24
  try {
23
25
  const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, 'utf8').replace(/^\uFEFF/, ''));
@@ -27,7 +29,8 @@ async function init(options = {}) {
27
29
  }
28
30
  catch {
29
31
  console.error(chalk_1.default.red('Error reading package.json. Ensure it is valid JSON.'));
30
- process.exit(1);
32
+ process.exitCode = 1;
33
+ return;
31
34
  }
32
35
  let style = 'tailwind';
33
36
  let baseColor = 'zinc';
@@ -102,26 +105,31 @@ async function init(options = {}) {
102
105
  type: 'text',
103
106
  name: 'cssFile',
104
107
  message: 'Where should the theme CSS tokens file be written?',
105
- initial: 'assets/css/ghostcn.css'
108
+ initial: 'assets/css/ghostcn.css',
109
+ validate: (value) => /^assets\/.+\.css$/i.test(value.trim().replace(/\\/g, '/')) ? true : 'Path must be inside assets/ and end with .css'
106
110
  },
107
111
  {
108
112
  type: 'text',
109
113
  name: 'partialsAlias',
110
114
  message: 'Where should Handlebars partials be installed?',
111
- initial: 'partials/components'
115
+ initial: 'partials/components',
116
+ validate: (value) => /^partials(\/|$)/.test(value.trim().replace(/\\/g, '/')) ? true : 'Partials must live under partials/'
112
117
  },
113
118
  {
114
119
  type: 'text',
115
120
  name: 'stylesAlias',
116
121
  message: 'Where should component CSS stylesheets be installed?',
117
- initial: 'assets/css/components'
122
+ initial: 'assets/css/components',
123
+ validate: (value) => /^assets(\/|$)/.test(value.trim().replace(/\\/g, '/')) ? true : 'Stylesheets must live under assets/'
118
124
  }
119
125
  ], {
120
126
  onCancel: () => {
121
127
  console.log(chalk_1.default.red('\nInitialization cancelled.'));
122
- process.exit(1);
128
+ process.exitCode = 1;
123
129
  }
124
130
  });
131
+ if (process.exitCode === 1)
132
+ return;
125
133
  style = response.style || style;
126
134
  baseColor = response.baseColor || baseColor;
127
135
  accentColor = response.accentColor || accentColor;
@@ -148,7 +156,8 @@ async function init(options = {}) {
148
156
  }
149
157
  catch (error) {
150
158
  spinner.fail(chalk_1.default.red(error.message));
151
- process.exit(1);
159
+ process.exitCode = 1;
160
+ return;
152
161
  }
153
162
  spinner.succeed(chalk_1.default.green('Configuration & design tokens successfully initialized!'));
154
163
  console.log('\n' + chalk_1.default.bold('Summary:'));
@@ -165,7 +174,7 @@ async function init(options = {}) {
165
174
  console.log('\n' + chalk_1.default.bold.green('Next Steps:'));
166
175
  if (styleSync.status === 'missing-template') {
167
176
  console.log(` 1. Add this stylesheet to your layout's <head>:`);
168
- console.log(` ${chalk_1.default.dim('<link rel="stylesheet" href="{{asset "' + cssFile.replace('assets/', '') + '"}}">')}`);
177
+ console.log(` ${chalk_1.default.dim('<link rel="stylesheet" href="{{asset "' + (0, theme_files_1.toGhostAssetPath)(cssFile) + '"}}">')}`);
169
178
  console.log(` 2. Add components to your theme:`);
170
179
  }
171
180
  else {
@@ -13,14 +13,31 @@ async function list() {
13
13
  const items = await (0, registry_1.getRegistryIndex)();
14
14
  if (!items || items.length === 0) {
15
15
  spinner.warn('No components found in the registry.');
16
+ process.exitCode = 1;
16
17
  return;
17
18
  }
18
19
  spinner.succeed(`Found ${items.length} components in ghostcn registry:\n`);
20
+ const labels = {
21
+ 'components:ui': 'Primitives & UI',
22
+ 'components:content': 'Publishing & Content',
23
+ 'components:members': 'Membership',
24
+ 'components:layout': 'Layout',
25
+ 'components:navigation': 'Navigation'
26
+ };
27
+ const grouped = new Map();
19
28
  for (const item of items) {
20
- console.log(` ${chalk_1.default.bold.cyan(item.name)}`);
21
- console.log(` ${chalk_1.default.gray(item.description)}`);
22
- if (item.files && item.files.length > 0) {
23
- console.log(` ${chalk_1.default.dim('Files:')} ${chalk_1.default.dim(item.files.join(', '))}`);
29
+ const group = labels[item.category] || item.category || 'Components';
30
+ const bucket = grouped.get(group) || [];
31
+ bucket.push(item);
32
+ grouped.set(group, bucket);
33
+ }
34
+ for (const [group, groupItems] of grouped.entries()) {
35
+ console.log(chalk_1.default.bold.white(` ${group}`));
36
+ for (const item of groupItems) {
37
+ console.log(` ${chalk_1.default.bold.cyan(item.name)} — ${chalk_1.default.gray(item.description)}`);
38
+ if (item.files && item.files.length > 0) {
39
+ console.log(` ${chalk_1.default.dim('Files:')} ${chalk_1.default.dim(item.files.join(', '))}`);
40
+ }
24
41
  }
25
42
  console.log('');
26
43
  }
@@ -29,5 +46,6 @@ async function list() {
29
46
  }
30
47
  catch (err) {
31
48
  spinner.fail(`Failed to fetch component catalog: ${err.message || err}`);
49
+ process.exitCode = 1;
32
50
  }
33
51
  }
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "accordion",
3
+ "type": "components:ui",
4
+ "description": "Zero-JS collapsible disclosure built on native details and summary elements.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment; unknown values fall back to default.",
10
+ "options": [
11
+ "default",
12
+ "secondary",
13
+ "outline",
14
+ "ghost"
15
+ ],
16
+ "default": "default"
17
+ },
18
+ "size": {
19
+ "description": "Component scale; unknown values fall back to default.",
20
+ "options": [
21
+ "sm",
22
+ "default",
23
+ "lg"
24
+ ],
25
+ "default": "default"
26
+ },
27
+ "heading": {
28
+ "description": "Visible summary heading.",
29
+ "default": "More details"
30
+ },
31
+ "body": {
32
+ "description": "Escaped text body when called as an ordinary partial."
33
+ },
34
+ "open": {
35
+ "description": "Boolean. Expand the disclosure by default."
36
+ },
37
+ "name": {
38
+ "description": "Optional shared group name for native exclusive accordions."
39
+ }
40
+ },
41
+ "files": [
42
+ {
43
+ "name": "accordion.hbs",
44
+ "type": "partial",
45
+ "target": "partials/components/accordion.hbs",
46
+ "content": "{{!-- Styling parameters: class, triggerClass, contentClass --}}\n{{#with this as |ghostcnStyles|}}\n<details class=\"ghcn-ui-accordion{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"secondary\"}}secondary{{else}}{{#match variant \"outline\"}}outline{{else}}{{#match variant \"ghost\"}}ghost{{else}}default{{/match}}{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\"{{#if open}} open{{/if}}{{#if name}} name=\"{{name}}\"{{/if}}>\n <summary class=\"ghcn-ui-accordion__trigger{{#if ghostcnStyles.triggerClass}} {{ghostcnStyles.triggerClass}}{{/if}}\">\n <span class=\"ghcn-ui-accordion__title\">{{#if heading}}{{heading}}{{else}}More details{{/if}}</span>\n <svg class=\"ghcn-ui-accordion__icon\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m5 7.5 5 5 5-5\"/></svg>\n </summary>\n <div class=\"ghcn-ui-accordion__content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">{{#> @partial-block}}{{#if body}}<p>{{body}}</p>{{/if}}{{/@partial-block}}</div>\n</details>\n{{/with}}"
47
+ },
48
+ {
49
+ "name": "accordion.css",
50
+ "type": "style",
51
+ "target": "assets/css/components/accordion.css",
52
+ "content": ".ghcn-ui-accordion { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-accordion, .ghcn-ui-accordion * { box-sizing: border-box; }\n.ghcn-ui-accordion:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-accordion:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-accordion:focus-visible, :where(.ghcn-ui-accordion) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-accordion { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); overflow: hidden; }\n.ghcn-ui-accordion:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-accordion:where([data-variant=\"outline\"]) { background: transparent; }\n.ghcn-ui-accordion:where([data-variant=\"ghost\"]) { background: transparent; border-width: 0 0 1px; border-radius: 0; }\n.ghcn-ui-accordion__trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 18px; list-style: none; cursor: pointer; font-weight: 600; color: inherit; }\n.ghcn-ui-accordion__trigger::-webkit-details-marker { display: none; }\n.ghcn-ui-accordion:where([data-size=\"sm\"]) .ghcn-ui-accordion__trigger { padding: 10px 14px; font-size: 14px; }\n.ghcn-ui-accordion:where([data-size=\"lg\"]) .ghcn-ui-accordion__trigger { padding: 18px 22px; font-size: 18px; }\n.ghcn-ui-accordion:where([data-variant=\"ghost\"]) .ghcn-ui-accordion__trigger { padding-inline: 0; }\n.ghcn-ui-accordion__icon { flex: 0 0 auto; color: var(--muted-foreground); transition: transform 180ms ease; }\n.ghcn-ui-accordion[open] > .ghcn-ui-accordion__trigger .ghcn-ui-accordion__icon { transform: rotate(180deg); }\n.ghcn-ui-accordion__content { padding: 0 18px 16px; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); }\n.ghcn-ui-accordion:where([data-size=\"sm\"]) .ghcn-ui-accordion__content { padding: 0 14px 12px; }\n.ghcn-ui-accordion:where([data-size=\"lg\"]) .ghcn-ui-accordion__content { padding: 0 22px 20px; font-size: var(--ghcn-text-body, 16px); }\n.ghcn-ui-accordion:where([data-variant=\"ghost\"]) .ghcn-ui-accordion__content { padding-inline: 0; }\n.ghcn-ui-accordion__content > :first-child { margin-top: 0; }\n.ghcn-ui-accordion__content > :last-child { margin-bottom: 0; }\n@media (prefers-reduced-motion: reduce) { .ghcn-ui-accordion__icon { transition: none; } }\n"
53
+ }
54
+ ],
55
+ "styleSlots": {
56
+ "class": [
57
+ ".ghcn-ui-accordion"
58
+ ],
59
+ "triggerClass": [
60
+ ".ghcn-ui-accordion__trigger"
61
+ ],
62
+ "contentClass": [
63
+ ".ghcn-ui-accordion__content"
64
+ ]
65
+ }
66
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "announcement-bar",
3
+ "type": "components:layout",
4
+ "description": "Dismissible top publication announcement bar with optional link and session persistence.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment.",
10
+ "options": [
11
+ "default",
12
+ "secondary",
13
+ "outline"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "text": {
18
+ "description": "Escaped announcement copy.",
19
+ "default": "New issue out now — explore the latest stories."
20
+ },
21
+ "linkText": {
22
+ "description": "Optional call-to-action link label.",
23
+ "default": "Learn more"
24
+ },
25
+ "href": {
26
+ "description": "Optional trusted call-to-action URL."
27
+ },
28
+ "dataPortal": {
29
+ "description": "Optional native Ghost Portal trigger for the link."
30
+ },
31
+ "storageKey": {
32
+ "description": "Session key so dismissing one banner does not hide future announcements.",
33
+ "default": "default"
34
+ },
35
+ "hideDismiss": {
36
+ "description": "Boolean. Hide the dismiss button."
37
+ }
38
+ },
39
+ "files": [
40
+ {
41
+ "name": "announcement-bar.hbs",
42
+ "type": "partial",
43
+ "target": "partials/components/announcement-bar.hbs",
44
+ "content": "{{!-- Styling parameters: class, contentClass, linkClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-announcement{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-announcement data-variant=\"{{#match variant \"secondary\"}}secondary{{else}}{{#match variant \"outline\"}}outline{{else}}default{{/match}}{{/match}}\" data-storage-key=\"{{#if storageKey}}{{storageKey}}{{else}}default{{/if}}\" role=\"region\" aria-label=\"Announcement\">\n <div class=\"ghcn-announcement__inner ghcn-container\">\n <p class=\"ghcn-announcement__content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">\n <span>{{#if text}}{{text}}{{else}}New issue out now — explore the latest stories.{{/if}}</span>\n {{#if href}}<a class=\"ghcn-announcement__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{href}}\"{{#if dataPortal}} data-portal=\"{{dataPortal}}\"{{/if}}>{{#if linkText}}{{linkText}}{{else}}Learn more{{/if}} <span aria-hidden=\"true\">&rarr;</span></a>{{/if}}\n </p>\n {{#unless hideDismiss}}\n <button type=\"button\" class=\"ghcn-announcement__dismiss{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-announcement-dismiss aria-label=\"Dismiss announcement\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\"><path d=\"M4 4l8 8M12 4l-8 8\"/></svg>\n </button>\n {{/unless}}\n </div>\n</div>\n{{/with}}"
45
+ },
46
+ {
47
+ "name": "announcement-bar.css",
48
+ "type": "style",
49
+ "target": "assets/css/components/announcement-bar.css",
50
+ "content": ".ghcn-announcement { box-sizing: border-box; width: 100%; background: var(--primary); color: var(--primary-foreground); border-bottom: 1px solid transparent; font-family: inherit; font-size: var(--ghcn-text-small, 14px); line-height: 1.4; }\n.ghcn-announcement[hidden] { display: none; }\n.ghcn-announcement *, .ghcn-announcement *::before, .ghcn-announcement *::after { box-sizing: border-box; }\n.ghcn-announcement:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); border-bottom-color: var(--border); }\n.ghcn-announcement:where([data-variant=\"outline\"]) { background: var(--card); color: var(--card-foreground); border-bottom-color: var(--border); }\n.ghcn-announcement__inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding-block: 10px; position: relative; }\n.ghcn-announcement__content { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; text-align: center; }\n.ghcn-announcement__link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }\n.ghcn-announcement__link:hover { opacity: 0.85; }\n.ghcn-announcement__dismiss { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: transparent; color: inherit; cursor: pointer; opacity: 0.8; transition: opacity 150ms ease, background-color 150ms ease; }\n.ghcn-announcement__dismiss:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }\n.ghcn-announcement:focus-visible, :where(.ghcn-announcement) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-announcement__dismiss { transition: none; } }\n"
51
+ },
52
+ {
53
+ "name": "announcement-bar.js",
54
+ "type": "js",
55
+ "target": "assets/js/components/announcement-bar.js",
56
+ "content": "/* ghostcn announcement bar: dismisses with sessionStorage persistence, repeat-safe. */\n(() => {\n function init() {\n document.querySelectorAll('[data-ghcn-announcement]').forEach(bar => {\n if (bar.dataset.ghcnAnnouncementReady) return;\n bar.dataset.ghcnAnnouncementReady = 'true';\n const key = 'ghcn-announcement:' + (bar.dataset.storageKey || 'default');\n try {\n if (sessionStorage.getItem(key) === 'dismissed') { bar.hidden = true; return; }\n } catch {}\n const btn = bar.querySelector('[data-announcement-dismiss]');\n if (!btn) return;\n btn.addEventListener('click', () => {\n bar.hidden = true;\n try { sessionStorage.setItem(key, 'dismissed'); } catch {}\n });\n });\n }\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
57
+ }
58
+ ],
59
+ "gscan": {
60
+ "rules_satisfied": [
61
+ "GS010-PJ-VALID"
62
+ ],
63
+ "notes": "Uses native HTML and sessionStorage dismissal; no Ghost API calls."
64
+ },
65
+ "styleSlots": {
66
+ "class": [
67
+ ".ghcn-announcement"
68
+ ],
69
+ "contentClass": [
70
+ ".ghcn-announcement__content"
71
+ ],
72
+ "linkClass": [
73
+ ".ghcn-announcement__link"
74
+ ],
75
+ "buttonClass": [
76
+ ".ghcn-announcement__dismiss"
77
+ ]
78
+ }
79
+ }
@@ -28,7 +28,7 @@
28
28
  "name": "archive-header.hbs",
29
29
  "type": "partial",
30
30
  "target": "partials/components/archive-header.hbs",
31
- "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, imageClass --}}\n{{#with this as |ghostcnStyles|}}\n<header class=\"ghcn-archive-header{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n {{#if eyebrow}}{{> \"components/badge\" text=eyebrow variant=\"secondary\" class=ghostcnStyles.badgeClass}}{{/if}}\n <h1 class=\"ghcn-archive-header__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}{{#if name}}{{name}}{{else}}{{@site.title}}{{/if}}{{/if}}</h1>\n {{#if description}}<p class=\"ghcn-archive-header__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{else}}{{#if bio}}<p class=\"ghcn-archive-header__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{bio}}</p>{{/if}}{{/if}}\n {{#if archiveImage}}<img class=\"ghcn-archive-header__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url archiveImage size=\"l\"}}\" alt=\"{{imageAlt}}\" />{{/if}}\n</header>\n{{/with}}"
31
+ "content": "{{!-- Styling parameters: class, titleClass, descriptionClass, imageClass, badgeClass --}}\n{{#with this as |ghostcnStyles|}}\n<header class=\"ghcn-archive-header{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n {{#if eyebrow}}{{> \"components/badge\" text=eyebrow variant=\"secondary\" class=ghostcnStyles.badgeClass}}{{/if}}\n <h1 class=\"ghcn-archive-header__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}{{#if name}}{{name}}{{else}}{{@site.title}}{{/if}}{{/if}}</h1>\n {{#if description}}<p class=\"ghcn-archive-header__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{else}}{{#if bio}}<p class=\"ghcn-archive-header__description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{bio}}</p>{{/if}}{{/if}}\n {{#if archiveImage}}<img class=\"ghcn-archive-header__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url archiveImage size=\"l\"}}\" alt=\"{{imageAlt}}\" />{{/if}}\n</header>\n{{/with}}"
32
32
  },
33
33
  {
34
34
  "name": "archive-header.css",
@@ -9,13 +9,13 @@
9
9
  "name": "author-card.hbs",
10
10
  "type": "partial",
11
11
  "target": "partials/components/author-card.hbs",
12
- "content": "{{!-- Styling parameters: class, avatarClass, contentClass, titleClass, descriptionClass, metaClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!--\n Component: Author Card\n Usage: In post context {{> \"components/author-card\"}} or {{#primary_author}}{{> \"components/author-card\"}}{{/primary_author}}\n--}}\n<section class=\"gh-author-card{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n {{#if profile_image}}\n <img src=\"{{img_url profile_image size=\"m\"}}\" alt=\"{{name}}\" class=\"gh-author-avatar{{#if ghostcnStyles.avatarClass}} {{ghostcnStyles.avatarClass}}{{/if}}\" />\n {{else}}\n <div class=\"gh-author-avatar-fallback{{#if ghostcnStyles.avatarClass}} {{ghostcnStyles.avatarClass}}{{/if}}\">\n {{name.[0]}}\n </div>\n {{/if}}\n\n <div class=\"gh-author-details{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">\n <div class=\"gh-author-heading\">\n <h4 class=\"gh-author-name{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">\n <a href=\"{{url}}\" >{{name}}</a>\n </h4>\n {{#if count.posts}}\n <span class=\"gh-author-post-count\">\n {{plural count.posts empty=\"0 posts\" singular=\"% post\" plural=\"% posts\"}}\n </span>\n {{/if}}\n </div>\n\n {{#if bio}}\n <p class=\"gh-author-bio{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{bio}}</p>\n {{/if}}\n\n <div class=\"gh-author-meta{{#if ghostcnStyles.metaClass}} {{ghostcnStyles.metaClass}}{{/if}}\">\n {{#if location}}\n <span class=\"gh-author-location\">📍 {{location}}</span>\n {{/if}}\n {{#if website}}\n <a href=\"{{website}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Website</a>\n {{/if}}\n {{#if twitter}}\n <a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Twitter/X</a>\n {{/if}}\n {{#if facebook}}\n <a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Facebook</a>\n {{/if}}\n </div>\n </div>\n</section>\n{{/with}}"
12
+ "content": "{{!-- Styling parameters: class, avatarClass, contentClass, titleClass, descriptionClass, metaClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!--\n Component: Author Card\n Usage: In post context {{> \"components/author-card\"}} or {{#primary_author}}{{> \"components/author-card\"}}{{/primary_author}}\n--}}\n<section class=\"gh-author-card{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n {{#if profile_image}}\n <img src=\"{{img_url profile_image size=\"m\"}}\" alt=\"{{name}}\" class=\"gh-author-avatar{{#if ghostcnStyles.avatarClass}} {{ghostcnStyles.avatarClass}}{{/if}}\" />\n {{else}}\n <div class=\"gh-author-avatar-fallback{{#if ghostcnStyles.avatarClass}} {{ghostcnStyles.avatarClass}}{{/if}}\" aria-hidden=\"true\">\n {{name.[0]}}\n </div>\n {{/if}}\n\n <div class=\"gh-author-details{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">\n <div class=\"gh-author-heading\">\n <h4 class=\"gh-author-name{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">\n <a href=\"{{url}}\" >{{name}}</a>\n </h4>\n {{#if count.posts}}\n <span class=\"gh-author-post-count\">\n {{plural count.posts empty=\"0 posts\" singular=\"% post\" plural=\"% posts\"}}\n </span>\n {{/if}}\n </div>\n\n {{#if bio}}\n <p class=\"gh-author-bio{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{bio}}</p>\n {{/if}}\n\n <div class=\"gh-author-meta{{#if ghostcnStyles.metaClass}} {{ghostcnStyles.metaClass}}{{/if}}\">\n {{#if location}}\n <span class=\"gh-author-location\"><svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 14s5-4.4 5-8a5 5 0 1 0-10 0c0 3.6 5 8 5 8Z\"/><circle cx=\"8\" cy=\"6\" r=\"1.75\"/></svg>{{location}}</span>\n {{/if}}\n {{#if website}}\n <a href=\"{{website}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Website</a>\n {{/if}}\n {{#if twitter}}\n <a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Twitter/X</a>\n {{/if}}\n {{#if facebook}}\n <a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link\">Facebook</a>\n {{/if}}\n </div>\n </div>\n</section>\n{{/with}}"
13
13
  },
14
14
  {
15
15
  "name": "author-card.css",
16
16
  "type": "style",
17
17
  "target": "assets/css/components/author-card.css",
18
- "content": "/* ghostcn: Author Card Styles */\n.gh-author-card {\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 font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n isolation: isolate;\n padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px));\n margin: var(--ghcn-section-space, clamp(24px, 4vw, 48px)) auto;\n width: min(100% - 32px, 704px);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--ghcn-grid-gap, 16px);\n}\n\n.gh-author-card *,\n.gh-author-card *::before,\n.gh-author-card *::after {\n box-sizing: border-box;\n}\n\n@media (min-width: 640px) {\n .gh-author-card {\n flex-direction: row;\n align-items: flex-start;\n }\n}\n\n.gh-author-avatar {\n width: 56px;\n height: 56px;\n flex: 0 0 56px;\n border-radius: 9999px;\n object-fit: cover;\n border: 2px solid var(--border, #e4e4e7);\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-author-avatar-fallback {\n width: 56px;\n height: 56px;\n flex: 0 0 56px;\n border-radius: 9999px;\n background-color: var(--muted, #f4f4f5);\n color: var(--foreground, #09090b);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.5em;\n font-weight: 700;\n border: 2px solid var(--border, #e4e4e7);\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-author-details {\n flex: 1;\n min-width: 0;\n text-align: center;\n}\n\n@media (min-width: 640px) {\n .gh-author-details {\n text-align: left;\n }\n}\n\n.gh-author-name {\n font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit;\n margin: 0;\n}\n\n.gh-author-name a {\n color: inherit;\n text-decoration: none;\n transition: color 0.15s ease;\n}\n\n.gh-author-name:hover {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n}\n\n.gh-author-bio {\n color: var(--muted-foreground, #71717a);\n font-size: 0.875em;\n line-height: 1.5;\n margin: 0.5em 0 1em;\n}\n\n.gh-author-meta {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 1em;\n font-size: 0.75em;\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-author-meta a {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n text-decoration: none;\n}\n\n.gh-author-meta a:hover {\n text-decoration: underline;\n}\n\n.gh-author-heading { display: flex; flex-direction: column; justify-content: space-between; gap: 0.5em; margin-bottom: 0.5em; }\n.gh-author-post-count { border-radius: 9999px; padding: 0.25em 0.625em; background: var(--muted); color: var(--muted-foreground); font-size: 0.75em; font-weight: 500; }\n.gh-author-location { display: inline-flex; align-items: center; gap: 0.25em; }\n@media (min-width: 640px) { .gh-author-heading { flex-direction: row; flex-wrap: wrap; align-items: center; } .gh-author-meta { justify-content: flex-start; } }\n.gh-author-card:focus-visible, :where(.gh-author-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
18
+ "content": "/* ghostcn: Author Card Styles */\n.gh-author-card {\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 font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n isolation: isolate;\n padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px));\n margin: var(--ghcn-section-space, clamp(24px, 4vw, 48px)) auto;\n width: min(100% - 32px, 704px);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--ghcn-grid-gap, 16px);\n}\n\n.gh-author-card *,\n.gh-author-card *::before,\n.gh-author-card *::after {\n box-sizing: border-box;\n}\n\n@media (min-width: 640px) {\n .gh-author-card {\n flex-direction: row;\n align-items: flex-start;\n }\n}\n\n.gh-author-avatar {\n width: 56px;\n height: 56px;\n flex: 0 0 56px;\n border-radius: 9999px;\n object-fit: cover;\n border: 2px solid var(--border, #e4e4e7);\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-author-avatar-fallback {\n width: 56px;\n height: 56px;\n flex: 0 0 56px;\n border-radius: 9999px;\n background-color: var(--muted, #f4f4f5);\n color: var(--foreground, #09090b);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 24px;\n font-weight: 700;\n border: 2px solid var(--border, #e4e4e7);\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n}\n\n.gh-author-details {\n flex: 1;\n min-width: 0;\n text-align: center;\n}\n\n@media (min-width: 640px) {\n .gh-author-details {\n text-align: left;\n }\n}\n\n.gh-author-name {\n font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit;\n margin: 0;\n}\n\n.gh-author-name a {\n color: inherit;\n text-decoration: none;\n transition: color 0.15s ease;\n}\n\n.gh-author-name:hover {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n}\n\n.gh-author-bio {\n color: var(--muted-foreground, #71717a);\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0 16px;\n}\n\n.gh-author-meta {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 16px;\n font-size: 12px;\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-author-meta a {\n color: var(--primary, var(--ghost-accent-color, #18181b));\n text-decoration: none;\n}\n\n.gh-author-meta a:hover {\n text-decoration: underline;\n}\n\n.gh-author-heading { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; margin-bottom: 8px; }\n.gh-author-post-count { border-radius: 9999px; padding: 4px 10px; background: var(--muted); color: var(--muted-foreground); font-size: 12px; font-weight: 500; }\n.gh-author-location { display: inline-flex; align-items: center; gap: 4px; }\n@media (min-width: 640px) { .gh-author-heading { flex-direction: row; flex-wrap: wrap; align-items: center; } .gh-author-meta { justify-content: flex-start; } }\n.gh-author-card:focus-visible, :where(.gh-author-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
19
19
  }
20
20
  ],
21
21
  "gscan": {
@@ -19,7 +19,7 @@
19
19
  "name": "author-list.hbs",
20
20
  "type": "partial",
21
21
  "target": "partials/components/author-list.hbs",
22
- "content": "{{!-- Styling parameters: class, titleClass, gridClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#get \"authors\" limit=\"100\" include=\"count.posts\"}}\n{{#if authors}}<section class=\"ghcn-author-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Authors\">\n {{#if ghostcnStyles.heading}}<h2 class=\"ghcn-author-list__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{ghostcnStyles.heading}}</h2>{{/if}}\n <div class=\"ghcn-author-list__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">{{#foreach authors}}\n {{> \"components/author-card\" class=ghostcnStyles.cardClass titleClass=ghostcnStyles.cardTitleClass avatarClass=ghostcnStyles.avatarClass descriptionClass=ghostcnStyles.descriptionClass}}\n {{/foreach}}</div>\n</section>{{else}}{{#if ghostcnStyles.emptyText}}<section class=\"ghcn-author-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"><p class=\"ghcn-author-list__empty\">{{ghostcnStyles.emptyText}}</p></section>{{/if}}{{/if}}\n{{/get}}\n{{/with}}"
22
+ "content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, cardTitleClass, avatarClass, descriptionClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#get \"authors\" limit=\"100\" include=\"count.posts\"}}\n{{#if authors}}<section class=\"ghcn-author-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Authors\">\n {{#if ghostcnStyles.heading}}<h2 class=\"ghcn-author-list__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{ghostcnStyles.heading}}</h2>{{/if}}\n <div class=\"ghcn-author-list__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">{{#foreach authors}}\n {{> \"components/author-card\" class=ghostcnStyles.cardClass titleClass=ghostcnStyles.cardTitleClass avatarClass=ghostcnStyles.avatarClass descriptionClass=ghostcnStyles.descriptionClass}}\n {{/foreach}}</div>\n</section>{{else}}{{#if ghostcnStyles.emptyText}}<section class=\"ghcn-author-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"><p class=\"ghcn-author-list__empty\">{{ghostcnStyles.emptyText}}</p></section>{{/if}}{{/if}}\n{{/get}}\n{{/with}}"
23
23
  },
24
24
  {
25
25
  "name": "author-list.css",
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "avatar",
3
+ "type": "components:ui",
4
+ "description": "A reusable author or user avatar with image and initials fallback.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment; unknown values fall back to default.",
10
+ "options": [
11
+ "default",
12
+ "rounded",
13
+ "outline"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "size": {
18
+ "description": "Component scale; unknown values fall back to default.",
19
+ "options": [
20
+ "sm",
21
+ "default",
22
+ "lg"
23
+ ],
24
+ "default": "default"
25
+ },
26
+ "src": {
27
+ "description": "Image URL; falls back to profile_image inside a Ghost author context."
28
+ },
29
+ "name": {
30
+ "description": "Display name used for alt text and initials fallback."
31
+ },
32
+ "href": {
33
+ "description": "Optional trusted profile URL."
34
+ },
35
+ "decorative": {
36
+ "description": "Boolean. Hide avatar alt/initial from screen readers when placed next to a visible name."
37
+ }
38
+ },
39
+ "files": [
40
+ {
41
+ "name": "avatar.hbs",
42
+ "type": "partial",
43
+ "target": "partials/components/avatar.hbs",
44
+ "content": "{{!-- Styling parameters: class, imageClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if href}}\n<a class=\"ghcn-ui-avatar{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"rounded\"}}rounded{{else}}{{#match variant \"outline\"}}outline{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\" href=\"{{href}}\"{{#if name}} aria-label=\"{{name}}\"{{/if}}>{{#if src}}<img class=\"ghcn-ui-avatar__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url src size=\"xs\"}}\" alt=\"{{#unless decorative}}{{#if name}}{{name}}{{/if}}{{/unless}}\" loading=\"lazy\" />{{else if profile_image}}<img class=\"ghcn-ui-avatar__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url profile_image size=\"xs\"}}\" alt=\"{{#unless decorative}}{{#if name}}{{name}}{{/if}}{{/unless}}\" loading=\"lazy\" />{{else}}<span class=\"ghcn-ui-avatar__fallback{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\"{{#if decorative}} aria-hidden=\"true\"{{else}}{{#if name}} role=\"img\" aria-label=\"{{name}}\"{{/if}}{{/if}}>{{#if name}}{{name.[0]}}{{else}}?{{/if}}</span>{{/if}}</a>\n{{else}}\n<span class=\"ghcn-ui-avatar{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"rounded\"}}rounded{{else}}{{#match variant \"outline\"}}outline{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\">{{#if src}}<img class=\"ghcn-ui-avatar__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url src size=\"xs\"}}\" alt=\"{{#unless decorative}}{{#if name}}{{name}}{{/if}}{{/unless}}\" loading=\"lazy\" />{{else if profile_image}}<img class=\"ghcn-ui-avatar__image{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\" src=\"{{img_url profile_image size=\"xs\"}}\" alt=\"{{#unless decorative}}{{#if name}}{{name}}{{/if}}{{/unless}}\" loading=\"lazy\" />{{else}}<span class=\"ghcn-ui-avatar__fallback{{#if ghostcnStyles.imageClass}} {{ghostcnStyles.imageClass}}{{/if}}\"{{#if decorative}} aria-hidden=\"true\"{{else}}{{#if name}} role=\"img\" aria-label=\"{{name}}\"{{/if}}{{/if}}>{{#if name}}{{name.[0]}}{{else}}?{{/if}}</span>{{/if}}</span>\n{{/if}}\n{{/with}}"
45
+ },
46
+ {
47
+ "name": "avatar.css",
48
+ "type": "style",
49
+ "target": "assets/css/components/avatar.css",
50
+ "content": ".ghcn-ui-avatar { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-avatar, .ghcn-ui-avatar * { box-sizing: border-box; }\n.ghcn-ui-avatar:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-avatar:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-avatar:focus-visible, :where(.ghcn-ui-avatar) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 auto; overflow: hidden; border-radius: 9999px; border: 1px solid var(--border); background: var(--muted); color: var(--foreground); text-decoration: none; vertical-align: middle; }\n.ghcn-ui-avatar:where([data-size=\"sm\"]) { width: 28px; height: 28px; font-size: 12px; }\n.ghcn-ui-avatar:where([data-size=\"lg\"]) { width: 56px; height: 56px; font-size: 20px; }\n.ghcn-ui-avatar:where([data-variant=\"rounded\"]) { border-radius: var(--ghcn-control-radius, var(--radius, 8px)); }\n.ghcn-ui-avatar:where([data-variant=\"outline\"]) { border: 2px solid var(--primary); padding: 2px; background: var(--background); }\n.ghcn-ui-avatar:where([data-variant=\"outline\"]) .ghcn-ui-avatar__image, .ghcn-ui-avatar:where([data-variant=\"outline\"]) .ghcn-ui-avatar__fallback { border-radius: inherit; }\n.ghcn-ui-avatar__image { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-ui-avatar__fallback { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: 700; text-transform: uppercase; user-select: none; }\n"
51
+ }
52
+ ],
53
+ "styleSlots": {
54
+ "class": [
55
+ ".ghcn-ui-avatar"
56
+ ],
57
+ "imageClass": [
58
+ ".ghcn-ui-avatar__image",
59
+ ".ghcn-ui-avatar__fallback"
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "breadcrumbs",
3
+ "type": "components:content",
4
+ "description": "Accessible breadcrumb navigation with Schema.org BreadcrumbList microdata for posts, tags, and authors.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Separator and surface style.",
10
+ "options": [
11
+ "default",
12
+ "chevron",
13
+ "pill"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "homeLabel": {
18
+ "description": "Label for the home breadcrumb.",
19
+ "default": "Home"
20
+ },
21
+ "current": {
22
+ "description": "Optional override for the current page title."
23
+ }
24
+ },
25
+ "files": [
26
+ {
27
+ "name": "breadcrumbs.hbs",
28
+ "type": "partial",
29
+ "target": "partials/components/breadcrumbs.hbs",
30
+ "content": "{{!-- Styling parameters: class, listClass, linkClass, currentClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-breadcrumbs{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"chevron\"}}chevron{{else}}{{#match variant \"pill\"}}pill{{else}}default{{/match}}{{/match}}\" aria-label=\"Breadcrumb\">\n <ol class=\"ghcn-breadcrumbs__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\" itemscope itemtype=\"https://schema.org/BreadcrumbList\">\n <li class=\"ghcn-breadcrumbs__item\" itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <a class=\"ghcn-breadcrumbs__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{@site.url}}\" itemprop=\"item\"><span itemprop=\"name\">{{#if homeLabel}}{{homeLabel}}{{else}}Home{{/if}}</span></a>\n <meta itemprop=\"position\" content=\"1\" />\n </li>\n {{#if primary_tag}}\n <li class=\"ghcn-breadcrumbs__item\" itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <a class=\"ghcn-breadcrumbs__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{primary_tag.url}}\" itemprop=\"item\"><span itemprop=\"name\">{{primary_tag.name}}</span></a>\n <meta itemprop=\"position\" content=\"2\" />\n </li>\n {{/if}}\n <li class=\"ghcn-breadcrumbs__item\" itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <span class=\"ghcn-breadcrumbs__current{{#if ghostcnStyles.currentClass}} {{ghostcnStyles.currentClass}}{{/if}}\" aria-current=\"page\" itemprop=\"name\">{{#if current}}{{current}}{{else}}{{#if title}}{{title}}{{else}}{{#if name}}{{name}}{{else}}{{@site.title}}{{/if}}{{/if}}{{/if}}</span>\n <meta itemprop=\"position\" content=\"{{#if primary_tag}}3{{else}}2{{/if}}\" />\n </li>\n </ol>\n</nav>\n{{/with}}"
31
+ },
32
+ {
33
+ "name": "breadcrumbs.css",
34
+ "type": "style",
35
+ "target": "assets/css/components/breadcrumbs.css",
36
+ "content": ".ghcn-breadcrumbs { 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); margin-block: 16px; }\n.ghcn-breadcrumbs *, .ghcn-breadcrumbs *::before, .ghcn-breadcrumbs *::after { box-sizing: border-box; }\n.ghcn-breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--ghcn-text-meta, 13px); color: var(--muted-foreground); }\n.ghcn-breadcrumbs:where([data-variant=\"pill\"]) .ghcn-breadcrumbs__list { display: inline-flex; padding: 5px 12px; border: 1px solid var(--border); border-radius: 9999px; background: var(--card); }\n.ghcn-breadcrumbs__item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }\n.ghcn-breadcrumbs__item + .ghcn-breadcrumbs__item::before { content: \"/\"; color: color-mix(in srgb, var(--muted-foreground) 55%, transparent); }\n.ghcn-breadcrumbs:where([data-variant=\"chevron\"]) .ghcn-breadcrumbs__item + .ghcn-breadcrumbs__item::before { content: \"›\"; font-size: 1.15em; line-height: 1; }\n.ghcn-breadcrumbs__link { color: inherit; text-decoration: none; }\n.ghcn-breadcrumbs__link:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-breadcrumbs__current { color: var(--foreground); font-weight: 600; }\n.ghcn-breadcrumbs:focus-visible, :where(.ghcn-breadcrumbs) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
37
+ }
38
+ ],
39
+ "gscan": {
40
+ "rules_satisfied": [
41
+ "GS010-PJ-VALID"
42
+ ],
43
+ "notes": "Uses native Ghost @site.url, primary_tag, title, and name helpers with Schema.org microdata."
44
+ },
45
+ "styleSlots": {
46
+ "class": [
47
+ ".ghcn-breadcrumbs"
48
+ ],
49
+ "listClass": [
50
+ ".ghcn-breadcrumbs__list"
51
+ ],
52
+ "linkClass": [
53
+ ".ghcn-breadcrumbs__link"
54
+ ],
55
+ "currentClass": [
56
+ ".ghcn-breadcrumbs__current"
57
+ ]
58
+ }
59
+ }
@@ -63,7 +63,7 @@
63
63
  "name": "button.css",
64
64
  "type": "style",
65
65
  "target": "assets/css/components/button.css",
66
- "content": ".ghcn-ui-button { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-button, .ghcn-ui-button * { box-sizing: border-box; }\n.ghcn-ui-button:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-button:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-button:focus-visible, :where(.ghcn-ui-button) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-button { min-height: var(--ghcn-control-height, 40px); padding: var(--ghcn-control-padding, 8px 14px); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); font-size: var(--ghcn-text-small, 14px); line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: var(--ghcn-control-gap, 8px); border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground); font-weight: 600; text-decoration: none; cursor: pointer; }\n.ghcn-ui-button:hover { opacity: .9; }\n.ghcn-ui-button:where([data-size=\"sm\"]) { min-height: 34px; padding: 5px 11px; font-size: 13px; }\n.ghcn-ui-button:where([data-size=\"lg\"]) { min-height: 46px; padding: 10px 17px; font-size: 16px; }\n.ghcn-ui-button:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-button:where([data-variant=\"outline\"]) { background: transparent; color: var(--foreground); border-color: var(--border); }\n.ghcn-ui-button:where([data-variant=\"ghost\"]), .ghcn-ui-button:where([data-variant=\"link\"]) { background: transparent; color: var(--foreground); }\n.ghcn-ui-button:where([data-variant=\"link\"]) { color: var(--primary); text-decoration: underline; }\n.ghcn-ui-button:where([data-variant=\"destructive\"]) { background: var(--destructive); color: var(--destructive-foreground); }\n.ghcn-ui-button:disabled, .ghcn-ui-button[aria-disabled=\"true\"] { opacity: .5; cursor: not-allowed; }\n"
66
+ "content": ".ghcn-ui-button { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-button, .ghcn-ui-button * { box-sizing: border-box; }\n.ghcn-ui-button:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-button:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-button:focus-visible, :where(.ghcn-ui-button) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-button { min-height: var(--ghcn-control-height, 40px); padding: var(--ghcn-control-padding, 8px 14px); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); font-size: var(--ghcn-text-small, 14px); line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: var(--ghcn-control-gap, 8px); border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground); font-weight: 600; text-decoration: none; cursor: pointer; transition: opacity 150ms ease, background-color 150ms ease, border-color 150ms ease; }\n.ghcn-ui-button:hover { opacity: .9; }\n.ghcn-ui-button:where([data-size=\"sm\"]) { min-height: 34px; padding: 5px 11px; font-size: 13px; }\n.ghcn-ui-button:where([data-size=\"lg\"]) { min-height: 46px; padding: 10px 17px; font-size: 16px; }\n.ghcn-ui-button:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-button:where([data-variant=\"outline\"]) { background: transparent; color: var(--foreground); border-color: var(--border); }\n.ghcn-ui-button:where([data-variant=\"outline\"]):hover { background: var(--muted); opacity: 1; }\n.ghcn-ui-button:where([data-variant=\"ghost\"]), .ghcn-ui-button:where([data-variant=\"link\"]) { background: transparent; color: var(--foreground); }\n.ghcn-ui-button:where([data-variant=\"ghost\"]):hover { background: var(--muted); opacity: 1; }\n.ghcn-ui-button:where([data-variant=\"link\"]) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-ui-button:where([data-variant=\"destructive\"]) { background: var(--destructive); color: var(--destructive-foreground); }\n.ghcn-ui-button:disabled, .ghcn-ui-button[aria-disabled=\"true\"] { opacity: .5; cursor: not-allowed; }\n@media (prefers-reduced-motion: reduce) { .ghcn-ui-button { transition: none; } }\n"
67
67
  }
68
68
  ],
69
69
  "styleSlots": {