ghostcn 1.4.1 → 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 (56) hide show
  1. package/dist/commands/create.js +16 -9
  2. package/dist/commands/diff.js +47 -5
  3. package/dist/commands/init.js +22 -10
  4. package/dist/commands/list.js +22 -4
  5. package/dist/registry/components/accordion.json +66 -0
  6. package/dist/registry/components/alert.json +1 -1
  7. package/dist/registry/components/announcement-bar.json +79 -0
  8. package/dist/registry/components/archive-header.json +2 -2
  9. package/dist/registry/components/author-card.json +2 -2
  10. package/dist/registry/components/author-list.json +2 -2
  11. package/dist/registry/components/avatar.json +62 -0
  12. package/dist/registry/components/badge.json +1 -1
  13. package/dist/registry/components/breadcrumbs.json +59 -0
  14. package/dist/registry/components/button.json +1 -1
  15. package/dist/registry/components/card.json +1 -1
  16. package/dist/registry/components/featured-posts.json +2 -2
  17. package/dist/registry/components/input.json +8 -2
  18. package/dist/registry/components/member-cta.json +1 -1
  19. package/dist/registry/components/newsletter-form.json +12 -3
  20. package/dist/registry/components/pagination.json +2 -2
  21. package/dist/registry/components/post-card.json +2 -2
  22. package/dist/registry/components/post-grid.json +2 -2
  23. package/dist/registry/components/post-header.json +2 -2
  24. package/dist/registry/components/post-navigation.json +1 -1
  25. package/dist/registry/components/pricing-table.json +24 -4
  26. package/dist/registry/components/reading-progress.json +73 -0
  27. package/dist/registry/components/related-posts.json +7 -1
  28. package/dist/registry/components/share-buttons.json +76 -0
  29. package/dist/registry/components/site-footer.json +2 -2
  30. package/dist/registry/components/site-header.json +1 -1
  31. package/dist/registry/components/table-of-contents.json +13 -3
  32. package/dist/registry/components/tag-grid.json +2 -2
  33. package/dist/registry/components/tag-list.json +1 -1
  34. package/dist/registry/components/theme-toggle.json +65 -0
  35. package/dist/registry/components/visibility-badge.json +71 -0
  36. package/dist/registry/index.json +89 -4
  37. package/dist/templates/playground/index.html +2 -2
  38. package/dist/templates/playground/playground.css +8 -1
  39. package/dist/templates/playground/playground.js +39 -5
  40. package/dist/templates/playground/preview.css +1 -0
  41. package/dist/templates/theme-tools.mjs +62 -24
  42. package/dist/utils/component-diff.d.ts +1 -1
  43. package/dist/utils/component-diff.js +46 -17
  44. package/dist/utils/component-files.js +3 -2
  45. package/dist/utils/component-history.js +1 -1
  46. package/dist/utils/design-defaults.json +17 -0
  47. package/dist/utils/playground-server.js +34 -12
  48. package/dist/utils/preview-renderer.d.ts +5 -0
  49. package/dist/utils/preview-renderer.js +30 -8
  50. package/dist/utils/registry.js +15 -5
  51. package/dist/utils/theme-files.js +14 -7
  52. package/dist/utils/theme-project.js +6 -4
  53. package/dist/utils/theme-scaffold.js +27 -14
  54. package/dist/utils/theme.d.ts +3 -3
  55. package/dist/utils/theme.js +108 -49
  56. package/package.json +1 -1
