ghostcn 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.js +6 -6
- package/dist/commands/init.js +5 -2
- package/dist/registry/components/alert.json +1 -1
- package/dist/registry/components/archive-header.json +1 -1
- package/dist/registry/components/author-card.json +1 -1
- package/dist/registry/components/author-list.json +1 -1
- package/dist/registry/components/badge.json +1 -1
- package/dist/registry/components/button.json +1 -1
- package/dist/registry/components/card.json +1 -1
- package/dist/registry/components/featured-posts.json +2 -2
- package/dist/registry/components/input.json +1 -1
- package/dist/registry/components/member-cta.json +1 -1
- package/dist/registry/components/newsletter-form.json +1 -1
- package/dist/registry/components/pagination.json +1 -1
- package/dist/registry/components/post-card.json +1 -1
- package/dist/registry/components/post-grid.json +1 -1
- package/dist/registry/components/post-header.json +1 -1
- package/dist/registry/components/post-navigation.json +1 -1
- package/dist/registry/components/pricing-table.json +2 -2
- package/dist/registry/components/related-posts.json +1 -1
- package/dist/registry/components/site-footer.json +1 -1
- package/dist/registry/components/site-header.json +1 -1
- package/dist/registry/components/table-of-contents.json +3 -3
- package/dist/registry/components/tag-grid.json +1 -1
- package/dist/registry/components/tag-list.json +1 -1
- package/dist/utils/design-defaults.json +17 -0
- package/dist/utils/preview-renderer.js +11 -3
- package/dist/utils/theme-scaffold.js +5 -7
- package/dist/utils/theme.d.ts +3 -3
- package/dist/utils/theme.js +69 -17
- package/package.json +1 -1
package/dist/commands/create.js
CHANGED
|
@@ -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 = '
|
|
19
|
-
let accentColor = '
|
|
20
|
-
let radius = '0.
|
|
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';
|
|
@@ -28,9 +28,9 @@ async function create(themeNameArgument, options = {}) {
|
|
|
28
28
|
const response = await (0, prompts_1.default)([
|
|
29
29
|
...(!themeName ? [{ type: 'text', name: 'themeName', message: 'What should the theme be called?', initial: 'my-ghost-theme' }] : []),
|
|
30
30
|
{ 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
|
|
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 },
|
|
31
|
+
{ 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 },
|
|
32
|
+
{ 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 },
|
|
33
|
+
{ 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
34
|
{ type: 'select', name: 'colorScheme', message: 'Choose the initial color scheme', choices: ['Auto', 'Light', 'Dark'].map(value => ({ title: value, value })), initial: 0 },
|
|
35
35
|
{ 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
36
|
{ type: 'select', name: 'packageManager', message: 'Choose a package manager', choices: ['npm', 'pnpm', 'yarn', 'bun'].map(value => ({ title: value, value })), initial: 0 },
|
package/dist/commands/init.js
CHANGED
|
@@ -54,6 +54,7 @@ async function init(options = {}) {
|
|
|
54
54
|
message: 'Which base color palette would you like to use?',
|
|
55
55
|
choices: [
|
|
56
56
|
{ title: 'Zinc', value: 'zinc', description: 'Modern neutral with cool undertones' },
|
|
57
|
+
{ title: 'Doks', value: 'doks', description: 'Warm editorial surfaces in light and dark' },
|
|
57
58
|
{ title: 'Slate', value: 'slate', description: 'Cool gray with subtle blue tones' },
|
|
58
59
|
{ title: 'Stone', value: 'stone', description: 'Warm, earthy neutral' },
|
|
59
60
|
{ title: 'Gray', value: 'gray', description: 'Clean, balanced neutral gray' },
|
|
@@ -77,7 +78,8 @@ async function init(options = {}) {
|
|
|
77
78
|
{ title: 'Emerald', value: 'emerald', description: 'Lush natural green' },
|
|
78
79
|
{ title: 'Rose', value: 'rose', description: 'Warm crimson rose' },
|
|
79
80
|
{ title: 'Orange', value: 'orange', description: 'Energetic warm orange' },
|
|
80
|
-
{ title: 'Zinc / Monochrome', value: 'zinc', description: 'Minimalist black/white' }
|
|
81
|
+
{ title: 'Zinc / Monochrome', value: 'zinc', description: 'Minimalist black/white' },
|
|
82
|
+
{ title: 'Doks / Monochrome', value: 'doks', description: 'Neutral controls with an inverted dark palette' }
|
|
81
83
|
],
|
|
82
84
|
initial: 0
|
|
83
85
|
},
|
|
@@ -91,7 +93,8 @@ async function init(options = {}) {
|
|
|
91
93
|
{ title: 'Large (0.75rem)', value: '0.75rem' },
|
|
92
94
|
{ title: 'Extra Large (1.0rem)', value: '1rem' },
|
|
93
95
|
{ title: 'None (0px)', value: '0' },
|
|
94
|
-
{ title: 'Full (Pill / 9999px)', value: '9999px' }
|
|
96
|
+
{ title: 'Full (Pill / 9999px)', value: '9999px' },
|
|
97
|
+
{ title: 'Doks (0.625rem)', value: '0.625rem' }
|
|
95
98
|
],
|
|
96
99
|
initial: 0
|
|
97
100
|
},
|
|
@@ -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:
|
|
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": {
|
|
@@ -34,7 +34,7 @@
|
|
|
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);
|
|
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": {
|
|
@@ -15,7 +15,7 @@
|
|
|
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
|
|
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"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -25,7 +25,7 @@
|
|
|
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-
|
|
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": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"name": "badge.css",
|
|
41
41
|
"type": "style",
|
|
42
42
|
"target": "assets/css/components/badge.css",
|
|
43
|
-
"content": ".ghcn-ui-badge { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-badge, .ghcn-ui-badge * { box-sizing: border-box; }\n.ghcn-ui-badge:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-badge:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-badge:focus-visible, .ghcn-ui-badge :focus-visible { outline: 2px solid var(--ring); outline-offset:
|
|
43
|
+
"content": ".ghcn-ui-badge { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-badge, .ghcn-ui-badge * { box-sizing: border-box; }\n.ghcn-ui-badge:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-badge:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-badge:focus-visible, :where(.ghcn-ui-badge) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-badge { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--secondary); color: var(--secondary-foreground); font-size: 12px; font-weight: 600; line-height: 1.25; }\n.ghcn-ui-badge:where([data-size=\"sm\"]) { font-size: 11px; padding: 2px 7px; }\n.ghcn-ui-badge:where([data-size=\"lg\"]) { font-size: 14px; padding: 4px 10px; }\n.ghcn-ui-badge:where([data-variant=\"secondary\"]) { background: var(--muted); color: var(--muted-foreground); border-color: transparent; }\n.ghcn-ui-badge:where([data-variant=\"outline\"]) { background: transparent; color: var(--foreground); border-color: var(--border); }\n.ghcn-ui-badge:where([data-variant=\"destructive\"]) { background: var(--destructive); color: var(--destructive-foreground); }\n"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
"styleSlots": {
|
|
@@ -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: 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, .ghcn-ui-button :focus-visible { outline: 2px solid var(--ring); outline-offset:
|
|
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"
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
69
|
"styleSlots": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"name": "card.css",
|
|
48
48
|
"type": "style",
|
|
49
49
|
"target": "assets/css/components/card.css",
|
|
50
|
-
"content": ".ghcn-ui-card { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-card, .ghcn-ui-card * { box-sizing: border-box; }\n.ghcn-ui-card:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-card:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-card:focus-visible, .ghcn-ui-card :focus-visible { outline: 2px solid var(--ring); outline-offset:
|
|
50
|
+
"content": ".ghcn-ui-card { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-card, .ghcn-ui-card * { box-sizing: border-box; }\n.ghcn-ui-card:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-card:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-card:focus-visible, :where(.ghcn-ui-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.ghcn-ui-card:where([data-size=\"sm\"]) { padding: 16px; }\n.ghcn-ui-card:where([data-size=\"lg\"]) { padding: 28px; }\n.ghcn-ui-card:where([data-variant=\"secondary\"]) { background: var(--secondary); color: var(--secondary-foreground); }\n.ghcn-ui-card:where([data-variant=\"outline\"]) { background: transparent; }\n.ghcn-ui-card__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0 0 8px; }\n.ghcn-ui-card__description { color: inherit; font-size: var(--ghcn-text-small, 14px); margin: 0 0 16px; }\n.ghcn-ui-card__content:empty { display: none; }\n.ghcn-ui-card__footer { margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--border); }\n"
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
53
|
"styleSlots": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"name": "featured-posts.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/featured-posts.hbs",
|
|
12
|
-
"content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, contentClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Featured Posts | Usage: {{> \"components/featured-posts\"}} --}}\n{{#get \"posts\" filter=\"featured:true\" limit=\"3\" include=\"authors,tags\"}}\n{{#if posts}}\n<section class=\"ghcn-featured{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}} ghcn-container\" aria-label=\"Featured posts\">\n <div class=\"ghcn-featured__heading\">\n <div><span class=\"ghcn-badge\">Featured</span><h2 class=\"ghcn-featured__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Editor’s picks</h2></div>\n <a href=\"{{@site.url}}\">View all posts <span aria-hidden=\"true\">→</span></a>\n </div>\n <div class=\"ghcn-featured__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts}}\n <article class=\"ghcn-featured__card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}{{#has index=\"0\"}} ghcn-featured__card--lead{{/has}}\">\n <a class=\"ghcn-featured__image\" href=\"{{url}}\">\n
|
|
12
|
+
"content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, contentClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Featured Posts | Usage: {{> \"components/featured-posts\"}} --}}\n{{#get \"posts\" filter=\"featured:true\" limit=\"3\" include=\"authors,tags\"}}\n{{#if posts}}\n<section class=\"ghcn-featured{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}} ghcn-container\" aria-label=\"Featured posts\">\n <div class=\"ghcn-featured__heading\">\n <div><span class=\"ghcn-badge\">Featured</span><h2 class=\"ghcn-featured__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Editor’s picks</h2></div>\n <a href=\"{{@site.url}}\">View all posts <span aria-hidden=\"true\">→</span></a>\n </div>\n <div class=\"ghcn-featured__grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#foreach posts}}\n <article class=\"ghcn-featured__card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}{{#has index=\"0\"}} ghcn-featured__card--lead{{/has}}\">\n {{#if feature_image}}\n <a class=\"ghcn-featured__image\" href=\"{{url}}\">\n <img src=\"{{img_url feature_image size=\"l\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" loading=\"{{#has index=\"0\"}}eager{{else}}lazy{{/has}}\" />\n </a>\n {{/if}}\n <div class=\"ghcn-featured__content{{#if ghostcnStyles.contentClass}} {{ghostcnStyles.contentClass}}{{/if}}\">\n <div class=\"ghcn-featured__meta\">{{#if primary_tag}}<a href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a><span>•</span>{{/if}}<span>{{reading_time}}</span></div>\n <h3><a href=\"{{url}}\">{{title}}</a></h3>\n {{#has index=\"0\"}}{{#if excerpt}}<p>{{excerpt words=\"30\"}}</p>{{/if}}{{/has}}\n </div>\n </article>\n {{/foreach}}\n </div>\n</section>\n{{/if}}\n{{/get}}\n{{/with}}"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "featured-posts.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/featured-posts.css",
|
|
18
|
-
"content": "/* ghostcn: Featured Posts */\n.ghcn-featured { box-sizing: border-box;
|
|
18
|
+
"content": "/* ghostcn: Featured Posts */\n.ghcn-featured { 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); }\n.ghcn-featured *, .ghcn-featured *::before, .ghcn-featured *::after { box-sizing: border-box; }\n.ghcn-featured__heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: var(--ghcn-section-gap, 20px); }\n.ghcn-featured__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: 8px 0 0; }\n.ghcn-featured__heading > a { color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); font-weight: 600; text-decoration: none; }\n.ghcn-featured__grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-featured__card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); display: flex; flex-direction: column; overflow: hidden; }\n.ghcn-featured__card--lead { grid-row: span 2; }\n.ghcn-featured__card:only-child { grid-column: 1 / -1; grid-row: auto; }\n.ghcn-featured__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--muted); }\n.ghcn-featured__image img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-featured__card--lead:not(:only-child) .ghcn-featured__image { flex: 1 1 auto; }\n.ghcn-featured__content { padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.ghcn-featured__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); }\n.ghcn-featured__meta a, .ghcn-featured__content h3 a { color: inherit; text-decoration: none; }\n.ghcn-featured a:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-featured__content h3 { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.ghcn-featured__card--lead h3 { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; }\n.ghcn-featured__content p { max-width: 60ch; margin: 8px 0 0; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); }\n.ghcn-featured:focus-visible, :where(.ghcn-featured) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-featured__image:focus-visible { outline-offset: -3px; }\n@media (max-width: 720px) { .ghcn-featured__grid { grid-template-columns: 1fr; } .ghcn-featured__card--lead { grid-row: auto; } }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"name": "input.css",
|
|
75
75
|
"type": "style",
|
|
76
76
|
"target": "assets/css/components/input.css",
|
|
77
|
-
"content": ".ghcn-ui-field { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-field, .ghcn-ui-field * { box-sizing: border-box; }\n.ghcn-ui-field:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-field:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-field:focus-visible, .ghcn-ui-field :focus-visible { outline: 2px solid var(--ring); outline-offset:
|
|
77
|
+
"content": ".ghcn-ui-field { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-ui-field, .ghcn-ui-field * { box-sizing: border-box; }\n.ghcn-ui-field:where([data-size=\"sm\"]) { font-size: 14px; }\n.ghcn-ui-field:where([data-size=\"lg\"]) { font-size: 18px; }\n.ghcn-ui-field:focus-visible, :where(.ghcn-ui-field) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-ui-field { width: 100%; }\n.ghcn-ui-field__label { display: grid; gap: .375em; font-weight: 500; }\n.ghcn-ui-field__input { 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; width: 100%; min-width: 0; border: 1px solid var(--input); background: var(--background); color: var(--foreground); font-family: inherit; }\n:where(.ghcn-ui-field[data-size=\"sm\"]) .ghcn-ui-field__input { min-height: 34px; padding: 5px 11px; font-size: 13px; }\n:where(.ghcn-ui-field[data-size=\"lg\"]) .ghcn-ui-field__input { min-height: 46px; padding: 10px 17px; font-size: 16px; }\n:where(.ghcn-ui-field[data-variant=\"filled\"]) .ghcn-ui-field__input { background: var(--muted); }\n.ghcn-ui-field__input::placeholder { color: var(--muted-foreground); }\n.ghcn-ui-field__input[aria-invalid=\"true\"] { border-color: var(--destructive); }\n.ghcn-ui-field__input:disabled { opacity: .5; cursor: not-allowed; }\n.ghcn-ui-field__hint { color: var(--muted-foreground); font-size: .875em; margin: .5em 0 0; }\n"
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
80
|
"styleSlots": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "member-cta.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/member-cta.css",
|
|
18
|
-
"content": "/* ghostcn: Member CTA */\n.ghcn-member-cta { box-sizing: border-box;
|
|
18
|
+
"content": "/* ghostcn: Member CTA */\n.ghcn-member-cta { 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); 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); width: min(100% - 32px, 704px); margin-inline: auto; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); text-align: center; }\n.ghcn-member-cta *, .ghcn-member-cta *::before, .ghcn-member-cta *::after { box-sizing: border-box; }\n.ghcn-member-cta__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 12px 0 8px; color: inherit; }\n.ghcn-member-cta__description { max-width: 60ch; margin: 0 auto 16px; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); }\n.ghcn-member-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75em; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "newsletter-form.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/newsletter-form.css",
|
|
18
|
-
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box
|
|
18
|
+
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n 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);\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 padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px));\n text-align: center;\n width: min(100% - 32px, 704px);\n margin-inline: auto;\n}\n\n.gh-newsletter-form *,\n.gh-newsletter-form *::before,\n.gh-newsletter-form *::after {\n box-sizing: border-box;\n}\n\n.gh-newsletter-heading { margin-bottom: 16px; }\n\n.gh-newsletter-title {\n font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance;\n margin: 0 0 8px;\n color: inherit;\n}\n\n.gh-newsletter-desc {\n color: var(--muted-foreground, #71717a);\n font-size: var(--ghcn-text-small, 14px);\n line-height: 1.5;\n margin: 0 auto;\n max-width: 28em;\n}\n\n.gh-newsletter-fields {\n display: grid;\n gap: var(--ghcn-control-gap, 8px);\n max-width: 28em;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n grid-template-columns: minmax(0, 1fr) auto;\n }\n}\n\n.gh-newsletter-input {\n min-width: 0;\n min-height: var(--ghcn-control-height, 40px);\n padding: var(--ghcn-control-padding, 8px 14px);\n background-color: var(--background, #ffffff);\n color: var(--foreground, #09090b);\n border: 1px solid var(--input, #e4e4e7);\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: var(--ghcn-text-small, 14px);\n line-height: 1.25;\n}\n\n.gh-newsletter-form:focus-visible, :where(.gh-newsletter-form) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n\n.gh-newsletter-btn {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n min-height: var(--ghcn-control-height, 40px);\n padding: var(--ghcn-control-padding, 8px 14px);\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: var(--ghcn-text-small, 14px);\n font-weight: 600;\n line-height: 1.25;\n border: 1px solid transparent;\n cursor: pointer;\n transition: opacity 0.15s ease;\n}\n\n.gh-newsletter-btn:hover {\n opacity: 0.9;\n}\n\n.gh-newsletter-msg-success,\n.gh-newsletter-msg-error {\n display: none;\n grid-column: 1 / -1;\n font-size: 0.75em;\n font-weight: 500;\n}\n\n.gh-newsletter-fields.success .gh-newsletter-msg-success,\n.gh-newsletter-fields.error .gh-newsletter-msg-error {\n display: block;\n}\n\n.gh-newsletter-form .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.gh-newsletter-msg-success {\n color: #16a34a;\n}\n\n.gh-newsletter-msg-error {\n color: #dc2626;\n}\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"name": "pagination.css",
|
|
17
17
|
"type": "style",
|
|
18
18
|
"target": "assets/css/components/pagination.css",
|
|
19
|
-
"content": "/* ghostcn: Pagination */\n.ghcn-pagination { box-sizing: border-box;
|
|
19
|
+
"content": "/* ghostcn: Pagination */\n.ghcn-pagination { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-pagination *, .ghcn-pagination *::before, .ghcn-pagination *::after { box-sizing: border-box; }\n.ghcn-pagination__side { display: flex; }\n.ghcn-pagination__side--end { justify-content: flex-end; }\n.ghcn-pagination__status { color: var(--muted-foreground); font-size: 0.8125em; }\n@media (max-width: 480px) { .ghcn-pagination { grid-template-columns: 1fr 1fr; } .ghcn-pagination__status { grid-column: 1 / -1; grid-row: 1; text-align: center; } }\n"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "post-card.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/post-card.css",
|
|
18
|
-
"content": "/* ghostcn: Post Card Styles */\n.gh-post-card {\n box-sizing: border-box
|
|
18
|
+
"content": "/* ghostcn: Post Card Styles */\n.gh-post-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 overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.gh-post-card *,\n.gh-post-card *::before,\n.gh-post-card *::after {\n box-sizing: border-box;\n}\n\n.gh-post-card-image {\n aspect-ratio: 16 / 9;\n overflow: hidden;\n display: block;\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-post-card-image img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.gh-post-card-content {\n padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px));\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.gh-post-card-tag {\n color: inherit;\n font-size: inherit;\n font-weight: 600;\n text-decoration: none;\n}\n\n.gh-post-card-tag:hover {\n text-decoration: underline;\n}\n\n.gh-post-card-title {\n font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit;\n margin: 8px 0;\n}\n\n.gh-post-card-title a {\n color: inherit;\n text-decoration: none;\n transition: color 0.15s ease;\n}\n\n.gh-post-card-title a:hover {\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n\n.gh-post-card-excerpt {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n overflow: hidden;\n color: var(--muted-foreground, #71717a);\n font-size: var(--ghcn-text-small, 14px);\n line-height: 1.5;\n margin: 0 0 16px;\n}\n\n.gh-post-card-footer {\n padding-top: 1em;\n border-top: 1px solid var(--border, #e4e4e7);\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 4px 12px;\n font-size: var(--ghcn-text-meta, 13px);\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-post-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); }\n.gh-post-card-reading-time { color: var(--muted-foreground); }\n.gh-post-card-separator { color: color-mix(in srgb, var(--muted-foreground) 40%, transparent); }\n.gh-post-card-author { display: flex; align-items: center; gap: 0.5em; font-weight: 500; }\n.gh-post-card:focus-visible, :where(.gh-post-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.gh-post-card-image:focus-visible { outline-offset: -3px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"name": "post-grid.css",
|
|
26
26
|
"type": "style",
|
|
27
27
|
"target": "assets/css/components/post-grid.css",
|
|
28
|
-
"content": ".ghcn-post-grid { font-size: 16px; color: var(--foreground); margin-
|
|
28
|
+
"content": ".ghcn-post-grid { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-post-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); }\n.ghcn-post-grid__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-post-grid__grid > * { min-width: 0; }\n.ghcn-post-grid__empty { color: var(--muted-foreground); }"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
"styleSlots": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "post-header.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/post-header.css",
|
|
18
|
-
"content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box;
|
|
18
|
+
"content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); text-align: center; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; max-width: 24ch; margin: 12px auto; }\n.ghcn-post-header__excerpt { max-width: 60ch; margin: 12px auto; color: var(--muted-foreground); font-size: var(--ghcn-text-body, 16px); }\n.ghcn-post-header__meta, .ghcn-post-header__author { display: flex; align-items: center; justify-content: center; gap: 0.625em; }\n.ghcn-post-header__meta { flex-wrap: wrap; color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); }\n.ghcn-post-header__author { color: var(--foreground); font-weight: 700; text-decoration: none; }\n.ghcn-post-header__author .ghcn-avatar { width: 2em; height: 2em; }\n.ghcn-post-header__media { margin: var(--ghcn-section-gap, 20px) 0 0; }\n.ghcn-post-header__image { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 560px; border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); object-fit: cover; }\n.ghcn-post-header__media figcaption { margin-top: 0.75em; color: var(--muted-foreground); font-size: 0.75em; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "post-navigation.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/post-navigation.css",
|
|
18
|
-
"content": "\n.ghcn-post-navigation { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:
|
|
18
|
+
"content": "\n.ghcn-post-navigation { 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); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-post-navigation:empty { display: none; }\n.ghcn-post-navigation__link { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); display: flex; flex-direction: column; gap: 4px; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); text-decoration: none; }\n.ghcn-post-navigation__link--next { grid-column: 2; text-align: right; }\n.ghcn-post-navigation__label { font-size: var(--ghcn-text-meta, 13px); color: var(--muted-foreground); }\n.ghcn-post-navigation__title { font-weight: 600; overflow-wrap: anywhere; }\n.ghcn-post-navigation__link:hover .ghcn-post-navigation__title { text-decoration: underline; }\n.ghcn-post-navigation__link:focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media(max-width:620px) { .ghcn-post-navigation { grid-template-columns: 1fr; } .ghcn-post-navigation__link--next { grid-column: 1; } }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"name": "pricing-table.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/pricing-table.hbs",
|
|
12
|
-
"content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, buttonClass, cardTitleClass, descriptionClass, priceClass, benefitsClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Pricing Table | Usage: {{> \"components/pricing-table\"}} --}}\n{{#if @site.members_enabled}}\n{{#unless @site.members_invite_only}}\n{{#if @site.allow_self_signup}}\n<section class=\"gh-pricing{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Membership plans\">\n <h2 class=\"gh-pricing-title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if title}}{{title}}{{else}}Choose your membership{{/if}}</h2>\n <div class=\"gh-pricing-grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#get \"tiers\" filter=\"visibility:public+active:true\" include=\"monthly_price,yearly_price,benefits\"}}\n {{#foreach tiers}}\n {{#match type \"free\"}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n
|
|
12
|
+
"content": "{{!-- Styling parameters: class, titleClass, gridClass, cardClass, buttonClass, cardTitleClass, descriptionClass, priceClass, benefitsClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Pricing Table | Usage: {{> \"components/pricing-table\"}} --}}\n{{#if @site.members_enabled}}\n{{#unless @site.members_invite_only}}\n{{#if @site.allow_self_signup}}\n<section class=\"gh-pricing{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Membership plans\">\n <h2 class=\"gh-pricing-title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if title}}{{title}}{{else}}Choose your membership{{/if}}</h2>\n <div class=\"gh-pricing-grid{{#if ghostcnStyles.gridClass}} {{ghostcnStyles.gridClass}}{{/if}}\">\n {{#get \"tiers\" filter=\"visibility:public+active:true\" include=\"monthly_price,yearly_price,benefits\"}}\n {{#foreach tiers}}\n {{#match type \"free\"}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}}\">\n <header class=\"gh-pricing-card__header\">\n <h3 class=\"gh-pricing-card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\">{{name}}</h3>\n {{#if description}}<p class=\"gh-pricing-description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{/if}}\n </header>\n <div class=\"gh-pricing-card__rates\"><p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">Free</p></div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/if}}\n <div class=\"gh-pricing-actions\">\n {{#if @member}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/account\" data-portal=\"account\">Manage account</a>\n {{else}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"#/portal/signup/free\" data-portal=\"signup/free\">Join free</a>{{/if}}</div>\n</article>\n {{else}}\n {{#if @site.paid_members_enabled}}\n <article class=\"gh-pricing-card{{#if ghostcnStyles.cardClass}} {{ghostcnStyles.cardClass}}{{/if}} gh-pricing-card--paid\">\n <header class=\"gh-pricing-card__header\">\n <h3 class=\"gh-pricing-card-title{{#if ghostcnStyles.cardTitleClass}} {{ghostcnStyles.cardTitleClass}}{{/if}}\">{{name}}</h3>\n {{#if description}}<p class=\"gh-pricing-description{{#if ghostcnStyles.descriptionClass}} {{ghostcnStyles.descriptionClass}}{{/if}}\">{{description}}</p>{{/if}}\n </header>\n <div class=\"gh-pricing-card__rates\">\n {{#if monthly_price}}\n <p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">{{price monthly_price currency=currency}} <span>/ month</span></p>\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}} gh-pricing-price--alternate\">{{price yearly_price currency=currency}} <span>billed yearly</span></p>{{/if}}\n {{else}}\n {{#if yearly_price}}<p class=\"gh-pricing-price{{#if ghostcnStyles.priceClass}} {{ghostcnStyles.priceClass}}{{/if}}\">{{price yearly_price currency=currency}} <span>/ year</span></p>{{/if}}\n {{/if}}</div>\n {{#if benefits}}\n <ul class=\"gh-pricing-benefits{{#if ghostcnStyles.benefitsClass}} {{ghostcnStyles.benefitsClass}}{{/if}}\" role=\"list\">{{#foreach benefits}}<li>{{this}}</li>{{/foreach}}</ul>\n {{/if}}\n <div class=\"gh-pricing-actions\">\n {{#if @member}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">{{#if @member.paid}}Manage plan{{else}}Upgrade membership{{/if}}</a>\n {{else}}\n {{#if monthly_price}}\n <a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/monthly\" data-portal=\"signup/{{id}}/monthly\">Subscribe monthly</a>\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} gh-pricing-alternate\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\">Subscribe yearly</a>{{/if}}\n {{else}}\n {{#if yearly_price}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/yearly\" data-portal=\"signup/{{id}}/yearly\">Subscribe yearly</a>{{/if}}\n {{/if}}\n {{/if}}</div>\n</article>\n {{/if}}\n {{/match}}\n {{/foreach}}\n {{else}}\n <p>Membership plans are currently unavailable.</p>\n {{/get}}\n </div>\n</section>\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "pricing-table.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/pricing-table.css",
|
|
18
|
-
"content": "/* ghostcn: live membership pricing */\n.gh-pricing { box-sizing: border-box; width:
|
|
18
|
+
"content": "/* ghostcn: live membership pricing */\n.gh-pricing { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 960px); margin-inline: auto; }\n.gh-pricing *, .gh-pricing *::before, .gh-pricing *::after { box-sizing: border-box; }\n.gh-pricing-title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); text-align: center; }\n.gh-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.gh-pricing-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); display: flex; flex-direction: column; gap: 16px; padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.gh-pricing-card--paid { border-color: color-mix(in srgb, var(--foreground) 24%, var(--border)); }\n.gh-pricing-card:only-child { width: min(100%, 440px); justify-self: center; }\n.gh-pricing-card__header { display: grid; gap: 4px; }\n.gh-pricing-card__rates { display: grid; gap: 4px; }\n/* Follow the card's local foreground, not the page's dark/light tokens.\n A custom background must be paired with a readable foreground at the call site. */\n.gh-pricing-card-title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.gh-pricing-description { margin: 0; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-block-start: 1px solid var(--border); list-style: none; color: inherit; font-size: var(--ghcn-text-small, 14px); }\n.gh-pricing-benefits li { display: flex; align-items: baseline; gap: 10px; color: inherit; }\n.gh-pricing-benefits li::before { content: \"\"; flex: 0 0 5px; height: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }\n.gh-pricing-price { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; color: inherit; font-variant-numeric: tabular-nums; }\n.gh-pricing-price span { font-size: var(--ghcn-text-small, 14px); font-weight: 400; letter-spacing: normal; color: inherit; }\n.gh-pricing-price--alternate { font-size: var(--ghcn-text-small, 14px); font-weight: 600; line-height: 1.5; letter-spacing: normal; }\n.gh-pricing-actions { display: grid; align-content: start; gap: 4px; margin-block-start: auto; padding-block-start: 4px; }\n.gh-pricing-actions:empty, .gh-pricing-card__rates:empty { display: none; }\n:where(.gh-pricing-actions) .ghcn-button--outline { background: var(--background); }\n.gh-pricing-alternate { justify-self: center; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }\n@media (min-width: 640px) {\n :where(.gh-pricing-grid:has(.gh-pricing-price--alternate)) .gh-pricing-card__rates { min-block-size: calc(1.18 * var(--ghcn-title-section, clamp(24px, 3vw, 32px)) + 25px); align-content: start; }\n :where(.gh-pricing-grid:has(.gh-pricing-alternate)) .gh-pricing-actions { min-block-size: calc(2 * var(--ghcn-control-height, 40px) + 8px); }\n}\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "related-posts.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/related-posts.css",
|
|
18
|
-
"content": "\n.ghcn-related { margin-block:
|
|
18
|
+
"content": "\n.ghcn-related { 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); }\n.ghcn-related__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-related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-related__card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); overflow: hidden; }\n.ghcn-related__image-link { display: block; aspect-ratio: 16/9; overflow: hidden; }\n.ghcn-related__image { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-related__content { padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); }\n.ghcn-related__card-title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0 0 8px; }\n.ghcn-related__card-title a { color: inherit; text-decoration: none; }\n.ghcn-related__card-title a:hover { text-decoration: underline; }\n.ghcn-related__description { color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); margin: 0; }\n.ghcn-related a:focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "site-footer.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/site-footer.css",
|
|
18
|
-
"content": "/* ghostcn: Site Footer */\n.ghcn-footer { box-sizing: border-box; border-top: 1px solid var(--border); color: var(--foreground); background: var(--card); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-footer *, .ghcn-footer *::before, .ghcn-footer *::after { box-sizing: border-box; }\n.ghcn-footer__inner { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; gap:
|
|
18
|
+
"content": "/* ghostcn: Site Footer */\n.ghcn-footer { box-sizing: border-box; border-top: 1px solid var(--border); color: var(--foreground); background: var(--card); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-footer *, .ghcn-footer *::before, .ghcn-footer *::after { box-sizing: border-box; }\n.ghcn-footer__inner { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; gap: var(--ghcn-section-gap, 20px); padding-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); }\n.ghcn-footer__brand a { color: var(--foreground); font-size: 1.125em; font-weight: 800; text-decoration: none; }\n.ghcn-footer__brand p { max-width: 30em; margin: 0.5em 0 0; color: var(--muted-foreground); font-size: 0.875em; }\n.ghcn-footer .nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5em 1.5em; margin: 0; padding: 0; list-style: none; }\n.ghcn-footer a { color: var(--muted-foreground); font-size: 0.875em; text-decoration: none; }\n.ghcn-footer a:hover { color: var(--foreground); }\n.ghcn-footer__social { display: flex; flex-direction: column; gap: 0.5em; }\n.ghcn-footer__legal { display: flex; justify-content: space-between; gap: 1em; border-top: 1px solid var(--border); padding-block: 1.25em; color: var(--muted-foreground); font-size: 0.75em; }\n@media (max-width: 720px) { .ghcn-footer__inner { grid-template-columns: 1fr; gap: 2em; } .ghcn-footer__social { flex-direction: row; flex-wrap: wrap; } }\n@media (max-width: 480px) { .ghcn-footer__legal { align-items: flex-start; flex-direction: column; } }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "site-header.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/site-header.css",
|
|
18
|
-
"content": "/* ghostcn: Site Header */\n.ghcn-header { box-sizing: border-box; position: relative; z-index: 30; border-bottom: 1px solid var(--border); color: var(--foreground); background: color-mix(in srgb, var(--background) 92%, transparent); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-header *, .ghcn-header *::before, .ghcn-header *::after { box-sizing: border-box; }\n.ghcn-header__inner { display: flex; min-height:
|
|
18
|
+
"content": "/* ghostcn: Site Header */\n.ghcn-header { box-sizing: border-box; position: relative; z-index: 30; border-bottom: 1px solid var(--border); color: var(--foreground); background: color-mix(in srgb, var(--background) 92%, transparent); font-family: inherit; font-size: 16px; line-height: 1.5; isolation: isolate; }\n.ghcn-header *, .ghcn-header *::before, .ghcn-header *::after { box-sizing: border-box; }\n.ghcn-header__inner { display: flex; min-height: 64px; align-items: center; gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-header__brand { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--foreground); font-size: 1.125em; font-weight: 800; letter-spacing: -0.025em; text-decoration: none; }\n.ghcn-header__brand img { display: block; width: auto; max-width: 11em; max-height: 2.25em; }\n.ghcn-header__nav { min-width: 0; flex: 1; }\n.ghcn-header .nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25em; margin: 0; padding: 0; list-style: none; }\n.ghcn-header .nav a, .ghcn-header__signin { color: var(--muted-foreground); font-size: 0.875em; font-weight: 600; text-decoration: none; }\n.ghcn-header .nav a:hover, .ghcn-header .nav-current a, .ghcn-header__signin:hover { color: var(--foreground); }\n.ghcn-header__actions { display: flex; align-items: center; gap: 0.75em; }\n.ghcn-header .gh-search-icon:focus-visible { border-radius: var(--radius); box-shadow: 0 0 0 2px var(--ring); }\n.ghcn-header__mobile { display: none; margin-left: auto; }\n.ghcn-header__mobile summary { list-style: none; }\n.ghcn-header__mobile summary::-webkit-details-marker { display: none; }\n.ghcn-header__panel { 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); position: absolute; top: calc(100% + 8px); right: 16px; left: 16px; padding: 16px; background: var(--popover); color: var(--popover-foreground); box-shadow: 0 8px 24px #0002; }\n.ghcn-header__panel .nav { align-items: stretch; flex-direction: column; gap: 0.25em; }\n.ghcn-header__panel .nav a { display: block; border-radius: var(--radius); padding: 0.625em 0.75em; }\n.ghcn-header__panel .nav a:hover { background: var(--muted); }\n.ghcn-header__mobile-actions { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.5em; margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--border); }\n@media (max-width: 800px) { .ghcn-header__nav, .ghcn-header__actions { display: none; } .ghcn-header__mobile { display: block; } }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
"name": "table-of-contents.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/table-of-contents.hbs",
|
|
12
|
-
"content": "{{!-- Styling parameters: class, titleClass, listClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- add manages the deferred script in default.hbs. Set contentSelector for existing themes. --}}\n<nav class=\"ghcn-toc{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-toc data-toc-content=\"{{#if contentSelector}}{{contentSelector}}{{else}}.ghcn-article-content{{/if}}\" data-link-class=\"{{linkClass}}\" aria-label=\"On this page\" hidden>\n <h2 class=\"ghcn-toc__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if heading}}{{heading}}{{else}}On this page{{/if}}</h2>\n <ol class=\"ghcn-toc__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\" data-toc-list></ol>\n</nav>\n{{/with}}"
|
|
12
|
+
"content": "{{!-- Styling parameters: class, titleClass, listClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- add manages the deferred script in default.hbs. Set contentSelector for existing themes. --}}\n<nav class=\"ghcn-toc{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-toc data-toc-content=\"{{#if contentSelector}}{{contentSelector}}{{else}}.ghcn-article-content{{/if}}\" data-link-class=\"{{linkClass}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}On this page{{/if}}\" hidden>\n <h2 class=\"ghcn-toc__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><path d=\"M5 5h11M5 10h8M5 15h5M2 5h.01M2 10h.01M2 15h.01\"/></svg>{{#if heading}}{{heading}}{{else}}On this page{{/if}}</h2>\n <ol class=\"ghcn-toc__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\" data-toc-list></ol>\n</nav>\n{{/with}}"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "table-of-contents.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/table-of-contents.css",
|
|
18
|
-
"content": "\n.ghcn-toc {
|
|
18
|
+
"content": "\n.ghcn-toc { 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); }\n.ghcn-toc[hidden] { display: none; }\n.ghcn-toc__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted-foreground); font: inherit; font-size: var(--ghcn-text-small, 14px); font-weight: 600; }\n.ghcn-toc__title svg { flex: none; }\n.ghcn-toc__list { list-style: none; padding: 0; margin: 0; border-inline-start: 1px solid var(--border); }\n.ghcn-toc__item { margin: 0; padding: 0; }\n.ghcn-toc__link { position: relative; display: block; padding: 7px 12px; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }\n:where(.ghcn-toc__item--nested) > .ghcn-toc__link { padding-inline-start: 26px; }\n.ghcn-toc__link:hover, .ghcn-toc__link:where([aria-current=\"location\"]) { color: var(--foreground); }\n.ghcn-toc__link:where([aria-current=\"location\"]) { font-weight: 600; }\n.ghcn-toc__link:where([aria-current=\"location\"])::before { content: \"\"; position: absolute; inset-block: 4px; inset-inline-start: -1px; width: 2px; border-radius: 2px; background: currentColor; }\n.ghcn-toc__link:focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n:where([data-ghcn-toc-heading]) { scroll-margin-block-start: var(--ghcn-toc-offset, 80px); }\n@media (min-width: 1024px) {\n .ghcn-toc:where(.ghcn-toc--sticky) { position: sticky; inset-block-start: var(--ghcn-toc-top, 80px); align-self: start; margin-block-start: 0; }\n :where(.ghcn-toc--sticky) .ghcn-toc__list { max-block-size: max(120px, 100dvh - var(--ghcn-toc-top, 80px) - 56px); overflow-y: auto; }\n :where(.ghcn-toc--sticky) .ghcn-toc__link:focus-visible { outline-offset: -2px; }\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "table-of-contents.js",
|
|
22
22
|
"type": "js",
|
|
23
23
|
"target": "assets/js/components/table-of-contents.js",
|
|
24
|
-
"content": "/* ghostcn table of contents: no dependencies, no HTML injection, repeat-safe. */\n(() => {\n const init = () => {\n document.querySelectorAll('[data-ghcn-toc]').forEach(nav => {\n if (nav.dataset.ghcnTocReady) return;\n let content;\n try { content = document.querySelector(nav.dataset.tocContent); } catch { return; }\n if (!content) return;\n // Editor card UI titles are not article sections
|
|
24
|
+
"content": "/* ghostcn table of contents: no dependencies, no HTML injection, repeat-safe. */\n(() => {\n function setCurrent(group, index) {\n if (index === group.current) return;\n group.views.forEach(links => {\n links[group.current]?.removeAttribute('aria-current');\n links[index]?.setAttribute('aria-current', 'location');\n });\n group.current = index;\n }\n\n function currentFromScroll(group) {\n const { headings } = group;\n const offset = Math.max(0, parseFloat(getComputedStyle(headings[0]).scrollMarginBlockStart) || 0);\n const limit = Math.min(offset + 4, window.innerHeight / 2);\n let index = 0;\n for (let i = 0; i < headings.length; i++) {\n if (headings[i].getBoundingClientRect().top > limit) break;\n index = i;\n }\n // The final heading may never reach the activation line on a short section.\n const page = document.scrollingElement;\n if (page && page.scrollHeight > page.clientHeight + 2 &&\n page.scrollTop + page.clientHeight >= page.scrollHeight - 2 &&\n headings.at(-1).getBoundingClientRect().top < window.innerHeight) {\n index = headings.length - 1;\n }\n setCurrent(group, index);\n }\n\n const init = () => {\n const groups = new Map();\n const used = new Set([...document.querySelectorAll('[id]')].map(el => el.id));\n document.querySelectorAll('[data-ghcn-toc]').forEach(nav => {\n if (nav.dataset.ghcnTocReady) return;\n let content;\n try { content = document.querySelector(nav.dataset.tocContent); } catch { return; }\n if (!content) return;\n const list = nav.querySelector('[data-toc-list]');\n if (!list) return;\n let group = groups.get(content);\n if (!group) {\n // Editor card UI titles are not article sections.\n const headings = [...content.querySelectorAll('h2, h3')]\n .filter(h => h.textContent.trim() && !h.closest('.kg-card, [hidden], [data-ghcn-toc]'));\n if (headings.length < 2) return;\n headings.forEach((heading, index) => {\n if (!heading.id) {\n const base = 'ghcn-' + (heading.textContent.toLowerCase().normalize('NFKD').replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'section-' + (index + 1));\n let id = base, suffix = 2;\n while (used.has(id)) id = base + '-' + suffix++;\n heading.id = id; used.add(id);\n }\n heading.setAttribute('data-ghcn-toc-heading', '');\n });\n group = { headings, views: [], current: -1, jumpY: null };\n groups.set(content, group);\n }\n const links = group.headings.map((heading, index) => {\n const item = document.createElement('li');\n item.className = 'ghcn-toc__item' + (heading.tagName === 'H3' ? ' ghcn-toc__item--nested' : '');\n const link = document.createElement('a');\n link.className = 'ghcn-toc__link';\n if (nav.dataset.linkClass) nav.dataset.linkClass.split(/\\s+/).filter(Boolean).forEach(value => link.classList.add(value));\n link.href = '#' + encodeURIComponent(heading.id);\n link.textContent = heading.textContent.trim();\n link.addEventListener('click', event => {\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n heading.scrollIntoView({ behavior: 'instant', block: 'start' });\n if (!heading.hasAttribute('tabindex')) {\n heading.setAttribute('tabindex', '-1');\n heading.addEventListener('blur', () => heading.removeAttribute('tabindex'), { once: true });\n }\n heading.focus({ preventScroll: true });\n try { history.replaceState(null, '', '#' + encodeURIComponent(heading.id)); } catch {}\n group.jumpY = window.scrollY;\n setCurrent(group, index);\n });\n item.append(link); list.append(item);\n return link;\n });\n group.views.push(links);\n nav.dataset.ghcnTocReady = 'true'; nav.hidden = false;\n });\n if (!groups.size) return;\n\n function syncHash() {\n let id = '';\n try { id = decodeURIComponent(location.hash.slice(1)); } catch {}\n groups.forEach(group => {\n const index = group.headings.findIndex(heading => heading.id === id);\n group.jumpY = index < 0 ? null : window.scrollY;\n if (index < 0) currentFromScroll(group);\n else setCurrent(group, index);\n });\n }\n\n let frame = 0;\n const schedule = () => {\n if (frame) return;\n frame = requestAnimationFrame(() => {\n frame = 0;\n groups.forEach(group => {\n if (group.jumpY !== null && Math.abs(group.jumpY - window.scrollY) < 2) return;\n group.jumpY = null;\n currentFromScroll(group);\n });\n });\n };\n syncHash();\n window.addEventListener('scroll', schedule, { passive: true });\n window.addEventListener('resize', schedule);\n window.addEventListener('load', schedule, { once: true });\n window.addEventListener('hashchange', syncHash);\n };\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true }); else init();\n})();"
|
|
25
25
|
}
|
|
26
26
|
],
|
|
27
27
|
"gscan": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"name": "tag-grid.css",
|
|
36
36
|
"type": "style",
|
|
37
37
|
"target": "assets/css/components/tag-grid.css",
|
|
38
|
-
"content": ".ghcn-tag-grid { font-size: 16px; color: var(--foreground); margin-
|
|
38
|
+
"content": ".ghcn-tag-grid { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-tag-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); }\n.ghcn-tag-grid__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--ghcn-grid-gap, 16px); }\n.ghcn-tag-grid__grid > * { min-width: 0; }\n.ghcn-tag-grid__empty { color: var(--muted-foreground); }\n:where(.ghcn-tag-grid__grid) > .ghcn-ui-card { display: flex; flex-direction: column; }\n:where(.ghcn-tag-grid__grid) .ghcn-ui-card__content { margin-top: auto; }\n"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
"styleSlots": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"name": "tag-list.css",
|
|
16
16
|
"type": "style",
|
|
17
17
|
"target": "assets/css/components/tag-list.css",
|
|
18
|
-
"content": "\n.ghcn-tag-list { margin-block: 1.
|
|
18
|
+
"content": "\n.ghcn-tag-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); }\n.ghcn-tag-list__items { display: flex; flex-wrap: wrap; gap: .5em; list-style: none; padding: 0; margin: 0; }\n.ghcn-tag-list__link { display: block; padding: 5px 10px; background: var(--secondary); color: var(--secondary-foreground); border: 1px solid var(--border); border-radius: 999px; font-size: var(--ghcn-text-meta, 13px); font-weight: 600; text-decoration: none; }\n.ghcn-tag-list__link:hover { background: var(--secondary); text-decoration: underline; }\n.ghcn-tag-list__link:focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"section-space": "clamp(24px, 4vw, 48px)",
|
|
3
|
+
"section-gap": "20px",
|
|
4
|
+
"grid-gap": "16px",
|
|
5
|
+
"panel-padding": "clamp(16px, 3vw, 24px)",
|
|
6
|
+
"panel-radius": "min(var(--radius, 8px), 24px)",
|
|
7
|
+
"title-display": "clamp(32px, 5vw, 56px)",
|
|
8
|
+
"title-section": "clamp(24px, 3vw, 32px)",
|
|
9
|
+
"title-card": "20px",
|
|
10
|
+
"text-body": "16px",
|
|
11
|
+
"text-small": "14px",
|
|
12
|
+
"text-meta": "13px",
|
|
13
|
+
"control-height": "40px",
|
|
14
|
+
"control-padding": "8px 14px",
|
|
15
|
+
"control-gap": "8px",
|
|
16
|
+
"control-radius": "var(--radius, 8px)"
|
|
17
|
+
}
|
|
@@ -9,11 +9,19 @@ exports.previewInvocation = previewInvocation;
|
|
|
9
9
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
10
10
|
// Synthetic data only. This is shared by static docs and the local playground,
|
|
11
11
|
// never used by production themes, never connected to Ghost/Stripe/email APIs.
|
|
12
|
-
|
|
12
|
+
// Text-free artwork survives the lead, thumbnail and article crops.
|
|
13
|
+
const editorialImage = (background, ink, motif) => 'data:image/svg+xml,' + encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="675" viewBox="0 0 1200 675"><rect width="1200" height="675" fill="${background}"/><g fill="${ink}">${motif}</g></svg>`);
|
|
14
|
+
exports.demoImage = editorialImage('#ded4c3', '#38362f', '<path d="M315 475V220L560 120l205 100v255L560 575z"/><path d="M560 170v348l160-71V250z" fill="#b68f74"/><path d="M359 249l157-66v324l-157-55z" fill="#f4ece1"/><path d="M817 232v245l76-34V272z" fill="#9a8c74"/>');
|
|
15
|
+
const secondImage = editorialImage('#cbd1c5', '#374738', '<circle cx="600" cy="337" r="210"/><path d="M380 336h440v35H380z" fill="#f0ede1"/><circle cx="600" cy="337" r="116" fill="#aab4a1"/><path d="M573 121h54v431h-54z" fill="#677c65" opacity=".8"/>');
|
|
16
|
+
const thirdImage = editorialImage('#dbc7bb', '#6a483e', '<path d="M334 454l140-235 127 208 126-208 140 235z"/><path d="M312 485h576v40H312z" fill="#9c6956"/><circle cx="603" cy="166" r="44" fill="#f5e4cd"/>');
|
|
13
17
|
exports.demoAuthor = { name: 'Alex Reader', url: '/author/alex/', bio: 'Writing about independent publishing, thoughtful design, and building a home for your readers.', location: 'Everywhere', count: { posts: 12 } };
|
|
14
18
|
const tags = [{ name: 'Publishing', description: 'Stories about independent publishing.', url: '/tag/publishing/', visibility: 'public' }, { name: 'Design', description: 'The details that make it yours.', url: '/tag/design/', visibility: 'public' }];
|
|
15
|
-
exports.demoPost = { title: 'A home for independent ideas', url: '/a-home-for-independent-ideas/', excerpt: 'Good stories deserve a place of their own. Build a publication around your ideas, your community, and your voice.', custom_excerpt: 'Good stories deserve a place of their own.', feature_image: exports.demoImage, feature_image_alt: '
|
|
16
|
-
exports.demoPosts = [
|
|
19
|
+
exports.demoPost = { title: 'A home for independent ideas', url: '/a-home-for-independent-ideas/', excerpt: 'Good stories deserve a place of their own. Build a publication around your ideas, your community, and your voice.', custom_excerpt: 'Good stories deserve a place of their own.', feature_image: exports.demoImage, feature_image_alt: 'An abstract illustration of folded paper', primary_author: exports.demoAuthor, primary_tag: tags[0], tags, access: true };
|
|
20
|
+
exports.demoPosts = [
|
|
21
|
+
exports.demoPost,
|
|
22
|
+
{ ...exports.demoPost, title: 'Make room for your readers', url: '/make-room-for-your-readers/', feature_image: secondImage, feature_image_alt: 'An abstract illustration of intersecting circles', excerpt: 'A thoughtful reading experience starts with space for the story and a clear path to what comes next.' },
|
|
23
|
+
{ ...exports.demoPost, title: 'The details that make it yours', url: '/the-details-that-make-it-yours/', feature_image: thirdImage, feature_image_alt: 'An abstract illustration of two hills and the sun', excerpt: 'The small choices that make your publication feel unmistakably yours.' },
|
|
24
|
+
];
|
|
17
25
|
const tiers = [{ id: 'demo-free', type: 'free', name: 'Reader', description: 'Follow the publication.', benefits: ['New posts in your inbox'] }, { id: 'demo-paid', type: 'paid', name: 'Supporter', description: 'Support independent writing.', currency: 'USD', monthly_price: 500, yearly_price: 5000, benefits: ['Everything in Reader', 'Members-only stories'] }];
|
|
18
26
|
exports.previewStates = ['visitor', 'free', 'paid', 'disabled', 'invite', 'restricted'];
|
|
19
27
|
exports.previewDemoContext = { ...exports.demoPost, posts: exports.demoPosts, pagination: { page: 2, pages: 4, prev: 1, next: 3 } };
|
|
@@ -48,10 +48,10 @@ img { max-width: 100%; }
|
|
|
48
48
|
iframe[title="comments-frame"] { color-scheme: normal; }
|
|
49
49
|
h1, h2, h3, h4, h5, h6 { font-family: var(--gh-font-heading, inherit); }
|
|
50
50
|
.ghcn-main { min-height: 65vh; }
|
|
51
|
-
.ghcn-page-heading { width: min(100% -
|
|
52
|
-
.ghcn-page-heading h1 { margin: 0; font-size:
|
|
51
|
+
.ghcn-page-heading { width: min(100% - 32px, 1152px); margin: var(--ghcn-section-space) auto var(--ghcn-section-gap); }
|
|
52
|
+
.ghcn-page-heading h1 { margin: 0; font-size: var(--ghcn-title-display); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; text-wrap: balance; }
|
|
53
53
|
.ghcn-page-heading p { max-width: 42rem; margin: 1rem 0 0; color: var(--muted-foreground); font-size: 1.125rem; }
|
|
54
|
-
.ghcn-
|
|
54
|
+
.ghcn-starter-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--ghcn-grid-gap); width: min(100% - 32px, 1152px); margin: var(--ghcn-section-space) auto; }
|
|
55
55
|
.ghcn-article { width: min(100% - 2rem, 46rem); margin: 0 auto 4rem; }
|
|
56
56
|
.ghcn-article-content { color: var(--foreground); font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: clamp(1.0625rem, 2vw, 1.1875rem); }
|
|
57
57
|
.ghcn-article-content > * { margin-block: 0 1.5em; }
|
|
@@ -61,8 +61,6 @@ h1, h2, h3, h4, h5, h6 { font-family: var(--gh-font-heading, inherit); }
|
|
|
61
61
|
.ghcn-article-content .kg-width-wide { width: min(72rem, 100vw - 2rem); max-width: none; margin-left: 50%; transform: translateX(-50%); }
|
|
62
62
|
.ghcn-article-content .kg-width-full { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
|
|
63
63
|
.ghcn-empty { width: min(100% - 2rem, 42rem); margin: 4rem auto; padding: 3rem; border: 1px dashed var(--border); border-radius: min(var(--radius), 1rem); color: var(--muted-foreground); text-align: center; }
|
|
64
|
-
@media (max-width: 900px) { .ghcn-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
|
|
65
|
-
@media (max-width: 620px) { .ghcn-post-grid { grid-template-columns: 1fr; } }
|
|
66
64
|
`;
|
|
67
65
|
}
|
|
68
66
|
function defaultTemplate(_colorScheme) {
|
|
@@ -100,7 +98,7 @@ function indexTemplate(options) {
|
|
|
100
98
|
</header>
|
|
101
99
|
|
|
102
100
|
{{#if posts}}
|
|
103
|
-
<section class="ghcn-
|
|
101
|
+
<section class="ghcn-starter-posts" aria-label="Latest posts">
|
|
104
102
|
{{#foreach posts}}{{> "components/post-card"}}{{/foreach}}
|
|
105
103
|
</section>
|
|
106
104
|
{{else}}
|
|
@@ -146,7 +144,7 @@ function archiveTemplate(kind) {
|
|
|
146
144
|
return `{{!< default}}
|
|
147
145
|
|
|
148
146
|
${header}
|
|
149
|
-
<section class="ghcn-
|
|
147
|
+
<section class="ghcn-starter-posts" aria-label="Posts">
|
|
150
148
|
{{#foreach posts}}{{> "components/post-card"}}{{/foreach}}
|
|
151
149
|
</section>
|
|
152
150
|
{{pagination}}
|
package/dist/utils/theme.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type BaseColor = 'zinc' | 'slate' | 'stone' | 'gray' | 'neutral';
|
|
2
|
-
export type AccentColor = 'ghost' | 'zinc' | 'indigo' | 'violet' | 'blue' | 'emerald' | 'rose' | 'orange';
|
|
3
|
-
export type Radius = '0' | '0.25rem' | '0.5rem' | '0.75rem' | '1rem' | '9999px';
|
|
1
|
+
export type BaseColor = 'doks' | 'zinc' | 'slate' | 'stone' | 'gray' | 'neutral';
|
|
2
|
+
export type AccentColor = 'doks' | 'ghost' | 'zinc' | 'indigo' | 'violet' | 'blue' | 'emerald' | 'rose' | 'orange';
|
|
3
|
+
export type Radius = '0' | '0.25rem' | '0.5rem' | '0.625rem' | '0.75rem' | '1rem' | '9999px';
|
|
4
4
|
export interface ThemeConfig {
|
|
5
5
|
style: 'tailwind' | 'css';
|
|
6
6
|
baseColor: BaseColor;
|
package/dist/utils/theme.js
CHANGED
|
@@ -1,9 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ACCENT_COLORS = exports.BASE_PALETTES = void 0;
|
|
4
7
|
exports.generateThemeCss = generateThemeCss;
|
|
5
8
|
const styles_1 = require("./styles");
|
|
9
|
+
const design_defaults_json_1 = __importDefault(require("./design-defaults.json"));
|
|
6
10
|
exports.BASE_PALETTES = {
|
|
11
|
+
doks: {
|
|
12
|
+
light: {
|
|
13
|
+
background: '#f6f4f0',
|
|
14
|
+
foreground: '#0a0a0a',
|
|
15
|
+
card: '#ffffff',
|
|
16
|
+
cardForeground: '#0a0a0a',
|
|
17
|
+
popover: '#ffffff',
|
|
18
|
+
popoverForeground: '#0a0a0a',
|
|
19
|
+
secondary: '#f5f5f5',
|
|
20
|
+
secondaryForeground: '#171717',
|
|
21
|
+
muted: '#f5f5f5',
|
|
22
|
+
mutedForeground: '#68645f',
|
|
23
|
+
accent: '#f5f5f5',
|
|
24
|
+
accentForeground: '#171717',
|
|
25
|
+
destructive: '#b91c1c',
|
|
26
|
+
destructiveForeground: '#ffffff',
|
|
27
|
+
border: '#e5e5e5',
|
|
28
|
+
input: '#aaa6a0',
|
|
29
|
+
ring: '#68645f'
|
|
30
|
+
},
|
|
31
|
+
dark: {
|
|
32
|
+
background: '#171614',
|
|
33
|
+
foreground: '#fafafa',
|
|
34
|
+
card: '#22211e',
|
|
35
|
+
cardForeground: '#fafafa',
|
|
36
|
+
popover: '#22211e',
|
|
37
|
+
popoverForeground: '#fafafa',
|
|
38
|
+
secondary: '#333333',
|
|
39
|
+
secondaryForeground: '#fafafa',
|
|
40
|
+
muted: '#333333',
|
|
41
|
+
mutedForeground: '#b4afa8',
|
|
42
|
+
accent: '#333333',
|
|
43
|
+
accentForeground: '#fafafa',
|
|
44
|
+
destructive: '#fca5a5',
|
|
45
|
+
destructiveForeground: '#450a0a',
|
|
46
|
+
border: '#393835',
|
|
47
|
+
input: '#77736d',
|
|
48
|
+
ring: '#b4afa8'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
7
51
|
zinc: {
|
|
8
52
|
light: {
|
|
9
53
|
background: '#ffffff',
|
|
@@ -206,6 +250,10 @@ exports.BASE_PALETTES = {
|
|
|
206
250
|
}
|
|
207
251
|
};
|
|
208
252
|
exports.ACCENT_COLORS = {
|
|
253
|
+
doks: {
|
|
254
|
+
light: { primary: '#171717', primaryForeground: '#fafafa' },
|
|
255
|
+
dark: { primary: '#ededed', primaryForeground: '#171717' }
|
|
256
|
+
},
|
|
209
257
|
ghost: {
|
|
210
258
|
light: {
|
|
211
259
|
primary: 'var(--ghost-accent-color, #18181b)',
|
|
@@ -299,6 +347,7 @@ function generateThemeCss(config) {
|
|
|
299
347
|
--input: ${base.light.input};
|
|
300
348
|
--ring: ${accent.light.ring || base.light.ring};
|
|
301
349
|
--radius: ${radius};
|
|
350
|
+
${Object.entries(design_defaults_json_1.default).map(([name, value]) => ` --ghcn-${name}: ${value};`).join('\n')}
|
|
302
351
|
|
|
303
352
|
/* Ghost Native Compatibility Fallbacks */
|
|
304
353
|
--ghost-card-bg: var(--card);
|
|
@@ -347,17 +396,17 @@ function generateThemeCss(config) {
|
|
|
347
396
|
display: inline-flex;
|
|
348
397
|
align-items: center;
|
|
349
398
|
justify-content: center;
|
|
350
|
-
gap:
|
|
351
|
-
min-height:
|
|
399
|
+
gap: var(--ghcn-control-gap);
|
|
400
|
+
min-height: var(--ghcn-control-height);
|
|
352
401
|
border: 1px solid transparent;
|
|
353
|
-
border-radius: var(--radius);
|
|
354
|
-
padding:
|
|
402
|
+
border-radius: var(--ghcn-control-radius);
|
|
403
|
+
padding: var(--ghcn-control-padding);
|
|
355
404
|
color: var(--primary-foreground);
|
|
356
405
|
background: var(--primary);
|
|
357
406
|
font: inherit;
|
|
358
|
-
font-size:
|
|
407
|
+
font-size: var(--ghcn-text-small);
|
|
359
408
|
font-weight: 600;
|
|
360
|
-
line-height: 1;
|
|
409
|
+
line-height: 1.25;
|
|
361
410
|
text-decoration: none;
|
|
362
411
|
cursor: pointer;
|
|
363
412
|
transition: opacity 150ms ease, background-color 150ms ease, border-color 150ms ease;
|
|
@@ -373,38 +422,41 @@ function generateThemeCss(config) {
|
|
|
373
422
|
.ghcn-button--outline {
|
|
374
423
|
border-color: var(--border);
|
|
375
424
|
color: var(--foreground);
|
|
376
|
-
background:
|
|
425
|
+
background: transparent;
|
|
377
426
|
}
|
|
378
427
|
.ghcn-button--ghost {
|
|
379
428
|
color: var(--foreground);
|
|
380
429
|
background: transparent;
|
|
381
430
|
}
|
|
382
431
|
.ghcn-icon-button {
|
|
383
|
-
width:
|
|
432
|
+
width: var(--ghcn-control-height);
|
|
384
433
|
padding: 0;
|
|
385
434
|
}
|
|
386
435
|
.ghcn-input {
|
|
387
436
|
box-sizing: border-box;
|
|
388
|
-
min-height:
|
|
437
|
+
min-height: var(--ghcn-control-height);
|
|
389
438
|
width: 100%;
|
|
390
439
|
border: 1px solid var(--input);
|
|
391
|
-
border-radius: var(--radius);
|
|
392
|
-
padding:
|
|
440
|
+
border-radius: var(--ghcn-control-radius);
|
|
441
|
+
padding: var(--ghcn-control-padding);
|
|
393
442
|
color: var(--foreground);
|
|
394
443
|
background: var(--background);
|
|
395
444
|
font: inherit;
|
|
396
|
-
font-size:
|
|
445
|
+
font-size: var(--ghcn-text-small);
|
|
446
|
+
line-height: 1.25;
|
|
397
447
|
}
|
|
398
448
|
.ghcn-badge {
|
|
399
449
|
display: inline-flex;
|
|
400
450
|
align-items: center;
|
|
401
451
|
border-radius: 9999px;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
452
|
+
border: 1px solid var(--border);
|
|
453
|
+
padding: 3px 9px;
|
|
454
|
+
color: var(--secondary-foreground);
|
|
455
|
+
background: var(--secondary);
|
|
405
456
|
font-size: 12px;
|
|
406
|
-
font-weight:
|
|
407
|
-
line-height: 1;
|
|
457
|
+
font-weight: 600;
|
|
458
|
+
line-height: 1.25;
|
|
459
|
+
text-decoration: none;
|
|
408
460
|
}
|
|
409
461
|
.ghcn-avatar {
|
|
410
462
|
display: block;
|