ghostcn 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.js +10 -3
- package/dist/commands/diff.js +47 -5
- package/dist/commands/init.js +17 -8
- package/dist/commands/list.js +22 -4
- package/dist/registry/components/accordion.json +66 -0
- package/dist/registry/components/account-card.json +57 -0
- package/dist/registry/components/announcement-bar.json +79 -0
- package/dist/registry/components/archive-header.json +1 -1
- package/dist/registry/components/author-card.json +2 -2
- package/dist/registry/components/author-list.json +1 -1
- package/dist/registry/components/author-stack.json +63 -0
- package/dist/registry/components/avatar.json +62 -0
- package/dist/registry/components/back-to-top.json +72 -0
- package/dist/registry/components/breadcrumbs.json +59 -0
- package/dist/registry/components/button.json +1 -1
- package/dist/registry/components/callout.json +56 -0
- package/dist/registry/components/checkbox.json +82 -0
- package/dist/registry/components/code-copy.json +52 -0
- package/dist/registry/components/comments-section.json +56 -0
- package/dist/registry/components/dialog.json +83 -0
- package/dist/registry/components/dropdown.json +85 -0
- package/dist/registry/components/empty-state.json +65 -0
- package/dist/registry/components/error-card.json +74 -0
- package/dist/registry/components/faq-section.json +83 -0
- package/dist/registry/components/featured-posts.json +2 -2
- package/dist/registry/components/hero.json +89 -0
- package/dist/registry/components/image-lightbox.json +44 -0
- package/dist/registry/components/input.json +8 -2
- package/dist/registry/components/magazine-grid.json +62 -0
- package/dist/registry/components/member-cta.json +1 -1
- package/dist/registry/components/mobile-dock.json +69 -0
- package/dist/registry/components/newsletter-form.json +12 -3
- package/dist/registry/components/pagination.json +2 -2
- package/dist/registry/components/post-card.json +2 -2
- package/dist/registry/components/post-grid.json +2 -2
- package/dist/registry/components/post-header.json +2 -2
- package/dist/registry/components/post-list.json +62 -0
- package/dist/registry/components/pricing-table.json +24 -4
- package/dist/registry/components/pull-quote.json +70 -0
- package/dist/registry/components/radio-group.json +94 -0
- package/dist/registry/components/reader-controls.json +60 -0
- package/dist/registry/components/reading-meta.json +49 -0
- package/dist/registry/components/reading-progress.json +73 -0
- package/dist/registry/components/related-posts.json +7 -1
- package/dist/registry/components/search-trigger.json +68 -0
- package/dist/registry/components/select.json +94 -0
- package/dist/registry/components/separator.json +46 -0
- package/dist/registry/components/series-nav.json +62 -0
- package/dist/registry/components/share-buttons.json +76 -0
- package/dist/registry/components/site-footer.json +2 -2
- package/dist/registry/components/site-header.json +1 -1
- package/dist/registry/components/skeleton.json +48 -0
- package/dist/registry/components/skip-link.json +53 -0
- package/dist/registry/components/social-links.json +74 -0
- package/dist/registry/components/stat-strip.json +85 -0
- package/dist/registry/components/sticky-subscribe.json +82 -0
- package/dist/registry/components/subscribe-bar.json +61 -0
- package/dist/registry/components/switch.json +76 -0
- package/dist/registry/components/table-of-contents.json +12 -2
- package/dist/registry/components/tabs.json +81 -0
- package/dist/registry/components/tag-bar.json +63 -0
- package/dist/registry/components/tag-grid.json +1 -1
- package/dist/registry/components/tag-list.json +1 -1
- package/dist/registry/components/textarea.json +95 -0
- package/dist/registry/components/theme-toggle.json +65 -0
- package/dist/registry/components/tier-comparison.json +55 -0
- package/dist/registry/components/timeline.json +85 -0
- package/dist/registry/components/tooltip.json +65 -0
- package/dist/registry/components/visibility-badge.json +71 -0
- package/dist/registry/index.json +478 -4
- package/dist/templates/playground/index.html +2 -2
- package/dist/templates/playground/playground.css +8 -1
- package/dist/templates/playground/playground.js +39 -5
- package/dist/templates/playground/preview.css +1 -0
- package/dist/templates/theme-tools.mjs +62 -24
- package/dist/utils/component-diff.d.ts +1 -1
- package/dist/utils/component-diff.js +46 -17
- package/dist/utils/component-files.js +3 -2
- package/dist/utils/component-history.js +1 -1
- package/dist/utils/playground-server.js +40 -12
- package/dist/utils/preview-renderer.d.ts +77 -0
- package/dist/utils/preview-renderer.js +68 -8
- package/dist/utils/registry.js +15 -5
- package/dist/utils/theme-files.js +14 -7
- package/dist/utils/theme-project.js +6 -4
- package/dist/utils/theme-scaffold.js +22 -7
- package/dist/utils/theme.js +39 -32
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "separator",
|
|
3
|
+
"type": "components:ui",
|
|
4
|
+
"description": "Editorial horizontal divider with solid, dashed, and labeled variants.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Line style (ignored when label is provided).",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"dashed",
|
|
13
|
+
"ornament"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"label": {
|
|
18
|
+
"description": "Optional centered label text between divider rules."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
{
|
|
23
|
+
"name": "separator.hbs",
|
|
24
|
+
"type": "partial",
|
|
25
|
+
"target": "partials/components/separator.hbs",
|
|
26
|
+
"content": "{{!-- Styling parameters: class --}}\n{{#with this as |ghostcnStyles|}}\n{{#if label}}\n<div class=\"ghcn-separator{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"labeled\" role=\"separator\" aria-label=\"{{label}}\">\n <span class=\"ghcn-separator__line\" aria-hidden=\"true\"></span>\n <span class=\"ghcn-separator__label\">{{label}}</span>\n <span class=\"ghcn-separator__line\" aria-hidden=\"true\"></span>\n</div>\n{{else}}\n<hr class=\"ghcn-separator{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"dashed\"}}dashed{{else}}{{#match variant \"ornament\"}}ornament{{else}}default{{/match}}{{/match}}\" />\n{{/if}}\n{{/with}}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "separator.css",
|
|
30
|
+
"type": "style",
|
|
31
|
+
"target": "assets/css/components/separator.css",
|
|
32
|
+
"content": ".ghcn-separator { box-sizing: border-box; font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); }\n.ghcn-separator *, .ghcn-separator *::before, .ghcn-separator *::after { box-sizing: border-box; }\n.ghcn-separator:focus-visible, :where(.ghcn-separator) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.ghcn-separator { margin-block: 28px; width: 100%; }\nhr.ghcn-separator { height: 0; border: 0; border-top: 1px solid var(--border); }\nhr.ghcn-separator:where([data-variant=\"dashed\"]) { border-top-style: dashed; }\nhr.ghcn-separator:where([data-variant=\"ornament\"]) { border-top: 0; text-align: center; height: auto; overflow: visible; }\nhr.ghcn-separator:where([data-variant=\"ornament\"])::before { content: \"· · ·\"; color: var(--muted-foreground); letter-spacing: 0.5em; font-size: 16px; }\ndiv.ghcn-separator { display: flex; align-items: center; gap: 14px; }\n.ghcn-separator__line { flex: 1; height: 1px; background: var(--border); }\n.ghcn-separator__label { color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }\n"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"gscan": {
|
|
36
|
+
"rules_satisfied": [
|
|
37
|
+
"GS010-PJ-VALID"
|
|
38
|
+
],
|
|
39
|
+
"notes": "Self-contained Ghostcn UI primitive."
|
|
40
|
+
},
|
|
41
|
+
"styleSlots": {
|
|
42
|
+
"class": [
|
|
43
|
+
".ghcn-separator"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "series-nav",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Numbered multi-part series box grouping chronological Ghost posts under a shared tag and highlighting the active installment.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Box style: default, outline, or compact.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"outline",
|
|
13
|
+
"compact"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"seriesSlug": {
|
|
18
|
+
"description": "Optional Ghost tag slug for the series. Defaults to the current post primary_tag.slug."
|
|
19
|
+
},
|
|
20
|
+
"eyebrow": {
|
|
21
|
+
"description": "Small uppercase label above the title.",
|
|
22
|
+
"default": "Series"
|
|
23
|
+
},
|
|
24
|
+
"heading": {
|
|
25
|
+
"description": "Optional series title override."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{
|
|
30
|
+
"name": "series-nav.hbs",
|
|
31
|
+
"type": "partial",
|
|
32
|
+
"target": "partials/components/series-nav.hbs",
|
|
33
|
+
"content": "{{!-- Styling parameters: class, titleClass, listClass, linkClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if seriesSlug}}\n{{#get \"posts\" filter=\"tag:{{seriesSlug}}\" order=\"published_at asc\" limit=\"20\"}}{{#if posts}}\n<nav class=\"ghcn-series-nav{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match ghostcnStyles.variant \"outline\"}}outline{{else}}{{#match ghostcnStyles.variant \"compact\"}}compact{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}In this series{{/if}}\">\n <header class=\"ghcn-series-nav__header\">\n <span class=\"ghcn-series-nav__eyebrow\">{{#if ghostcnStyles.eyebrow}}{{ghostcnStyles.eyebrow}}{{else}}Series{{/if}}</span>\n <h3 class=\"ghcn-series-nav__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}{{#if ../primary_tag}}{{../primary_tag.name}}{{else}}Multi-part guide{{/if}}{{/if}}</h3>\n </header>\n <ol class=\"ghcn-series-nav__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\">\n {{#foreach posts}}\n <li class=\"ghcn-series-nav__item{{#match url ../../url}} is-current{{/match}}\">\n <a class=\"ghcn-series-nav__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{url}}\"{{#match url ../../url}} aria-current=\"page\"{{/match}}>\n <span class=\"ghcn-series-nav__step\" aria-hidden=\"true\"></span>\n <span class=\"ghcn-series-nav__name\">{{title}}</span>\n {{#match url ../../url}}<span class=\"ghcn-series-nav__current\">Reading</span>{{/match}}\n </a>\n </li>\n {{/foreach}}\n </ol>\n</nav>\n{{/if}}{{/get}}\n{{else}}{{#if primary_tag}}\n{{#get \"posts\" filter=\"tag:{{primary_tag.slug}}\" order=\"published_at asc\" limit=\"20\"}}{{#if posts}}\n<nav class=\"ghcn-series-nav{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match ghostcnStyles.variant \"outline\"}}outline{{else}}{{#match ghostcnStyles.variant \"compact\"}}compact{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}In this series{{/if}}\">\n <header class=\"ghcn-series-nav__header\">\n <span class=\"ghcn-series-nav__eyebrow\">{{#if ghostcnStyles.eyebrow}}{{ghostcnStyles.eyebrow}}{{else}}Series{{/if}}</span>\n <h3 class=\"ghcn-series-nav__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}{{#if ../primary_tag}}{{../primary_tag.name}}{{else}}Multi-part guide{{/if}}{{/if}}</h3>\n </header>\n <ol class=\"ghcn-series-nav__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\">\n {{#foreach posts}}\n <li class=\"ghcn-series-nav__item{{#match url ../../url}} is-current{{/match}}\">\n <a class=\"ghcn-series-nav__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{url}}\"{{#match url ../../url}} aria-current=\"page\"{{/match}}>\n <span class=\"ghcn-series-nav__step\" aria-hidden=\"true\"></span>\n <span class=\"ghcn-series-nav__name\">{{title}}</span>\n {{#match url ../../url}}<span class=\"ghcn-series-nav__current\">Reading</span>{{/match}}\n </a>\n </li>\n {{/foreach}}\n </ol>\n</nav>\n{{/if}}{{/get}}\n{{/if}}{{/if}}\n{{/with}}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "series-nav.css",
|
|
37
|
+
"type": "style",
|
|
38
|
+
"target": "assets/css/components/series-nav.css",
|
|
39
|
+
"content": ".ghcn-series-nav { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); font-family: inherit; font-size: var(--ghcn-text-small, 14px); line-height: 1.45; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }\n.ghcn-series-nav *, .ghcn-series-nav *::before, .ghcn-series-nav *::after { box-sizing: border-box; }\n.ghcn-series-nav:where([data-variant=\"outline\"]) { background: transparent; box-shadow: none; }\n.ghcn-series-nav:where([data-variant=\"compact\"]) { padding: 16px 18px; }\n.ghcn-series-nav__header { display: grid; gap: 4px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }\n.ghcn-series-nav__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }\n.ghcn-series-nav__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; font-size: 17px; }\n.ghcn-series-nav__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: ghcn-series; }\n.ghcn-series-nav__item { counter-increment: ghcn-series; }\n.ghcn-series-nav__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); color: var(--muted-foreground); text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }\n.ghcn-series-nav:where([data-variant=\"compact\"]) .ghcn-series-nav__link { padding: 6px 8px; }\n.ghcn-series-nav__link:hover { background: var(--secondary); color: var(--foreground); }\n.ghcn-series-nav__step { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 9999px; border: 1px solid var(--border); background: var(--background); color: var(--muted-foreground); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }\n.ghcn-series-nav__step::before { content: counter(ghcn-series); }\n.ghcn-series-nav__name { flex: 1 1 auto; min-width: 0; font-weight: 500; }\n.ghcn-series-nav__current { flex: 0 0 auto; padding: 2px 8px; border-radius: 9999px; background: color-mix(in srgb, var(--primary) 12%, var(--background)); color: var(--primary); font-size: 11px; font-weight: 600; }\n.ghcn-series-nav__item.is-current .ghcn-series-nav__link { background: var(--secondary); color: var(--foreground); font-weight: 600; }\n.ghcn-series-nav__item.is-current .ghcn-series-nav__step { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }\n.ghcn-series-nav:focus-visible, :where(.ghcn-series-nav) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"gscan": {
|
|
43
|
+
"rules_satisfied": [
|
|
44
|
+
"GS010-PJ-VALID"
|
|
45
|
+
],
|
|
46
|
+
"notes": "Uses Ghost native #get posts ordered chronologically by published_at asc."
|
|
47
|
+
},
|
|
48
|
+
"styleSlots": {
|
|
49
|
+
"class": [
|
|
50
|
+
".ghcn-series-nav"
|
|
51
|
+
],
|
|
52
|
+
"titleClass": [
|
|
53
|
+
".ghcn-series-nav__title"
|
|
54
|
+
],
|
|
55
|
+
"listClass": [
|
|
56
|
+
".ghcn-series-nav__list"
|
|
57
|
+
],
|
|
58
|
+
"linkClass": [
|
|
59
|
+
".ghcn-series-nav__link"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "share-buttons",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Accessible article share links (Copy link, Bluesky, X, LinkedIn, Email, and native Web Share).",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Button presentation (default pills, icon-only squares, or ghost buttons).",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"icon",
|
|
13
|
+
"ghost"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"size": {
|
|
18
|
+
"description": "Button scale.",
|
|
19
|
+
"options": [
|
|
20
|
+
"sm",
|
|
21
|
+
"default",
|
|
22
|
+
"lg"
|
|
23
|
+
],
|
|
24
|
+
"default": "default"
|
|
25
|
+
},
|
|
26
|
+
"heading": {
|
|
27
|
+
"description": "Optional label displayed before the share buttons."
|
|
28
|
+
},
|
|
29
|
+
"shareUrl": {
|
|
30
|
+
"description": "Optional URL override; defaults to current post absolute URL."
|
|
31
|
+
},
|
|
32
|
+
"shareTitle": {
|
|
33
|
+
"description": "Optional title override; defaults to current post title."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
{
|
|
38
|
+
"name": "share-buttons.hbs",
|
|
39
|
+
"type": "partial",
|
|
40
|
+
"target": "partials/components/share-buttons.hbs",
|
|
41
|
+
"content": "{{!-- Styling parameters: class, titleClass, listClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-share{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-share data-variant=\"{{#match variant \"icon\"}}icon{{else}}{{#match variant \"ghost\"}}ghost{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\" data-share-url=\"{{#if shareUrl}}{{shareUrl}}{{else}}{{url absolute=\"true\"}}{{/if}}\" data-share-title=\"{{#if shareTitle}}{{shareTitle}}{{else}}{{title}}{{/if}}\">\n {{#if heading}}<span class=\"ghcn-share__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</span>{{/if}}\n <div class=\"ghcn-share__list{{#if ghostcnStyles.listClass}} {{ghostcnStyles.listClass}}{{/if}}\" role=\"group\" aria-label=\"{{#if heading}}{{heading}}{{else}}Share this post{{/if}}\">\n <button type=\"button\" class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-share-copy aria-label=\"Copy link\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8.5 11.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1\"/><path d=\"M11.5 8.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1\"/></svg>\n <span class=\"ghcn-share__label\" data-copy-label>Copy link</span>\n </button>\n <a class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"https://bsky.app/intent/compose?text={{encode title}}%20{{encode (url absolute=\"true\")}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Share on Bluesky\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 10.5C8.5 7.4 5.5 4.2 3.6 3.3c-.9-.4-1.6.1-1.6 1.1 0 1 .4 4.2.9 5.3.7 1.4 2.2 1.8 3.6 1.6-2.4.4-4.1 1.7-2.2 4.1 2.2 2.7 4.7-.4 5.7-2.4 1 2 3.5 5.1 5.7 2.4 1.9-2.4.2-3.7-2.2-4.1 1.4.2 2.9-.2 3.6-1.6.5-1.1.9-4.3.9-5.3 0-1-.7-1.5-1.6-1.1-1.9.9-4.9 4.1-6.4 7.2Z\"/></svg>\n <span class=\"ghcn-share__label\">Bluesky</span>\n </a>\n <a class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"https://x.com/intent/tweet?text={{encode title}}&url={{encode (url absolute=\"true\")}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Share on X\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3.5 3.5 16.5 16.5M16.5 3.5 3.5 16.5\"/></svg>\n <span class=\"ghcn-share__label\">X</span>\n </a>\n <a class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"https://www.linkedin.com/sharing/share-offsite/?url={{encode (url absolute=\"true\")}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Share on LinkedIn\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"14\" height=\"14\" rx=\"2\"/><path d=\"M7 9v4.5M7 6.5v.01M10 13.5V9m0 1.5a2 2 0 0 1 3.5 1.3v1.7\"/></svg>\n <span class=\"ghcn-share__label\">LinkedIn</span>\n </a>\n <a class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"mailto:?subject={{encode title}}&body={{encode (url absolute=\"true\")}}\" aria-label=\"Share by email\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"4.5\" width=\"15\" height=\"11\" rx=\"1.5\"/><path d=\"m3.5 5.5 6.5 5 6.5-5\"/></svg>\n <span class=\"ghcn-share__label\">Email</span>\n </a>\n <button type=\"button\" class=\"ghcn-share__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-share-native hidden aria-label=\"More share options\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 3v9M6.5 6.5 10 3l3.5 3.5M4 12.5v3a1.5 1.5 0 0 0 1.5 1.5h9a1.5 1.5 0 0 0 1.5-1.5v-3\"/></svg>\n <span class=\"ghcn-share__label\">Share</span>\n </button>\n </div>\n <span class=\"ghcn-share__status\" data-share-status role=\"status\" aria-live=\"polite\"></span>\n</div>\n{{/with}}"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "share-buttons.css",
|
|
45
|
+
"type": "style",
|
|
46
|
+
"target": "assets/css/components/share-buttons.css",
|
|
47
|
+
"content": ".ghcn-share { 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: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }\n.ghcn-share *, .ghcn-share *::before, .ghcn-share *::after { box-sizing: border-box; }\n.ghcn-share__title { font-size: var(--ghcn-text-small, 14px); font-weight: 600; color: var(--muted-foreground); }\n.ghcn-share__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }\n.ghcn-share__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--card); color: var(--foreground); font: inherit; font-size: var(--ghcn-text-meta, 13px); font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }\n.ghcn-share__btn[hidden] { display: none; }\n.ghcn-share__btn:hover { background: var(--muted); border-color: color-mix(in srgb, var(--foreground) 22%, var(--border)); }\n.ghcn-share:where([data-size=\"sm\"]) .ghcn-share__btn { min-height: 30px; padding: 4px 9px; font-size: 12px; }\n.ghcn-share:where([data-size=\"lg\"]) .ghcn-share__btn { min-height: 42px; padding: 8px 15px; font-size: 14px; }\n.ghcn-share:where([data-variant=\"icon\"]) .ghcn-share__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n.ghcn-share:where([data-variant=\"icon\"]) .ghcn-share__btn { width: 36px; padding: 0; }\n.ghcn-share:where([data-variant=\"icon\"][data-size=\"sm\"]) .ghcn-share__btn { width: 30px; }\n.ghcn-share:where([data-variant=\"icon\"][data-size=\"lg\"]) .ghcn-share__btn { width: 42px; }\n.ghcn-share:where([data-variant=\"ghost\"]) .ghcn-share__btn { border-color: transparent; background: transparent; color: var(--muted-foreground); }\n.ghcn-share:where([data-variant=\"ghost\"]) .ghcn-share__btn:hover { background: var(--muted); color: var(--foreground); }\n.ghcn-share__status { font-size: var(--ghcn-text-meta, 13px); color: var(--muted-foreground); }\n.ghcn-share__status:empty { display: none; }\n.ghcn-share:focus-visible, :where(.ghcn-share) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-share__btn { transition: none; } }\n"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "share-buttons.js",
|
|
51
|
+
"type": "js",
|
|
52
|
+
"target": "assets/js/components/share-buttons.js",
|
|
53
|
+
"content": "/* ghostcn share buttons: copy-link feedback and native Web Share progressive enhancement. */\n(() => {\n function init() {\n document.querySelectorAll('[data-ghcn-share]').forEach(root => {\n if (root.dataset.ghcnShareReady) return;\n root.dataset.ghcnShareReady = 'true';\n const status = root.querySelector('[data-share-status]');\n const copyBtn = root.querySelector('[data-share-copy]');\n const nativeBtn = root.querySelector('[data-share-native]');\n const shareUrl = root.dataset.shareUrl || window.location.href;\n const shareTitle = root.dataset.shareTitle || document.title;\n\n if (copyBtn) {\n copyBtn.addEventListener('click', async () => {\n const label = copyBtn.querySelector('[data-copy-label]');\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(shareUrl);\n } else {\n const input = document.createElement('input');\n input.value = shareUrl;\n document.body.append(input);\n input.select();\n document.execCommand('copy');\n input.remove();\n }\n if (label) label.textContent = 'Copied';\n if (status) status.textContent = 'Link copied to clipboard.';\n setTimeout(() => {\n if (label) label.textContent = 'Copy link';\n if (status) status.textContent = '';\n }, 2000);\n } catch {\n if (status) status.textContent = 'Could not copy link automatically.';\n }\n });\n }\n\n if (nativeBtn && typeof navigator.share === 'function') {\n nativeBtn.hidden = false;\n nativeBtn.addEventListener('click', () => {\n navigator.share({ title: shareTitle, url: shareUrl }).catch(() => {});\n });\n }\n });\n }\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"gscan": {
|
|
57
|
+
"rules_satisfied": [
|
|
58
|
+
"GS010-PJ-VALID"
|
|
59
|
+
],
|
|
60
|
+
"notes": "Uses native Ghost url and encode helpers with progressive Clipboard and Web Share API support."
|
|
61
|
+
},
|
|
62
|
+
"styleSlots": {
|
|
63
|
+
"class": [
|
|
64
|
+
".ghcn-share"
|
|
65
|
+
],
|
|
66
|
+
"titleClass": [
|
|
67
|
+
".ghcn-share__title"
|
|
68
|
+
],
|
|
69
|
+
"listClass": [
|
|
70
|
+
".ghcn-share__list"
|
|
71
|
+
],
|
|
72
|
+
"buttonClass": [
|
|
73
|
+
".ghcn-share__btn"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"name": "site-footer.hbs",
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/components/site-footer.hbs",
|
|
12
|
-
"content": "{{!-- Styling parameters: class, innerClass, navClass, socialClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Site Footer | Usage: {{> \"components/site-footer\"}} --}}\n<footer class=\"ghcn-footer{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n <div class=\"ghcn-footer__inner{{#if ghostcnStyles.innerClass}} {{ghostcnStyles.innerClass}}{{/if}} ghcn-container\">\n <div class=\"ghcn-footer__brand\">\n <a href=\"{{@site.url}}\">{{@site.title}}</a>\n {{#if @site.description}}<p>{{@site.description}}</p>{{/if}}\n </div>\n <nav class=\"ghcn-footer__nav{{#if ghostcnStyles.navClass}} {{ghostcnStyles.navClass}}{{/if}}\" aria-label=\"Footer navigation\">{{navigation type=\"secondary\"}}</nav>\n <div class=\"ghcn-footer__social{{#if ghostcnStyles.socialClass}} {{ghostcnStyles.socialClass}}{{/if}}\">\n {{#if @site.facebook}}<a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener\">Facebook</a>{{/if}}\n {{#if @site.twitter}}<a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener\">X</a>{{/if}}\n <a href=\"{{@site.url}}/rss
|
|
12
|
+
"content": "{{!-- Styling parameters: class, innerClass, navClass, socialClass --}}\n{{#with this as |ghostcnStyles|}}\n{{!-- Component: Site Footer | Usage: {{> \"components/site-footer\"}} --}}\n<footer class=\"ghcn-footer{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\">\n <div class=\"ghcn-footer__inner{{#if ghostcnStyles.innerClass}} {{ghostcnStyles.innerClass}}{{/if}} ghcn-container\">\n <div class=\"ghcn-footer__brand\">\n <a href=\"{{@site.url}}\">{{@site.title}}</a>\n {{#if @site.description}}<p>{{@site.description}}</p>{{/if}}\n </div>\n <nav class=\"ghcn-footer__nav{{#if ghostcnStyles.navClass}} {{ghostcnStyles.navClass}}{{/if}}\" aria-label=\"Footer navigation\">{{navigation type=\"secondary\"}}</nav>\n <div class=\"ghcn-footer__social{{#if ghostcnStyles.socialClass}} {{ghostcnStyles.socialClass}}{{/if}}\">\n {{#if @site.facebook}}<a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener\">Facebook</a>{{/if}}\n {{#if @site.twitter}}<a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener\">X</a>{{/if}}\n <a href=\"{{#match @site.url \"/\"}}/rss/{{else}}{{@site.url}}/rss/{{/match}}\">RSS</a>\n </div>\n </div>\n <div class=\"ghcn-footer__legal ghcn-container\">\n <span>© {{date format=\"YYYY\"}} {{@site.title}}</span>\n <span>Published with <a href=\"https://ghost.org\" target=\"_blank\" rel=\"noopener\">Ghost</a></span>\n </div>\n</footer>\n{{/with}}"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
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: 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:
|
|
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: 18px; font-weight: 800; text-decoration: none; }\n.ghcn-footer__brand p { max-width: 480px; margin: 8px 0 0; color: var(--muted-foreground); font-size: 14px; }\n.ghcn-footer .nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; }\n.ghcn-footer a { color: var(--muted-foreground); font-size: 14px; text-decoration: none; }\n.ghcn-footer a:hover { color: var(--foreground); }\n.ghcn-footer__social { display: flex; flex-direction: column; gap: 8px; }\n.ghcn-footer__legal { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-block: 20px; color: var(--muted-foreground); font-size: 12px; }\n@media (max-width: 720px) { .ghcn-footer__inner { grid-template-columns: 1fr; gap: 32px; } .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: 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:
|
|
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: 18px; font-weight: 800; letter-spacing: -0.025em; text-decoration: none; }\n.ghcn-header__brand img { display: block; width: auto; max-width: 176px; max-height: 36px; }\n.ghcn-header__nav { min-width: 0; flex: 1; }\n.ghcn-header .nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; }\n.ghcn-header .nav a, .ghcn-header__signin { color: var(--muted-foreground); font-size: 14px; 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: 12px; }\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: 4px; }\n.ghcn-header__panel .nav a { display: block; border-radius: var(--radius); padding: 10px 12px; }\n.ghcn-header__panel .nav a:hover { background: var(--muted); }\n.ghcn-header__mobile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }\n.ghcn-header__mobile-actions .ghcn-button { flex: 1 1 auto; }\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": {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "skeleton",
|
|
3
|
+
"type": "components:ui",
|
|
4
|
+
"description": "Accessible shimmer loading placeholder presets (card, post, avatar, text) with reduced-motion support.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Placeholder shape: card, post, avatar, or text.",
|
|
10
|
+
"options": [
|
|
11
|
+
"card",
|
|
12
|
+
"post",
|
|
13
|
+
"avatar",
|
|
14
|
+
"text"
|
|
15
|
+
],
|
|
16
|
+
"default": "card"
|
|
17
|
+
},
|
|
18
|
+
"label": {
|
|
19
|
+
"description": "Accessible status text.",
|
|
20
|
+
"default": "Loading content"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
{
|
|
25
|
+
"name": "skeleton.hbs",
|
|
26
|
+
"type": "partial",
|
|
27
|
+
"target": "partials/components/skeleton.hbs",
|
|
28
|
+
"content": "{{!-- Styling parameters: class --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-skeleton{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"post\"}}post{{else}}{{#match variant \"avatar\"}}avatar{{else}}{{#match variant \"text\"}}text{{else}}card{{/match}}{{/match}}{{/match}}\" role=\"status\" aria-busy=\"true\" aria-label=\"{{#if label}}{{label}}{{else}}Loading content{{/if}}\">\n {{#match variant \"avatar\"}}\n <span class=\"ghcn-skeleton__block ghcn-skeleton__circle\"></span>\n <div class=\"ghcn-skeleton__stack\">\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--md\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--sm\"></span>\n </div>\n {{else}}{{#match variant \"text\"}}\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--lg\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--md\"></span>\n {{else}}{{#match variant \"post\"}}\n <div class=\"ghcn-skeleton__stack\">\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--sm\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--lg\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line\"></span>\n </div>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__thumb\"></span>\n {{else}}\n <span class=\"ghcn-skeleton__block ghcn-skeleton__media\"></span>\n <div class=\"ghcn-skeleton__body\">\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--sm\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line ghcn-skeleton__line--lg\"></span>\n <span class=\"ghcn-skeleton__block ghcn-skeleton__line\"></span>\n </div>\n {{/match}}{{/match}}{{/match}}\n</div>\n{{/with}}"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "skeleton.css",
|
|
32
|
+
"type": "style",
|
|
33
|
+
"target": "assets/css/components/skeleton.css",
|
|
34
|
+
"content": "@keyframes ghcn-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }\n.ghcn-skeleton { box-sizing: border-box; width: 100%; font-family: inherit; }\n.ghcn-skeleton *, .ghcn-skeleton *::before, .ghcn-skeleton *::after { box-sizing: border-box; }\n.ghcn-skeleton__block { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--muted) 25%, color-mix(in srgb, var(--foreground) 7%, var(--muted)) 50%, var(--muted) 75%); background-size: 200% 100%; animation: ghcn-shimmer 1.6s ease-in-out infinite; }\n.ghcn-skeleton:where([data-variant=\"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-skeleton__media { width: 100%; aspect-ratio: 16 / 9; border-radius: 0; }\n.ghcn-skeleton__body { display: grid; gap: 10px; padding: 18px; }\n.ghcn-skeleton:where([data-variant=\"post\"]) { 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; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; }\n.ghcn-skeleton__thumb { flex: 0 0 96px; height: 72px; border-radius: 8px; }\n.ghcn-skeleton:where([data-variant=\"avatar\"]) { display: flex; align-items: center; gap: 12px; }\n.ghcn-skeleton__circle { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 9999px; }\n.ghcn-skeleton:where([data-variant=\"text\"]) { display: grid; gap: 10px; }\n.ghcn-skeleton__stack { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }\n.ghcn-skeleton__line { height: 12px; width: 100%; }\n.ghcn-skeleton__line--sm { width: 38%; height: 10px; }\n.ghcn-skeleton__line--md { width: 64%; }\n.ghcn-skeleton__line--lg { width: 82%; height: 16px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-skeleton__block { animation: none; background: var(--muted); } }"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"gscan": {
|
|
38
|
+
"rules_satisfied": [
|
|
39
|
+
"GS010-PJ-VALID"
|
|
40
|
+
],
|
|
41
|
+
"notes": "Pure CSS animated shimmer with prefers-reduced-motion fallback."
|
|
42
|
+
},
|
|
43
|
+
"styleSlots": {
|
|
44
|
+
"class": [
|
|
45
|
+
".ghcn-skeleton"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "skip-link",
|
|
3
|
+
"type": "components:layout",
|
|
4
|
+
"description": "WCAG keyboard-accessible \"Skip to content\" link hidden visually until focused via Tab.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Shape: default or pill.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"pill"
|
|
13
|
+
],
|
|
14
|
+
"default": "default"
|
|
15
|
+
},
|
|
16
|
+
"href": {
|
|
17
|
+
"description": "Target landmark anchor id.",
|
|
18
|
+
"default": "#main-content"
|
|
19
|
+
},
|
|
20
|
+
"label": {
|
|
21
|
+
"description": "Link text.",
|
|
22
|
+
"default": "Skip to main content"
|
|
23
|
+
},
|
|
24
|
+
"alwaysVisible": {
|
|
25
|
+
"description": "Keep visible inline (useful for style previews)."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{
|
|
30
|
+
"name": "skip-link.hbs",
|
|
31
|
+
"type": "partial",
|
|
32
|
+
"target": "partials/components/skip-link.hbs",
|
|
33
|
+
"content": "{{!-- Styling parameters: class --}}\n{{#with this as |ghostcnStyles|}}\n<a class=\"ghcn-skip-link{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" href=\"{{#if href}}{{href}}{{else}}#main-content{{/if}}\" data-variant=\"{{#match variant \"pill\"}}pill{{else}}default{{/match}}\" data-always-visible=\"{{#if alwaysVisible}}true{{else}}false{{/if}}\">{{#if label}}{{label}}{{else}}Skip to main content{{/if}}</a>\n{{/with}}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "skip-link.css",
|
|
37
|
+
"type": "style",
|
|
38
|
+
"target": "assets/css/components/skip-link.css",
|
|
39
|
+
"content": ".ghcn-skip-link { box-sizing: border-box; position: fixed; top: 12px; left: 12px; z-index: 90; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--primary); color: var(--primary-foreground); font-family: inherit; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); transform: translateY(-160%); opacity: 0; transition: transform 150ms ease, opacity 150ms ease; }\n.ghcn-skip-link:where([data-variant=\"pill\"]) { border-radius: 9999px; }\n.ghcn-skip-link:focus,\n.ghcn-skip-link:focus-visible { transform: translateY(0); opacity: 1; outline: 2px solid var(--ring, var(--foreground)); outline-offset: 2px; }\n.ghcn-skip-link[data-always-visible=\"true\"] { position: relative; top: auto; left: auto; z-index: auto; transform: none; opacity: 1; }\n@media (prefers-reduced-motion: reduce) { .ghcn-skip-link { transition: none; } }"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"gscan": {
|
|
43
|
+
"rules_satisfied": [
|
|
44
|
+
"GS010-PJ-VALID"
|
|
45
|
+
],
|
|
46
|
+
"notes": "Zero-JS WCAG 2.1 Level A bypass block link for default.hbs."
|
|
47
|
+
},
|
|
48
|
+
"styleSlots": {
|
|
49
|
+
"class": [
|
|
50
|
+
".ghcn-skip-link"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "social-links",
|
|
3
|
+
"type": "components:layout",
|
|
4
|
+
"description": "Accessible social channel icon bar reading Ghost site accounts with optional Bluesky, GitHub, LinkedIn, YouTube, Instagram, email, and RSS.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Button style: default, outline, ghost, or pill.",
|
|
10
|
+
"default": "default"
|
|
11
|
+
},
|
|
12
|
+
"size": {
|
|
13
|
+
"description": "Button size: sm, default, or lg.",
|
|
14
|
+
"default": "default"
|
|
15
|
+
},
|
|
16
|
+
"ariaLabel": {
|
|
17
|
+
"description": "Accessible navigation label.",
|
|
18
|
+
"default": "Social links"
|
|
19
|
+
},
|
|
20
|
+
"bluesky": {
|
|
21
|
+
"description": "Optional Bluesky profile URL."
|
|
22
|
+
},
|
|
23
|
+
"github": {
|
|
24
|
+
"description": "Optional GitHub profile URL."
|
|
25
|
+
},
|
|
26
|
+
"linkedin": {
|
|
27
|
+
"description": "Optional LinkedIn profile URL."
|
|
28
|
+
},
|
|
29
|
+
"youtube": {
|
|
30
|
+
"description": "Optional YouTube channel URL."
|
|
31
|
+
},
|
|
32
|
+
"instagram": {
|
|
33
|
+
"description": "Optional Instagram profile URL."
|
|
34
|
+
},
|
|
35
|
+
"email": {
|
|
36
|
+
"description": "Optional contact email address (without mailto:)."
|
|
37
|
+
},
|
|
38
|
+
"rssUrl": {
|
|
39
|
+
"description": "Optional RSS feed URL override.",
|
|
40
|
+
"default": "/rss/"
|
|
41
|
+
},
|
|
42
|
+
"hideRss": {
|
|
43
|
+
"description": "Hide the RSS feed link when true."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
{
|
|
48
|
+
"name": "social-links.hbs",
|
|
49
|
+
"type": "partial",
|
|
50
|
+
"target": "partials/components/social-links.hbs",
|
|
51
|
+
"content": "{{!-- Styling parameters: class, linkClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-social-links{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"ghost\"}}ghost{{else}}{{#match variant \"pill\"}}pill{{else}}default{{/match}}{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if ariaLabel}}{{ariaLabel}}{{else}}Social links{{/if}}\">\n {{#if @site.twitter}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"X / Twitter\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path d=\"M15.4 3h2.45l-5.36 6.12L18.8 17h-4.94l-3.87-5.05L5.56 17H3.1l5.73-6.55L2.76 3h5.06l3.5 4.62L15.4 3Zm-.86 12.56h1.36L6.98 4.37H5.52l9.02 11.19Z\"/></svg><span class=\"ghcn-social-links__label\">X</span></a>\n {{/if}}\n {{#if @site.facebook}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Facebook\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path d=\"M11.4 17.5v-6.7h2.25l.34-2.62H11.4V6.5c0-.76.21-1.28 1.3-1.28h1.38V2.87c-.24-.03-1.06-.1-2.02-.1-2 0-3.36 1.22-3.36 3.46v1.95H6.45v2.62H8.7v6.7h2.7Z\"/></svg><span class=\"ghcn-social-links__label\">Facebook</span></a>\n {{/if}}\n {{#if bluesky}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{bluesky}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Bluesky\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path d=\"M4.8 3.6C6.9 5.18 9.16 8.38 10 10.12c.84-1.74 3.1-4.94 5.2-6.52 1.52-1.14 3.98-2.02 3.98.78 0 .56-.32 4.7-.5 5.38-.66 2.34-3.04 2.94-5.16 2.58 3.7.62 4.64 2.72 2.6 4.8-3.86 3.96-5.54-.98-5.98-2.26-.08-.24-.12-.36-.14-.36-.02 0-.06.12-.14.36-.44 1.28-2.12 6.22-5.98 2.26-2.04-2.08-1.1-4.18 2.6-4.8-2.12.36-4.5-.24-5.16-2.58-.18-.68-.5-4.82-.5-5.38 0-2.8 2.46-1.92 3.98-.78Z\"/></svg><span class=\"ghcn-social-links__label\">Bluesky</span></a>\n {{/if}}\n {{#if github}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{github}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"GitHub\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10 2.2a7.8 7.8 0 0 0-2.46 15.2c.39.07.53-.17.53-.38v-1.33c-2.17.47-2.63-1.04-2.63-1.04-.35-.9-.87-1.14-.87-1.14-.71-.48.05-.47.05-.47.78.06 1.2.8 1.2.8.7 1.2 1.83.85 2.28.65.07-.5.27-.85.5-1.05-1.73-.2-3.55-.86-3.55-3.85 0-.85.3-1.55.8-2.1-.08-.2-.35-.99.08-2.06 0 0 .66-.21 2.15.8a7.5 7.5 0 0 1 3.92 0c1.49-1.01 2.15-.8 2.15-.8.43 1.07.16 1.86.08 2.06.5.55.8 1.25.8 2.1 0 3-1.82 3.65-3.56 3.84.28.24.53.72.53 1.45v2.15c0 .21.14.46.54.38A7.8 7.8 0 0 0 10 2.2Z\"/></svg><span class=\"ghcn-social-links__label\">GitHub</span></a>\n {{/if}}\n {{#if linkedin}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{linkedin}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"LinkedIn\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path d=\"M4.6 7.4h2.5v8.2H4.6V7.4Zm1.25-4a1.45 1.45 0 1 1 0 2.9 1.45 1.45 0 0 1 0-2.9ZM8.6 7.4H11v1.12h.03c.33-.63 1.15-1.3 2.37-1.3 2.53 0 3 1.67 3 3.84v4.54h-2.5v-4.02c0-.96-.02-2.2-1.34-2.2-1.34 0-1.54 1.05-1.54 2.13v4.09H8.6V7.4Z\"/></svg><span class=\"ghcn-social-links__label\">LinkedIn</span></a>\n {{/if}}\n {{#if youtube}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{youtube}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"YouTube\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"currentColor\"><path d=\"M17.7 6.2a2.2 2.2 0 0 0-1.55-1.56C14.78 4.26 10 4.26 10 4.26s-4.78 0-6.15.38A2.2 2.2 0 0 0 2.3 6.2C1.92 7.58 1.92 10 1.92 10s0 2.42.38 3.8a2.2 2.2 0 0 0 1.55 1.56c1.37.38 6.15.38 6.15.38s4.78 0 6.15-.38a2.2 2.2 0 0 0 1.55-1.56c.38-1.38.38-3.8.38-3.8s0-2.42-.38-3.8ZM8.4 12.46V7.54L12.64 10 8.4 12.46Z\"/></svg><span class=\"ghcn-social-links__label\">YouTube</span></a>\n {{/if}}\n {{#if instagram}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{instagram}}\" target=\"_blank\" rel=\"noopener noreferrer\" aria-label=\"Instagram\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"><rect x=\"3\" y=\"3\" width=\"14\" height=\"14\" rx=\"4\"/><circle cx=\"10\" cy=\"10\" r=\"3.25\"/><circle cx=\"14.2\" cy=\"5.8\" r=\".75\" fill=\"currentColor\" stroke=\"none\"/></svg><span class=\"ghcn-social-links__label\">Instagram</span></a>\n {{/if}}\n {{#if email}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"mailto:{{email}}\" aria-label=\"Email\"><svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.65\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"4.5\" width=\"15\" height=\"11\" rx=\"2\"/><path d=\"m3.5 6 6.5 4.75L16.5 6\"/></svg><span class=\"ghcn-social-links__label\">Email</span></a>\n {{/if}}\n {{#unless hideRss}}\n <a class=\"ghcn-social-links__link{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{#if rssUrl}}{{rssUrl}}{{else}}/rss/{{/if}}\" aria-label=\"RSS feed\"><svg 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=\"M4.5 11.5a4 4 0 0 1 4 4M4.5 6.5a9 9 0 0 1 9 9\"/><circle cx=\"5.25\" cy=\"14.75\" r=\"1.25\" fill=\"currentColor\" stroke=\"none\"/></svg><span class=\"ghcn-social-links__label\">RSS</span></a>\n {{/unless}}\n</nav>\n{{/with}}"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "social-links.css",
|
|
55
|
+
"type": "style",
|
|
56
|
+
"target": "assets/css/components/social-links.css",
|
|
57
|
+
"content": ".ghcn-social-links { box-sizing: border-box; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: inherit; }\n.ghcn-social-links *, .ghcn-social-links *::before, .ghcn-social-links *::after { box-sizing: border-box; }\n.ghcn-social-links__link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 38px; height: 38px; border: 1px solid transparent; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--secondary); color: var(--foreground); font-size: 13px; font-weight: 500; line-height: 1; text-decoration: none; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease; }\n.ghcn-social-links__link:hover { background: var(--primary); color: var(--primary-foreground); transform: translateY(-1px); }\n.ghcn-social-links__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n.ghcn-social-links:where([data-variant=\"outline\"]) .ghcn-social-links__link { background: var(--card, var(--background)); border-color: var(--border); color: var(--muted-foreground); }\n.ghcn-social-links:where([data-variant=\"outline\"]) .ghcn-social-links__link:hover { border-color: var(--foreground); color: var(--foreground); background: var(--secondary); }\n.ghcn-social-links:where([data-variant=\"ghost\"]) .ghcn-social-links__link { background: transparent; color: var(--muted-foreground); }\n.ghcn-social-links:where([data-variant=\"ghost\"]) .ghcn-social-links__link:hover { background: var(--secondary); color: var(--foreground); transform: none; }\n.ghcn-social-links:where([data-variant=\"pill\"]) .ghcn-social-links__link { width: auto; height: 34px; padding: 0 13px; border-radius: 9999px; background: var(--card, var(--background)); border-color: var(--border); color: var(--foreground); }\n.ghcn-social-links:where([data-variant=\"pill\"]) .ghcn-social-links__link:hover { border-color: var(--primary); background: var(--secondary); color: var(--foreground); transform: none; }\n.ghcn-social-links:where([data-variant=\"pill\"]) .ghcn-social-links__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }\n.ghcn-social-links:where([data-size=\"sm\"]) { gap: 6px; }\n.ghcn-social-links:where([data-size=\"sm\"]) .ghcn-social-links__link { width: 32px; height: 32px; font-size: 12px; }\n.ghcn-social-links:where([data-size=\"sm\"][data-variant=\"pill\"]) .ghcn-social-links__link { width: auto; height: 28px; padding: 0 10px; }\n.ghcn-social-links:where([data-size=\"lg\"]) .ghcn-social-links__link { width: 44px; height: 44px; font-size: 14px; }\n.ghcn-social-links:where([data-size=\"lg\"][data-variant=\"pill\"]) .ghcn-social-links__link { width: auto; height: 40px; padding: 0 16px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-social-links__link { transition: none; transform: none; } }\n.ghcn-social-links:focus-visible, :where(.ghcn-social-links) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"gscan": {
|
|
61
|
+
"rules_satisfied": [
|
|
62
|
+
"GS010-PJ-VALID"
|
|
63
|
+
],
|
|
64
|
+
"notes": "Uses Ghost native @site.twitter, @site.facebook, social_url, and @site.url/rss/."
|
|
65
|
+
},
|
|
66
|
+
"styleSlots": {
|
|
67
|
+
"class": [
|
|
68
|
+
".ghcn-social-links"
|
|
69
|
+
],
|
|
70
|
+
"linkClass": [
|
|
71
|
+
".ghcn-social-links__link"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stat-strip",
|
|
3
|
+
"type": "components:members",
|
|
4
|
+
"description": "Editorial social-proof and publication metrics strip for About and Subscribe landing pages.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Presentation: default (unified panel), cards, or minimal.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"cards",
|
|
13
|
+
"minimal"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"heading": {
|
|
18
|
+
"description": "Optional heading above the stats."
|
|
19
|
+
},
|
|
20
|
+
"stat1Value": {
|
|
21
|
+
"description": "First metric value.",
|
|
22
|
+
"default": "14,200+"
|
|
23
|
+
},
|
|
24
|
+
"stat1Label": {
|
|
25
|
+
"description": "First metric label.",
|
|
26
|
+
"default": "Active readers"
|
|
27
|
+
},
|
|
28
|
+
"stat2Value": {
|
|
29
|
+
"description": "Second metric value.",
|
|
30
|
+
"default": "180+"
|
|
31
|
+
},
|
|
32
|
+
"stat2Label": {
|
|
33
|
+
"description": "Second metric label.",
|
|
34
|
+
"default": "Published issues"
|
|
35
|
+
},
|
|
36
|
+
"stat3Value": {
|
|
37
|
+
"description": "Third metric value.",
|
|
38
|
+
"default": "54%"
|
|
39
|
+
},
|
|
40
|
+
"stat3Label": {
|
|
41
|
+
"description": "Third metric label.",
|
|
42
|
+
"default": "Open rate"
|
|
43
|
+
},
|
|
44
|
+
"stat4Value": {
|
|
45
|
+
"description": "Optional fourth metric value."
|
|
46
|
+
},
|
|
47
|
+
"stat4Label": {
|
|
48
|
+
"description": "Optional fourth metric label."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
{
|
|
53
|
+
"name": "stat-strip.hbs",
|
|
54
|
+
"type": "partial",
|
|
55
|
+
"target": "partials/components/stat-strip.hbs",
|
|
56
|
+
"content": "{{!-- Styling parameters: class, itemClass, valueClass, labelClass --}}\n{{#with this as |ghostcnStyles|}}\n<section class=\"ghcn-stat-strip{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"cards\"}}cards{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}Publication metrics{{/if}}\">\n {{#if heading}}<h2 class=\"ghcn-stat-strip__heading\">{{heading}}</h2>{{/if}}\n <dl class=\"ghcn-stat-strip__grid\">\n <div class=\"ghcn-stat-strip__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <dt class=\"ghcn-stat-strip__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">{{#if stat1Label}}{{stat1Label}}{{else}}Active readers{{/if}}</dt>\n <dd class=\"ghcn-stat-strip__value{{#if ghostcnStyles.valueClass}} {{ghostcnStyles.valueClass}}{{/if}}\">{{#if stat1Value}}{{stat1Value}}{{else}}14,200+{{/if}}</dd>\n </div>\n <div class=\"ghcn-stat-strip__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <dt class=\"ghcn-stat-strip__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">{{#if stat2Label}}{{stat2Label}}{{else}}Published issues{{/if}}</dt>\n <dd class=\"ghcn-stat-strip__value{{#if ghostcnStyles.valueClass}} {{ghostcnStyles.valueClass}}{{/if}}\">{{#if stat2Value}}{{stat2Value}}{{else}}180+{{/if}}</dd>\n </div>\n <div class=\"ghcn-stat-strip__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <dt class=\"ghcn-stat-strip__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">{{#if stat3Label}}{{stat3Label}}{{else}}Open rate{{/if}}</dt>\n <dd class=\"ghcn-stat-strip__value{{#if ghostcnStyles.valueClass}} {{ghostcnStyles.valueClass}}{{/if}}\">{{#if stat3Value}}{{stat3Value}}{{else}}54%{{/if}}</dd>\n </div>\n {{#if stat4Value}}\n <div class=\"ghcn-stat-strip__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <dt class=\"ghcn-stat-strip__label{{#if ghostcnStyles.labelClass}} {{ghostcnStyles.labelClass}}{{/if}}\">{{stat4Label}}</dt>\n <dd class=\"ghcn-stat-strip__value{{#if ghostcnStyles.valueClass}} {{ghostcnStyles.valueClass}}{{/if}}\">{{stat4Value}}</dd>\n </div>\n {{/if}}\n </dl>\n</section>\n{{/with}}"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "stat-strip.css",
|
|
60
|
+
"type": "style",
|
|
61
|
+
"target": "assets/css/components/stat-strip.css",
|
|
62
|
+
"content": ".ghcn-stat-strip { 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-stat-strip *, .ghcn-stat-strip *::before, .ghcn-stat-strip *::after { box-sizing: border-box; }\n.ghcn-stat-strip__heading { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 18px; font-size: 20px; }\n.ghcn-stat-strip__grid { 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: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }\n.ghcn-stat-strip__item { display: flex; flex-direction: column-reverse; gap: 4px; padding: 22px 24px; border-bottom: 1px solid var(--border); }\n@media (min-width: 600px) {\n .ghcn-stat-strip__item { border-bottom: 0; border-right: 1px solid var(--border); }\n .ghcn-stat-strip__item:last-child { border-right: 0; }\n}\n.ghcn-stat-strip__item:last-child { border-bottom: 0; }\n.ghcn-stat-strip__value { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--foreground); }\n.ghcn-stat-strip__label { font-size: 13px; font-weight: 500; color: var(--muted-foreground); }\n.ghcn-stat-strip:where([data-variant=\"cards\"]) .ghcn-stat-strip__grid { background: transparent; border: 0; border-radius: 0; box-shadow: none; gap: 14px; overflow: visible; }\n.ghcn-stat-strip:where([data-variant=\"cards\"]) .ghcn-stat-strip__item { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }\n.ghcn-stat-strip:where([data-variant=\"minimal\"]) .ghcn-stat-strip__grid { background: transparent; border: 0; border-block: 1px solid var(--border); border-radius: 0; box-shadow: none; }\n.ghcn-stat-strip:where([data-variant=\"minimal\"]) .ghcn-stat-strip__item { border-right: 0; padding: 20px 16px; }"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"gscan": {
|
|
66
|
+
"rules_satisfied": [
|
|
67
|
+
"GS010-PJ-VALID"
|
|
68
|
+
],
|
|
69
|
+
"notes": "Pure CSS semantic definition list (<dl>) with tabular numbers."
|
|
70
|
+
},
|
|
71
|
+
"styleSlots": {
|
|
72
|
+
"class": [
|
|
73
|
+
".ghcn-stat-strip"
|
|
74
|
+
],
|
|
75
|
+
"itemClass": [
|
|
76
|
+
".ghcn-stat-strip__item"
|
|
77
|
+
],
|
|
78
|
+
"valueClass": [
|
|
79
|
+
".ghcn-stat-strip__value"
|
|
80
|
+
],
|
|
81
|
+
"labelClass": [
|
|
82
|
+
".ghcn-stat-strip__label"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|