@@ -15,9 +15,9 @@ const theme_scaffold_1 = require("../utils/theme-scaffold");
15
15
  async function create(themeNameArgument, options = {}) {
16
16
  let themeName = themeNameArgument || '';
17
17
  let style = 'tailwind';
18
- let baseColor = 'zinc';
19
- let accentColor = 'ghost';
20
- let radius = '0.5rem';
18
+ let baseColor = 'doks';
19
+ let accentColor = 'doks';
20
+ let radius = '0.625rem';
21
21
  let colorScheme = 'Auto';
22
22
  let packageManager = 'npm';
23
23
  let authorName = 'Theme Author';
@@ -25,12 +25,18 @@ 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 },
31
- { type: 'select', name: 'baseColor', message: 'Choose a base palette', choices: ['zinc', 'slate', 'stone', 'gray', 'neutral'].map(value => ({ title: value[0].toUpperCase() + value.slice(1), value })), initial: 0 },
32
- { type: 'select', name: 'accentColor', message: 'Choose an accent color', choices: ['ghost', 'indigo', 'violet', 'blue', 'emerald', 'rose', 'orange', 'zinc'].map(value => ({ title: value === 'ghost' ? 'Ghost accent (Recommended)' : value[0].toUpperCase() + value.slice(1), value })), initial: 0 },
33
- { type: 'select', name: 'radius', message: 'Choose a border radius', choices: [{ title: 'Medium', value: '0.5rem' }, { title: 'Small', value: '0.25rem' }, { title: 'Large', value: '0.75rem' }, { title: 'Extra large', value: '1rem' }, { title: 'None', value: '0' }, { title: 'Pill', value: '9999px' }], initial: 0 },
37
+ { type: 'select', name: 'baseColor', message: 'Choose a base palette', choices: [{ title: 'Doks (Recommended)', value: 'doks', description: 'Warm editorial surfaces in light and dark' }, ...['zinc', 'slate', 'stone', 'gray', 'neutral'].map(value => ({ title: value[0].toUpperCase() + value.slice(1), value }))], initial: 0 },
38
+ { type: 'select', name: 'accentColor', message: 'Choose an accent color', choices: [{ title: 'Doks / Monochrome', value: 'doks' }, { title: 'Ghost publication accent', value: 'ghost' }, ...['indigo', 'violet', 'blue', 'emerald', 'rose', 'orange', 'zinc'].map(value => ({ title: value[0].toUpperCase() + value.slice(1), value }))], initial: 0 },
39
+ { type: 'select', name: 'radius', message: 'Choose a border radius', choices: [{ title: 'Doks (10px)', value: '0.625rem' }, { title: 'Medium', value: '0.5rem' }, { title: 'Small', value: '0.25rem' }, { title: 'Large', value: '0.75rem' }, { title: 'Extra large', value: '1rem' }, { title: 'None', value: '0' }, { title: 'Pill', value: '9999px' }], initial: 0 },
34
40
  { type: 'select', name: 'colorScheme', message: 'Choose the initial color scheme', choices: ['Auto', 'Light', 'Dark'].map(value => ({ title: value, value })), initial: 0 },
35
41
  { type: 'multiselect', name: 'optionalComponents', message: 'Add optional starter components', choices: [{ title: 'Newsletter form', value: 'newsletter-form', selected: true }, { title: 'Author card', value: 'author-card', selected: true }, { title: 'Pricing table', value: 'pricing-table', selected: false }], hint: '- Space to select. Return to submit' },
36
42
  { type: 'select', name: 'packageManager', message: 'Choose a package manager', choices: ['npm', 'pnpm', 'yarn', 'bun'].map(value => ({ title: value, value })), 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';
@@ -54,6 +57,7 @@ async function init(options = {}) {
54
57
  message: 'Which base color palette would you like to use?',
55
58
  choices: [
56
59
  { title: 'Zinc', value: 'zinc', description: 'Modern neutral with cool undertones' },
60
+ { title: 'Doks', value: 'doks', description: 'Warm editorial surfaces in light and dark' },
57
61
  { title: 'Slate', value: 'slate', description: 'Cool gray with subtle blue tones' },
58
62
  { title: 'Stone', value: 'stone', description: 'Warm, earthy neutral' },
59
63
  { title: 'Gray', value: 'gray', description: 'Clean, balanced neutral gray' },
@@ -77,7 +81,8 @@ async function init(options = {}) {
77
81
  { title: 'Emerald', value: 'emerald', description: 'Lush natural green' },
78
82
  { title: 'Rose', value: 'rose', description: 'Warm crimson rose' },
79
83
  { title: 'Orange', value: 'orange', description: 'Energetic warm orange' },
80
- { title: 'Zinc / Monochrome', value: 'zinc', description: 'Minimalist black/white' }
84
+ { title: 'Zinc / Monochrome', value: 'zinc', description: 'Minimalist black/white' },
85
+ { title: 'Doks / Monochrome', value: 'doks', description: 'Neutral controls with an inverted dark palette' }
81
86
  ],
82
87
  initial: 0
83
88
  },
@@ -91,7 +96,8 @@ async function init(options = {}) {
91
96
  { title: 'Large (0.75rem)', value: '0.75rem' },
92
97
  { title: 'Extra Large (1.0rem)', value: '1rem' },
93
98
  { title: 'None (0px)', value: '0' },
94
- { title: 'Full (Pill / 9999px)', value: '9999px' }
99
+ { title: 'Full (Pill / 9999px)', value: '9999px' },
100
+ { title: 'Doks (0.625rem)', value: '0.625rem' }
95
101
  ],
96
102
  initial: 0
97
103
  },
@@ -99,26 +105,31 @@ async function init(options = {}) {
99
105
  type: 'text',
100
106
  name: 'cssFile',
101
107
  message: 'Where should the theme CSS tokens file be written?',
102
- 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'
103
110
  },
104
111
  {
105
112
  type: 'text',
106
113
  name: 'partialsAlias',
107
114
  message: 'Where should Handlebars partials be installed?',
108
- initial: 'partials/components'
115
+ initial: 'partials/components',
116
+ validate: (value) => /^partials(\/|$)/.test(value.trim().replace(/\\/g, '/')) ? true : 'Partials must live under partials/'
109
117
  },
110
118
  {
111
119
  type: 'text',
112
120
  name: 'stylesAlias',
113
121
  message: 'Where should component CSS stylesheets be installed?',
114
- initial: 'assets/css/components'
122
+ initial: 'assets/css/components',
123
+ validate: (value) => /^assets(\/|$)/.test(value.trim().replace(/\\/g, '/')) ? true : 'Stylesheets must live under assets/'
115
124
  }
116
125
  ], {
117
126
  onCancel: () => {
118
127
  console.log(chalk_1.default.red('\nInitialization cancelled.'));
119
- process.exit(1);
128
+ process.exitCode = 1;
120
129
  }
121
130
  });
131
+ if (process.exitCode === 1)
132
+ return;
122
133
  style = response.style || style;
123
134
  baseColor = response.baseColor || baseColor;
124
135
  accentColor = response.accentColor || accentColor;
@@ -145,7 +156,8 @@ async function init(options = {}) {
145
156
  }
146
157
  catch (error) {
147
158
  spinner.fail(chalk_1.default.red(error.message));
148
- process.exit(1);
159
+ process.exitCode = 1;
160
+ return;
149
161
  }
150
162
  spinner.succeed(chalk_1.default.green('Configuration & design tokens successfully initialized!'));
151
163
  console.log('\n' + chalk_1.default.bold('Summary:'));
@@ -162,7 +174,7 @@ async function init(options = {}) {
162
174
  console.log('\n' + chalk_1.default.bold.green('Next Steps:'));
163
175
  if (styleSync.status === 'missing-template') {
164
176
  console.log(` 1. Add this stylesheet to your layout's <head>:`);
165
- 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) + '"}}">')}`);
166
178
  console.log(` 2. Add components to your theme:`);
167
179
  }
168
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
+ }
@@ -45,7 +45,7 @@
45
45
  "name": "alert.css",
46
46
  "type": "style",
47
47
  "target": "assets/css/components/alert.css",
48
- "content": ".ghcn-ui-alert { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-alert, .ghcn-ui-alert * { box-sizing: border-box; }\n.ghcn-ui-alert:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-alert:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-alert:focus-visible, .ghcn-ui-alert :focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }\n.ghcn-ui-alert { padding: 1em; background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius); overflow-wrap: anywhere; }\n.ghcn-ui-alert:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-alert:where([data-variant=\"outline\"]) { background: transparent; }\n.ghcn-ui-alert:where([data-variant=\"destructive\"]) { border-color: var(--destructive); color: var(--destructive); }\n.ghcn-ui-alert__title { font-size: 1em; margin: 0 0 .375em; font-weight: 600; }\n.ghcn-ui-alert__description { margin: 0; }\n"
48
+ "content": ".ghcn-ui-alert { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-alert, .ghcn-ui-alert * { box-sizing: border-box; }\n.ghcn-ui-alert:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-alert:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-alert:focus-visible, :where(.ghcn-ui-alert) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-alert { 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: 16px; }\n.ghcn-ui-alert:where([data-size=\"sm\"]) { padding: 12px; }\n.ghcn-ui-alert:where([data-size=\"lg\"]) { padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.ghcn-ui-alert:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-alert:where([data-variant=\"outline\"]) { background: transparent; }\n.ghcn-ui-alert:where([data-variant=\"destructive\"]) { border-color: var(--destructive); color: var(--destructive); }\n.ghcn-ui-alert__title { font-size: 1em; margin: 0 0 .375em; font-weight: 600; }\n.ghcn-ui-alert__description { margin: 0; }\n"
49
49
  }
50
50
  ],
51
51
  "styleSlots": {
@@ -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,13 +28,13 @@
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",
35
35
  "type": "style",
36
36
  "target": "assets/css/components/archive-header.css",
37
- "content": ".ghcn-archive-header { font-size: 16px; color: var(--foreground); text-align: center; margin-block: 2em; }\n.ghcn-archive-header__title { font-size: clamp(2em,5vw,3em); line-height: 1.1; margin: .5em 0; overflow-wrap: anywhere; }\n.ghcn-archive-header__description { max-width: 42em; margin: 1em auto; color: var(--muted-foreground); }\n.ghcn-archive-header__image { display: block; width: 100%; max-height: 28em; object-fit: cover; border-radius: var(--radius); margin-top: 2em; }\n"
37
+ "content": ".ghcn-archive-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, 1152px); margin-inline: auto; text-align: center; }\n.ghcn-archive-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: 24ch; margin: 12px auto; }\n.ghcn-archive-header__description { max-width: 60ch; margin: 12px auto; color: var(--muted-foreground); }\n.ghcn-archive-header__image { display: block; width: 100%; max-height: 440px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); margin-top: var(--ghcn-section-gap, 20px); }\n"
38
38
  }
39
39
  ],
40
40
  "styleSlots": {
@@ -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;\n font-family: inherit;\n font-size: 16px;\n line-height: 1.5;\n isolation: isolate;\n background-color: var(--card, #ffffff);\n color: var(--card-foreground, #09090b);\n border: 1px solid var(--border, #e4e4e7);\n border-radius: min(var(--radius, 0.5em), 1.5em);\n padding: 1.5em;\n margin: 2em auto;\n max-width: 42em;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1.25em;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);\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: 5em;\n height: 5em;\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: 5em;\n height: 5em;\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 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: 1.25em;\n font-weight: 700;\n letter-spacing: -0.025em;\n margin: 0;\n color: var(--foreground, #09090b);\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; align-items: center; } .gh-author-meta { justify-content: flex-start; } }\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,13 +19,13 @@
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",
26
26
  "type": "style",
27
27
  "target": "assets/css/components/author-list.css",
28
- "content": ".ghcn-author-list { font-size: 16px; color: var(--foreground); margin-block: 2em; }\n.ghcn-author-list__title { font-size: 1.5em; line-height: 1.25; margin: 0 0 1em; }\n.ghcn-author-list__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5em; }\n.ghcn-author-list__grid > * { min-width: 0; }\n.ghcn-author-list__empty { color: var(--muted-foreground); }\n@media(max-width:900px) { .ghcn-author-list__grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }\n@media(max-width:620px) { .ghcn-author-list__grid { grid-template-columns: 1fr; } }"
28
+ "content": ".ghcn-author-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, 1152px); margin-inline: auto; }\n.ghcn-author-list__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); }\n.ghcn-author-list__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-author-list__grid > * { min-width: 0; }\n.ghcn-author-list__empty { color: var(--muted-foreground); }\n:where(.ghcn-author-list__grid) > .gh-author-card { width: 100%; margin: 0; }\n"
29
29
  }
30
30
  ],
31
31
  "styleSlots": {