ghostcn 1.6.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/registry/components/account-card.json +57 -0
- package/dist/registry/components/author-card.json +1 -1
- package/dist/registry/components/author-stack.json +63 -0
- package/dist/registry/components/back-to-top.json +72 -0
- 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/hero.json +89 -0
- package/dist/registry/components/image-lightbox.json +44 -0
- package/dist/registry/components/magazine-grid.json +62 -0
- package/dist/registry/components/mobile-dock.json +69 -0
- 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-list.json +62 -0
- 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/related-posts.json +1 -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/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/tabs.json +81 -0
- package/dist/registry/components/tag-bar.json +63 -0
- package/dist/registry/components/textarea.json +95 -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/index.json +389 -0
- package/dist/templates/playground/playground.js +1 -1
- package/dist/utils/playground-server.js +8 -2
- package/dist/utils/preview-renderer.d.ts +72 -0
- package/dist/utils/preview-renderer.js +51 -5
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-dock",
|
|
3
|
+
"type": "components:layout",
|
|
4
|
+
"description": "Thumb-friendly mobile bottom navigation bar with Home, Ghost Search, Member Portal, and Top actions.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Dock style: default (edge-to-edge), floating (pill), or minimal.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"floating",
|
|
13
|
+
"minimal"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"ariaLabel": {
|
|
18
|
+
"description": "Accessible nav label.",
|
|
19
|
+
"default": "Mobile navigation"
|
|
20
|
+
},
|
|
21
|
+
"homeLabel": {
|
|
22
|
+
"description": "Home item label.",
|
|
23
|
+
"default": "Home"
|
|
24
|
+
},
|
|
25
|
+
"searchLabel": {
|
|
26
|
+
"description": "Search item label.",
|
|
27
|
+
"default": "Search"
|
|
28
|
+
},
|
|
29
|
+
"subscribeLabel": {
|
|
30
|
+
"description": "Subscribe item label for visitors.",
|
|
31
|
+
"default": "Subscribe"
|
|
32
|
+
},
|
|
33
|
+
"topLabel": {
|
|
34
|
+
"description": "Top anchor label.",
|
|
35
|
+
"default": "Top"
|
|
36
|
+
},
|
|
37
|
+
"alwaysVisible": {
|
|
38
|
+
"description": "Render inline at all viewport widths (useful for previews)."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
{
|
|
43
|
+
"name": "mobile-dock.hbs",
|
|
44
|
+
"type": "partial",
|
|
45
|
+
"target": "partials/components/mobile-dock.hbs",
|
|
46
|
+
"content": "{{!-- Styling parameters: class, linkClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-mobile-dock{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"floating\"}}floating{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}\" data-always-visible=\"{{#if alwaysVisible}}true{{else}}false{{/if}}\" aria-label=\"{{#if ariaLabel}}{{ariaLabel}}{{else}}Mobile navigation{{/if}}\">\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"{{@site.url}}\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 9.5 10 3.5l7 6V16.5a1 1 0 0 1-1 1h-4v-5H8v5H4a1 1 0 0 1-1-1V9.5Z\"/></svg>\n <span>{{#if homeLabel}}{{homeLabel}}{{else}}Home{{/if}}</span>\n </a>\n <button type=\"button\" class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" data-ghost-search>\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\"><circle cx=\"9\" cy=\"9\" r=\"5.5\"/><path d=\"m13.5 13.5 3.5 3.5\"/></svg>\n <span>{{#if searchLabel}}{{searchLabel}}{{else}}Search{{/if}}</span>\n </button>\n {{#if @site.members_enabled}}\n {{#if @member}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"#/portal/account\" data-portal=\"account\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"7\" r=\"3.25\"/><path d=\"M4 16.5a6 6 0 0 1 12 0\"/></svg>\n <span>Account</span>\n </a>\n {{else}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}} ghcn-mobile-dock__item--accent\" href=\"#/portal/signup\" data-portal=\"signup\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"4.5\" width=\"15\" height=\"11\" rx=\"2\"/><path d=\"m3.5 6 6.5 4.75L16.5 6\"/></svg>\n <span>{{#if subscribeLabel}}{{subscribeLabel}}{{else}}Subscribe{{/if}}</span>\n </a>\n {{/if}}\n {{/if}}\n <a class=\"ghcn-mobile-dock__item{{#if ghostcnStyles.linkClass}} {{ghostcnStyles.linkClass}}{{/if}}\" href=\"#top\">\n <svg aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 15.5V4.5M5.5 9 10 4.5 14.5 9\"/></svg>\n <span>{{#if topLabel}}{{topLabel}}{{else}}Top{{/if}}</span>\n </a>\n</nav>\n{{/with}}"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "mobile-dock.css",
|
|
50
|
+
"type": "style",
|
|
51
|
+
"target": "assets/css/components/mobile-dock.css",
|
|
52
|
+
"content": ".ghcn-mobile-dock { box-sizing: border-box; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: inherit; }\n.ghcn-mobile-dock *, .ghcn-mobile-dock *::before, .ghcn-mobile-dock *::after { box-sizing: border-box; }\n@media (min-width: 768px) { .ghcn-mobile-dock:not([data-always-visible=\"true\"]) { display: none; } }\n.ghcn-mobile-dock[data-always-visible=\"true\"] { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; width: min(100%, 420px); margin-inline: auto; }\n.ghcn-mobile-dock:where([data-variant=\"floating\"]) { left: 12px; right: 12px; bottom: 12px; max-width: 420px; margin-inline: auto; border: 1px solid var(--border); border-radius: 9999px; padding: 6px 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }\n.ghcn-mobile-dock:where([data-variant=\"floating\"][data-always-visible=\"true\"]) { left: auto; right: auto; bottom: auto; }\n.ghcn-mobile-dock:where([data-variant=\"minimal\"]) { background: var(--background); backdrop-filter: none; -webkit-backdrop-filter: none; }\n.ghcn-mobile-dock__item { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 46px; padding: 4px 6px; border: 0; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: transparent; color: var(--muted-foreground); font: inherit; font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }\n.ghcn-mobile-dock:where([data-variant=\"floating\"]) .ghcn-mobile-dock__item { border-radius: 9999px; }\n.ghcn-mobile-dock__item:hover { color: var(--foreground); background: var(--secondary); }\n.ghcn-mobile-dock__item--accent { color: var(--primary); }\n.ghcn-mobile-dock:focus-visible, :where(.ghcn-mobile-dock) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"gscan": {
|
|
56
|
+
"rules_satisfied": [
|
|
57
|
+
"GS010-PJ-VALID"
|
|
58
|
+
],
|
|
59
|
+
"notes": "Uses Ghost native @site.url, data-ghost-search, and data-portal actions."
|
|
60
|
+
},
|
|
61
|
+
"styleSlots": {
|
|
62
|
+
"class": [
|
|
63
|
+
".ghcn-mobile-dock"
|
|
64
|
+
],
|
|
65
|
+
"linkClass": [
|
|
66
|
+
".ghcn-mobile-dock__item"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"name": "newsletter-form.css",
|
|
25
25
|
"type": "style",
|
|
26
26
|
"target": "assets/css/components/newsletter-form.css",
|
|
27
|
-
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b);\n margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px));\n font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n padding:
|
|
27
|
+
"content": "/* ghostcn: Newsletter Form Styles */\n.gh-newsletter-form {\n box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b);\n margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px));\n font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n padding: clamp(28px, 4.5vw, 48px) clamp(24px, 4.5vw, 52px);\n text-align: center;\n width: min(100% - 32px, 1152px);\n margin-inline: auto;\n border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px);\n display: grid;\n gap: 24px;\n align-items: center;\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-form {\n grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);\n text-align: left;\n gap: 40px;\n }\n}\n\n.gh-newsletter-form *,\n.gh-newsletter-form *::before,\n.gh-newsletter-form *::after {\n box-sizing: border-box;\n}\n\n.gh-newsletter-heading { margin: 0; }\n\n.gh-newsletter-title {\n font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance;\n font-size: clamp(24px, 3vw, 32px);\n margin: 0 0 8px;\n color: inherit;\n}\n\n.gh-newsletter-desc {\n color: var(--muted-foreground, #71717a);\n font-size: 15px;\n line-height: 1.6;\n margin: 0 auto;\n max-width: 46ch;\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-desc { margin: 0; }\n}\n\n.gh-newsletter-fields {\n display: grid;\n gap: 8px;\n width: 100%;\n max-width: 460px;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n grid-template-columns: minmax(0, 1fr) auto;\n }\n}\n\n@media (min-width: 820px) {\n .gh-newsletter-fields {\n margin: 0 0 0 auto;\n }\n}\n\n.gh-newsletter-input {\n min-width: 0;\n min-height: 44px;\n padding: 0 14px;\n background-color: var(--background, #ffffff);\n color: var(--foreground, #09090b);\n border: 1px solid var(--input, #e4e4e7);\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: 14.5px;\n line-height: 1.25;\n}\n\n.gh-newsletter-form:focus-visible, :where(.gh-newsletter-form) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n\n.gh-newsletter-btn {\n background-color: var(--primary, var(--ghost-accent-color, #18181b));\n color: var(--primary-foreground, #ffffff);\n min-height: 44px;\n padding: 0 22px;\n border-radius: var(--ghcn-control-radius, var(--radius, 8px));\n font-family: inherit;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.25;\n border: 1px solid transparent;\n cursor: pointer;\n transition: opacity 0.15s ease;\n}\n\n.gh-newsletter-btn:hover {\n opacity: 0.9;\n}\n\n.gh-newsletter-msg-success,\n.gh-newsletter-msg-error {\n display: none;\n grid-column: 1 / -1;\n font-size: 12px;\n font-weight: 500;\n}\n\n.gh-newsletter-fields.success .gh-newsletter-msg-success,\n.gh-newsletter-fields.error .gh-newsletter-msg-error {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n\n.gh-newsletter-form .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.gh-newsletter-msg-success {\n color: var(--success, #15803d);\n}\n\n.gh-newsletter-msg-error {\n color: var(--destructive, #dc2626);\n}\n"
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"gscan": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "partial",
|
|
11
11
|
"target": "partials/pagination.hbs",
|
|
12
12
|
"placement": "theme",
|
|
13
|
-
"content": "{{!-- Styling parameters: class, buttonClass, statusClass --}}\n{{#with this as |ghostcnStyles|}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\"
|
|
13
|
+
"content": "{{!-- Styling parameters: class, buttonClass, statusClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if prev}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url prev}}\" rel=\"prev\"><span aria-hidden=\"true\">←</span> Newer</a></div>\n <span class=\"ghcn-pagination__status{{#if ghostcnStyles.statusClass}} {{ghostcnStyles.statusClass}}{{/if}}\">Page <strong>{{page}}</strong> of <strong>{{pages}}</strong></span>\n <div class=\"ghcn-pagination__side ghcn-pagination__side--end\">{{#if next}}<a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url next}}\" rel=\"next\">Older <span aria-hidden=\"true\">→</span></a>{{/if}}</div>\n</nav>\n{{else}}{{#if next}}\n<nav class=\"ghcn-pagination{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" aria-label=\"Pagination\">\n <div class=\"ghcn-pagination__side\"></div>\n <span class=\"ghcn-pagination__status{{#if ghostcnStyles.statusClass}} {{ghostcnStyles.statusClass}}{{/if}}\">Page <strong>{{page}}</strong> of <strong>{{pages}}</strong></span>\n <div class=\"ghcn-pagination__side ghcn-pagination__side--end\"><a class=\"ghcn-button{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-button--outline\" href=\"{{page_url next}}\" rel=\"next\">Older <span aria-hidden=\"true\">→</span></a></div>\n</nav>\n{{/if}}{{/if}}\n{{/with}}"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "pagination.css",
|
|
@@ -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 — Biron editorial frameless card */\n.gh-post-card {\n box-sizing: border-box;\n min-width: 0;\n overflow-wrap: anywhere;\n background: transparent;\n color: var(--card-foreground, var(--foreground, #09090b));\n font-family: inherit;\n font-size: var(--ghcn-text-body, 16px);\n line-height: 1.5;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.gh-post-card *,\n.gh-post-card *::before,\n.gh-post-card *::after {\n box-sizing: border-box;\n}\n\n.gh-post-card-image {\n aspect-ratio: 16 / 10;\n overflow: hidden;\n display: block;\n border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 4px);\n border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);\n background-color: var(--muted, #f4f4f5);\n}\n\n.gh-post-card-image img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.gh-post-card:hover .gh-post-card-image img {\n transform: scale(1.035);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gh-post-card, .gh-post-card-image img { transition: none; transform: none; }\n}\n\n.gh-post-card-content {\n padding: 0 2px;\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 14px;\n}\n\n.gh-post-card-meta {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 10px;\n color: var(--muted-foreground);\n font-size: 12.5px;\n}\n\n.gh-post-card-tag {\n display: inline-flex;\n align-items: center;\n padding: 3px 10px;\n border-radius: 9999px;\n background: var(--secondary);\n color: var(--foreground);\n font-size: 11.5px;\n font-weight: 600;\n letter-spacing: 0.01em;\n text-decoration: none;\n transition: background-color 150ms ease, color 150ms ease;\n}\n\n.gh-post-card-tag:hover {\n background: var(--primary);\n color: var(--primary-foreground);\n}\n\n.gh-post-card-title {\n font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit;\n line-height: 1.28;\n margin: 0 0 8px;\n}\n\n.gh-post-card-title a {\n color: inherit;\n text-decoration: none;\n transition: opacity 150ms ease;\n}\n\n.gh-post-card-title a:hover {\n opacity: 0.78;\n}\n\n.gh-post-card-excerpt {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n color: var(--muted-foreground, #71717a);\n font-size: 14.5px;\n line-height: 1.58;\n margin: 0;\n}\n\n.gh-post-card-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 4px 12px;\n font-size: 12.5px;\n color: var(--muted-foreground, #71717a);\n}\n\n.gh-post-card-reading-time { color: var(--muted-foreground); }\n.gh-post-card-separator { color: color-mix(in srgb, var(--muted-foreground) 45%, transparent); }\n.gh-post-card-author { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--foreground); }\n.gh-post-card:focus-visible, :where(.gh-post-card) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n.gh-post-card-image:focus-visible { outline-offset: -3px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -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 { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-post-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0
|
|
28
|
+
"content": ".ghcn-post-grid { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-post-grid__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 24px; }\n.ghcn-post-grid__grid { display: grid; grid-template-columns: 1fr; gap: 36px 28px; }\n@media (min-width: 640px) { .ghcn-post-grid__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@media (min-width: 980px) { .ghcn-post-grid__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n.ghcn-post-grid__grid > * { min-width: 0; }\n.ghcn-post-grid__empty { color: var(--muted-foreground); }"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
"styleSlots": {
|
|
@@ -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; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); text-align: center; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; max-width:
|
|
18
|
+
"content": "/* ghostcn: Post Header */\n.ghcn-post-header { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1040px); margin: 20px auto 36px; text-align: center; }\n.ghcn-post-header *, .ghcn-post-header *::before, .ghcn-post-header *::after { box-sizing: border-box; }\n.ghcn-post-header__title { font-size: var(--ghcn-title-display, clamp(32px, 5vw, 56px)); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(32px, 4.6vw, 52px); max-width: 22ch; margin: 14px auto 14px; }\n.ghcn-post-header__excerpt { max-width: 58ch; margin: 0 auto 20px; color: var(--muted-foreground); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }\n.ghcn-post-header__meta, .ghcn-post-header__author { display: flex; align-items: center; justify-content: center; gap: 10px; }\n.ghcn-post-header__meta { flex-wrap: wrap; color: var(--muted-foreground); font-size: 13.5px; }\n.ghcn-post-header__author { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-post-header__author .ghcn-avatar { width: 32px; height: 32px; border-radius: 9999px; object-fit: cover; }\n.ghcn-post-header__media { margin: 32px auto 0; max-width: 1040px; }\n.ghcn-post-header__image { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 580px; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 6px); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); object-fit: cover; }\n.ghcn-post-header__media figcaption { margin-top: 12px; color: var(--muted-foreground); font-size: 13px; }\n"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"gscan": {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "post-list",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Compact editorial post list for newsletter archives, feeds, and sidebars.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Feed layout treatment.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"compact",
|
|
13
|
+
"bordered",
|
|
14
|
+
"minimal"
|
|
15
|
+
],
|
|
16
|
+
"default": "default"
|
|
17
|
+
},
|
|
18
|
+
"heading": {
|
|
19
|
+
"description": "Optional section heading."
|
|
20
|
+
},
|
|
21
|
+
"showImage": {
|
|
22
|
+
"description": "Boolean. Show feature image thumbnails beside each post."
|
|
23
|
+
},
|
|
24
|
+
"emptyText": {
|
|
25
|
+
"description": "Optional message when no posts are available."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{
|
|
30
|
+
"name": "post-list.hbs",
|
|
31
|
+
"type": "partial",
|
|
32
|
+
"target": "partials/components/post-list.hbs",
|
|
33
|
+
"content": "{{!-- Styling parameters: class, titleClass, itemClass, postTitleClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if posts}}\n<section class=\"ghcn-post-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"compact\"}}compact{{else}}{{#match variant \"bordered\"}}bordered{{else}}{{#match variant \"minimal\"}}minimal{{else}}default{{/match}}{{/match}}{{/match}}\" aria-label=\"{{#if heading}}{{heading}}{{else}}Posts{{/if}}\">\n {{#if heading}}<h2 class=\"ghcn-post-list__heading{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{heading}}</h2>{{/if}}\n <div class=\"ghcn-post-list__items\">\n {{#foreach posts}}\n <article class=\"ghcn-post-list__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n {{#if ghostcnStyles.showImage}}{{#if feature_image}}\n <a class=\"ghcn-post-list__thumb\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">\n <img src=\"{{img_url feature_image size=\"s\"}}\" alt=\"\" loading=\"lazy\" />\n </a>\n {{/if}}{{/if}}\n <div class=\"ghcn-post-list__body\">\n <div class=\"ghcn-post-list__meta\">\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n {{#if primary_tag}}<span aria-hidden=\"true\">•</span><a class=\"ghcn-post-list__tag\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a>{{/if}}\n <span aria-hidden=\"true\">•</span>\n <span>{{reading_time}}</span>\n </div>\n <h3 class=\"ghcn-post-list__title{{#if ghostcnStyles.postTitleClass}} {{ghostcnStyles.postTitleClass}}{{/if}}\"><a href=\"{{url}}\">{{title}}</a></h3>\n {{#if excerpt}}<p class=\"ghcn-post-list__excerpt\">{{excerpt words=\"24\"}}</p>{{/if}}\n </div>\n <a class=\"ghcn-post-list__arrow\" href=\"{{url}}\" tabindex=\"-1\" aria-hidden=\"true\">→</a>\n </article>\n {{/foreach}}\n </div>\n</section>\n{{else}}{{#if emptyText}}<section class=\"ghcn-post-list{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\"><p class=\"ghcn-post-list__empty\">{{emptyText}}</p></section>{{/if}}{{/if}}\n{{/with}}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "post-list.css",
|
|
37
|
+
"type": "style",
|
|
38
|
+
"target": "assets/css/components/post-list.css",
|
|
39
|
+
"content": ".ghcn-post-list { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 820px); margin-inline: auto; }\n.ghcn-post-list *, .ghcn-post-list *::before, .ghcn-post-list *::after { box-sizing: border-box; }\n.ghcn-post-list__heading { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 var(--ghcn-section-gap, 20px); }\n.ghcn-post-list__items { display: grid; }\n.ghcn-post-list__item { display: flex; align-items: flex-start; gap: 18px; padding-block: 20px; border-bottom: 1px solid var(--border); transition: background-color 150ms ease, border-color 150ms ease; }\n.ghcn-post-list__item:first-child { border-top: 1px solid var(--border); }\n.ghcn-post-list__thumb { flex: 0 0 112px; aspect-ratio: 16 / 10; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); overflow: hidden; background: var(--muted); border: 1px solid var(--border); }\n.ghcn-post-list__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.ghcn-post-list__body { min-width: 0; flex: 1; }\n.ghcn-post-list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--muted-foreground); font-size: var(--ghcn-text-meta, 13px); font-variant-numeric: tabular-nums; }\n.ghcn-post-list__tag { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-post-list__tag:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-post-list__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; }\n.ghcn-post-list__title a { color: inherit; text-decoration: none; }\n.ghcn-post-list__title a:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-post-list__excerpt { margin: 6px 0 0; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); line-height: 1.55; }\n.ghcn-post-list__arrow { flex: 0 0 auto; align-self: center; color: var(--muted-foreground); text-decoration: none; font-size: 18px; transition: transform 160ms ease, color 160ms ease; }\n.ghcn-post-list__item:hover .ghcn-post-list__arrow { transform: translateX(3px); color: var(--foreground); }\n.ghcn-post-list__empty { color: var(--muted-foreground); }\n\n/* Compact: hide excerpts and tighten row rhythm */\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__item { padding-block: 13px; align-items: center; }\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__excerpt { display: none; }\n.ghcn-post-list:where([data-variant=\"compact\"]) .ghcn-post-list__title { font-size: 16px; }\n\n/* Bordered: individual elevated surface rows */\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__items { gap: 12px; }\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__item { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); padding: 18px 20px; }\n.ghcn-post-list:where([data-variant=\"bordered\"]) .ghcn-post-list__item:hover { border-color: color-mix(in srgb, var(--foreground) 22%, var(--border)); }\n\n/* Minimal: clean date-left archive layout without arrows */\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__excerpt,\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__arrow { display: none; }\n.ghcn-post-list:where([data-variant=\"minimal\"]) .ghcn-post-list__item { padding-block: 12px; border-color: color-mix(in srgb, var(--border) 60%, transparent); }\n\n@media (max-width: 560px) {\n .ghcn-post-list__thumb { flex-basis: 84px; }\n .ghcn-post-list__arrow { display: none; }\n}\n.ghcn-post-list:focus-visible, :where(.ghcn-post-list) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-post-list__item, .ghcn-post-list__arrow { transition: none; transform: none; } }\n"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"gscan": {
|
|
43
|
+
"rules_satisfied": [
|
|
44
|
+
"GS010-PJ-VALID"
|
|
45
|
+
],
|
|
46
|
+
"notes": "Uses native Ghost content and site helpers."
|
|
47
|
+
},
|
|
48
|
+
"styleSlots": {
|
|
49
|
+
"class": [
|
|
50
|
+
".ghcn-post-list"
|
|
51
|
+
],
|
|
52
|
+
"titleClass": [
|
|
53
|
+
".ghcn-post-list__heading"
|
|
54
|
+
],
|
|
55
|
+
"itemClass": [
|
|
56
|
+
".ghcn-post-list__item"
|
|
57
|
+
],
|
|
58
|
+
"postTitleClass": [
|
|
59
|
+
".ghcn-post-list__title"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pull-quote",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Editorial pull quote and reader testimonial block with accent rule, optional avatar, and centered/card variants.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Quote layout: default, centered, or card.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"centered",
|
|
13
|
+
"card"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"size": {
|
|
18
|
+
"description": "Typography scale: sm, default, or lg.",
|
|
19
|
+
"options": [
|
|
20
|
+
"sm",
|
|
21
|
+
"default",
|
|
22
|
+
"lg"
|
|
23
|
+
],
|
|
24
|
+
"default": "default"
|
|
25
|
+
},
|
|
26
|
+
"quote": {
|
|
27
|
+
"description": "Escaped quote text (or pass rich HTML as a partial block)."
|
|
28
|
+
},
|
|
29
|
+
"attribution": {
|
|
30
|
+
"description": "Attribution name."
|
|
31
|
+
},
|
|
32
|
+
"role": {
|
|
33
|
+
"description": "Optional publication, title, or source."
|
|
34
|
+
},
|
|
35
|
+
"avatar": {
|
|
36
|
+
"description": "Optional author avatar image URL."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
{
|
|
41
|
+
"name": "pull-quote.hbs",
|
|
42
|
+
"type": "partial",
|
|
43
|
+
"target": "partials/components/pull-quote.hbs",
|
|
44
|
+
"content": "{{!-- Styling parameters: class, quoteClass, citeClass --}}\n{{#with this as |ghostcnStyles|}}\n<figure class=\"ghcn-pull-quote{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"centered\"}}centered{{else}}{{#match variant \"card\"}}card{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\">\n <svg class=\"ghcn-pull-quote__mark\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M9.98 6.5c-2.6 1.24-4.18 3.38-4.44 6.13.45-.18.96-.28 1.5-.28 1.98 0 3.46 1.46 3.46 3.44 0 2.02-1.56 3.6-3.66 3.6-2.46 0-4.24-1.94-4.24-4.96 0-4.28 2.46-7.68 6.5-9.53l.88 1.6Zm10.5 0c-2.6 1.24-4.18 3.38-4.44 6.13.45-.18.96-.28 1.5-.28 1.98 0 3.46 1.46 3.46 3.44 0 2.02-1.56 3.6-3.66 3.6-2.46 0-4.24-1.94-4.24-4.96 0-4.28 2.46-7.68 6.5-9.53l.88 1.6Z\"/></svg>\n <blockquote class=\"ghcn-pull-quote__text{{#if ghostcnStyles.quoteClass}} {{ghostcnStyles.quoteClass}}{{/if}}\">\n {{#> @partial-block}}{{#if quote}}<p>{{quote}}</p>{{else}}<p>Independent publishing works best when the design gets out of the way and lets ideas breathe.</p>{{/if}}{{/@partial-block}}\n </blockquote>\n <figcaption class=\"ghcn-pull-quote__cite{{#if ghostcnStyles.citeClass}} {{ghostcnStyles.citeClass}}{{/if}}\">\n {{#if avatar}}<img class=\"ghcn-pull-quote__avatar\" src=\"{{img_url avatar size=\"xs\"}}\" alt=\"{{#if attribution}}{{attribution}}{{else}}Reader{{/if}}\" loading=\"lazy\" />{{/if}}\n <span class=\"ghcn-pull-quote__meta\">\n <strong class=\"ghcn-pull-quote__author\">{{#if attribution}}{{attribution}}{{else}}Alex Reader{{/if}}</strong>\n {{#if role}}<span class=\"ghcn-pull-quote__role\">{{role}}</span>{{/if}}\n </span>\n </figcaption>\n</figure>\n{{/with}}"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "pull-quote.css",
|
|
48
|
+
"type": "style",
|
|
49
|
+
"target": "assets/css/components/pull-quote.css",
|
|
50
|
+
"content": ".ghcn-pull-quote { box-sizing: border-box; margin: var(--ghcn-section-space, clamp(24px, 4vw, 48px)) 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--primary); font-family: inherit; color: var(--foreground); }\n.ghcn-pull-quote *, .ghcn-pull-quote *::before, .ghcn-pull-quote *::after { box-sizing: border-box; }\n.ghcn-pull-quote__mark { display: block; margin-bottom: 10px; color: var(--primary); opacity: .75; }\n.ghcn-pull-quote__text { margin: 0; font-size: clamp(19px, 2.2vw, 24px); font-weight: 500; line-height: 1.45; letter-spacing: -.018em; color: var(--foreground); }\n.ghcn-pull-quote__text p { margin: 0; }\n.ghcn-pull-quote__cite { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13.5px; color: var(--muted-foreground); }\n.ghcn-pull-quote__avatar { width: 32px; height: 32px; border-radius: 9999px; object-fit: cover; border: 1px solid var(--border); }\n.ghcn-pull-quote__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }\n.ghcn-pull-quote__author { color: var(--foreground); font-weight: 600; }\n.ghcn-pull-quote__role { color: var(--muted-foreground); }\n.ghcn-pull-quote:where([data-variant=\"centered\"]) { border-left: 0; border-block: 1px solid var(--border); padding: 28px 16px; text-align: center; }\n.ghcn-pull-quote:where([data-variant=\"centered\"]) .ghcn-pull-quote__mark { margin-inline: auto; }\n.ghcn-pull-quote:where([data-variant=\"centered\"]) .ghcn-pull-quote__text { max-width: 44ch; margin-inline: auto; }\n.ghcn-pull-quote:where([data-variant=\"centered\"]) .ghcn-pull-quote__cite { justify-content: center; }\n.ghcn-pull-quote: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); border-left: 1px solid var(--border); padding: var(--ghcn-panel-padding, clamp(16px, 3vw, 24px)); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }\n.ghcn-pull-quote:where([data-size=\"sm\"]) .ghcn-pull-quote__text { font-size: 16.5px; }\n.ghcn-pull-quote:where([data-size=\"lg\"]) .ghcn-pull-quote__text { font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"gscan": {
|
|
54
|
+
"rules_satisfied": [
|
|
55
|
+
"GS010-PJ-VALID"
|
|
56
|
+
],
|
|
57
|
+
"notes": "Pure CSS editorial blockquote supporting plain text or nested partial blocks."
|
|
58
|
+
},
|
|
59
|
+
"styleSlots": {
|
|
60
|
+
"class": [
|
|
61
|
+
".ghcn-pull-quote"
|
|
62
|
+
],
|
|
63
|
+
"quoteClass": [
|
|
64
|
+
".ghcn-pull-quote__text"
|
|
65
|
+
],
|
|
66
|
+
"citeClass": [
|
|
67
|
+
".ghcn-pull-quote__cite"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "radio-group",
|
|
3
|
+
"type": "components:ui",
|
|
4
|
+
"description": "Accessible native radio button group with default and selectable card styles.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Presentation: default or card.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"card"
|
|
13
|
+
],
|
|
14
|
+
"default": "default"
|
|
15
|
+
},
|
|
16
|
+
"size": {
|
|
17
|
+
"description": "Control scale: sm, default, or lg.",
|
|
18
|
+
"options": [
|
|
19
|
+
"sm",
|
|
20
|
+
"default",
|
|
21
|
+
"lg"
|
|
22
|
+
],
|
|
23
|
+
"default": "default"
|
|
24
|
+
},
|
|
25
|
+
"legend": {
|
|
26
|
+
"description": "Group heading label.",
|
|
27
|
+
"default": "Delivery frequency"
|
|
28
|
+
},
|
|
29
|
+
"name": {
|
|
30
|
+
"description": "Shared native radio group name.",
|
|
31
|
+
"default": "ghcn-radio"
|
|
32
|
+
},
|
|
33
|
+
"option1": {
|
|
34
|
+
"description": "First option label.",
|
|
35
|
+
"default": "Every new post"
|
|
36
|
+
},
|
|
37
|
+
"option1Desc": {
|
|
38
|
+
"description": "Optional first option description."
|
|
39
|
+
},
|
|
40
|
+
"option1Value": {
|
|
41
|
+
"description": "Optional first option value."
|
|
42
|
+
},
|
|
43
|
+
"option2": {
|
|
44
|
+
"description": "Second option label.",
|
|
45
|
+
"default": "Weekly Sunday digest"
|
|
46
|
+
},
|
|
47
|
+
"option2Desc": {
|
|
48
|
+
"description": "Optional second option description."
|
|
49
|
+
},
|
|
50
|
+
"option2Value": {
|
|
51
|
+
"description": "Optional second option value."
|
|
52
|
+
},
|
|
53
|
+
"option3": {
|
|
54
|
+
"description": "Optional third option label."
|
|
55
|
+
},
|
|
56
|
+
"option3Desc": {
|
|
57
|
+
"description": "Optional third option description."
|
|
58
|
+
},
|
|
59
|
+
"option3Value": {
|
|
60
|
+
"description": "Optional third option value."
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
{
|
|
65
|
+
"name": "radio-group.hbs",
|
|
66
|
+
"type": "partial",
|
|
67
|
+
"target": "partials/components/radio-group.hbs",
|
|
68
|
+
"content": "{{!-- Styling parameters: class, legendClass, optionClass --}}\n{{#with this as |ghostcnStyles|}}\n<fieldset class=\"ghcn-ui-radio{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"card\"}}card{{else}}default{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\">\n <legend class=\"ghcn-ui-radio__legend{{#if ghostcnStyles.legendClass}} {{ghostcnStyles.legendClass}}{{/if}}\">{{#if legend}}{{legend}}{{else}}Delivery frequency{{/if}}</legend>\n <div class=\"ghcn-ui-radio__options\">\n <label class=\"ghcn-ui-radio__option{{#if ghostcnStyles.optionClass}} {{ghostcnStyles.optionClass}}{{/if}}\">\n <span class=\"ghcn-ui-radio__control\">\n <input class=\"ghcn-ui-radio__input\" type=\"radio\" name=\"{{#if name}}{{name}}{{else}}ghcn-radio{{/if}}\" value=\"{{#if option1Value}}{{option1Value}}{{else}}option-1{{/if}}\" checked />\n <span class=\"ghcn-ui-radio__dot\" aria-hidden=\"true\"></span>\n </span>\n <span class=\"ghcn-ui-radio__copy\">\n <span class=\"ghcn-ui-radio__label\">{{#if option1}}{{option1}}{{else}}Every new post{{/if}}</span>\n {{#if option1Desc}}<span class=\"ghcn-ui-radio__desc\">{{option1Desc}}</span>{{/if}}\n </span>\n </label>\n <label class=\"ghcn-ui-radio__option{{#if ghostcnStyles.optionClass}} {{ghostcnStyles.optionClass}}{{/if}}\">\n <span class=\"ghcn-ui-radio__control\">\n <input class=\"ghcn-ui-radio__input\" type=\"radio\" name=\"{{#if name}}{{name}}{{else}}ghcn-radio{{/if}}\" value=\"{{#if option2Value}}{{option2Value}}{{else}}option-2{{/if}}\" />\n <span class=\"ghcn-ui-radio__dot\" aria-hidden=\"true\"></span>\n </span>\n <span class=\"ghcn-ui-radio__copy\">\n <span class=\"ghcn-ui-radio__label\">{{#if option2}}{{option2}}{{else}}Weekly Sunday digest{{/if}}</span>\n {{#if option2Desc}}<span class=\"ghcn-ui-radio__desc\">{{option2Desc}}</span>{{/if}}\n </span>\n </label>\n {{#if option3}}\n <label class=\"ghcn-ui-radio__option{{#if ghostcnStyles.optionClass}} {{ghostcnStyles.optionClass}}{{/if}}\">\n <span class=\"ghcn-ui-radio__control\">\n <input class=\"ghcn-ui-radio__input\" type=\"radio\" name=\"{{#if name}}{{name}}{{else}}ghcn-radio{{/if}}\" value=\"{{#if option3Value}}{{option3Value}}{{else}}option-3{{/if}}\" />\n <span class=\"ghcn-ui-radio__dot\" aria-hidden=\"true\"></span>\n </span>\n <span class=\"ghcn-ui-radio__copy\">\n <span class=\"ghcn-ui-radio__label\">{{option3}}</span>\n {{#if option3Desc}}<span class=\"ghcn-ui-radio__desc\">{{option3Desc}}</span>{{/if}}\n </span>\n </label>\n {{/if}}\n </div>\n</fieldset>\n{{/with}}"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "radio-group.css",
|
|
72
|
+
"type": "style",
|
|
73
|
+
"target": "assets/css/components/radio-group.css",
|
|
74
|
+
"content": ".ghcn-ui-radio { box-sizing: border-box; margin: 0; padding: 0; border: 0; width: 100%; font-family: inherit; font-size: var(--ghcn-text-small, 14px); color: var(--foreground); }\n.ghcn-ui-radio *, .ghcn-ui-radio *::before, .ghcn-ui-radio *::after { box-sizing: border-box; }\n.ghcn-ui-radio__legend { padding: 0; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--foreground); }\n.ghcn-ui-radio__options { display: grid; gap: 10px; }\n.ghcn-ui-radio__option { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }\n.ghcn-ui-radio:where([data-variant=\"card\"]) .ghcn-ui-radio__option { 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: 13px 15px; transition: border-color 150ms ease, background-color 150ms ease; }\n.ghcn-ui-radio:where([data-variant=\"card\"]) .ghcn-ui-radio__option:hover { border-color: color-mix(in srgb, var(--foreground) 22%, var(--border)); }\n.ghcn-ui-radio:where([data-variant=\"card\"]) .ghcn-ui-radio__option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--card)); }\n.ghcn-ui-radio__control { position: relative; flex: 0 0 auto; margin-top: 2px; display: inline-flex; }\n.ghcn-ui-radio__input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }\n.ghcn-ui-radio__dot { width: 18px; height: 18px; border-radius: 9999px; border: 1.5px solid var(--input, var(--border)); background: var(--background); display: grid; place-items: center; transition: border-color 150ms ease; }\n.ghcn-ui-radio__dot::after { content: \"\"; width: 8px; height: 8px; border-radius: 9999px; background: var(--primary); transform: scale(0); transition: transform 140ms ease; }\n.ghcn-ui-radio__input:checked + .ghcn-ui-radio__dot { border-color: var(--primary); }\n.ghcn-ui-radio__input:checked + .ghcn-ui-radio__dot::after { transform: scale(1); }\n.ghcn-ui-radio__input:focus-visible + .ghcn-ui-radio__dot { outline: 2px solid var(--ring, var(--primary)); outline-offset: 2px; }\n.ghcn-ui-radio__copy { display: grid; gap: 2px; min-width: 0; }\n.ghcn-ui-radio__label { font-weight: 500; line-height: 1.4; color: var(--foreground); }\n.ghcn-ui-radio__desc { font-size: 12.5px; line-height: 1.45; color: var(--muted-foreground); }\n.ghcn-ui-radio:where([data-size=\"sm\"]) { font-size: 13px; }\n.ghcn-ui-radio:where([data-size=\"sm\"]) .ghcn-ui-radio__dot { width: 16px; height: 16px; }\n.ghcn-ui-radio:where([data-size=\"sm\"]) .ghcn-ui-radio__dot::after { width: 6px; height: 6px; }\n.ghcn-ui-radio:where([data-size=\"lg\"]) { font-size: 15px; }\n.ghcn-ui-radio:where([data-size=\"lg\"]) .ghcn-ui-radio__dot { width: 20px; height: 20px; }\n.ghcn-ui-radio:where([data-size=\"lg\"]) .ghcn-ui-radio__dot::after { width: 10px; height: 10px; }"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"gscan": {
|
|
78
|
+
"rules_satisfied": [
|
|
79
|
+
"GS010-PJ-VALID"
|
|
80
|
+
],
|
|
81
|
+
"notes": "Zero-JS semantic fieldset/legend native radio group."
|
|
82
|
+
},
|
|
83
|
+
"styleSlots": {
|
|
84
|
+
"class": [
|
|
85
|
+
".ghcn-ui-radio"
|
|
86
|
+
],
|
|
87
|
+
"legendClass": [
|
|
88
|
+
".ghcn-ui-radio__legend"
|
|
89
|
+
],
|
|
90
|
+
"optionClass": [
|
|
91
|
+
".ghcn-ui-radio__option"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reader-controls",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Compact reading comfort toolbar letting readers adjust article font size and serif/sans typeface with localStorage persistence.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Toolbar style: default, outline, or compact.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"outline",
|
|
13
|
+
"compact"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"contentSelector": {
|
|
18
|
+
"description": "CSS selector of the article body container to style.",
|
|
19
|
+
"default": ".ghcn-article-content"
|
|
20
|
+
},
|
|
21
|
+
"ariaLabel": {
|
|
22
|
+
"description": "Accessible toolbar label.",
|
|
23
|
+
"default": "Reading display preferences"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
{
|
|
28
|
+
"name": "reader-controls.hbs",
|
|
29
|
+
"type": "partial",
|
|
30
|
+
"target": "partials/components/reader-controls.hbs",
|
|
31
|
+
"content": "{{!-- Styling parameters: class, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-reader-controls{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-reader-controls data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"compact\"}}compact{{else}}default{{/match}}{{/match}}\" data-content-selector=\"{{#if contentSelector}}{{contentSelector}}{{else}}.ghcn-article-content{{/if}}\" role=\"toolbar\" aria-label=\"{{#if ariaLabel}}{{ariaLabel}}{{else}}Reading display preferences{{/if}}\">\n <div class=\"ghcn-reader-controls__group\" role=\"group\" aria-label=\"Text size\">\n <button type=\"button\" class=\"ghcn-reader-controls__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-reader-size=\"sm\" aria-label=\"Smaller text\" aria-pressed=\"false\">A-</button>\n <button type=\"button\" class=\"ghcn-reader-controls__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-reader-size=\"md\" aria-label=\"Default text size\" aria-pressed=\"true\">A</button>\n <button type=\"button\" class=\"ghcn-reader-controls__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-reader-size=\"lg\" aria-label=\"Larger text\" aria-pressed=\"false\">A+</button>\n </div>\n <span class=\"ghcn-reader-controls__divider\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-reader-controls__group\" role=\"group\" aria-label=\"Typeface\">\n <button type=\"button\" class=\"ghcn-reader-controls__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-reader-font=\"sans\" aria-pressed=\"true\">Sans</button>\n <button type=\"button\" class=\"ghcn-reader-controls__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-reader-controls__btn--serif\" data-reader-font=\"serif\" aria-pressed=\"false\">Serif</button>\n </div>\n</div>\n{{/with}}"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "reader-controls.css",
|
|
35
|
+
"type": "style",
|
|
36
|
+
"target": "assets/css/components/reader-controls.css",
|
|
37
|
+
"content": ".ghcn-reader-controls { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--border); border-radius: 9999px; background: var(--secondary); color: var(--foreground); font-family: inherit; font-size: 13px; line-height: 1; }\n.ghcn-reader-controls *, .ghcn-reader-controls *::before, .ghcn-reader-controls *::after { box-sizing: border-box; }\n.ghcn-reader-controls:where([data-variant=\"outline\"]) { background: var(--card, var(--background)); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); }\n.ghcn-reader-controls:where([data-variant=\"compact\"]) { padding: 2px; gap: 4px; font-size: 12px; }\n.ghcn-reader-controls__group { display: inline-flex; align-items: center; gap: 2px; }\n.ghcn-reader-controls__divider { width: 1px; height: 18px; background: var(--border); }\n.ghcn-reader-controls__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 28px; padding: 0 9px; border: 1px solid transparent; border-radius: 9999px; background: transparent; color: var(--muted-foreground); font: inherit; font-weight: 600; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }\n.ghcn-reader-controls:where([data-variant=\"outline\"]) .ghcn-reader-controls__btn { border-radius: calc(var(--ghcn-control-radius, var(--radius, 8px)) - 2px); }\n.ghcn-reader-controls:where([data-variant=\"compact\"]) .ghcn-reader-controls__btn { min-width: 26px; height: 24px; padding: 0 7px; }\n.ghcn-reader-controls__btn--serif { font-family: Georgia, Cambria, \"Times New Roman\", Times, serif; }\n.ghcn-reader-controls__btn:hover { color: var(--foreground); }\n.ghcn-reader-controls__btn[aria-pressed=\"true\"] { background: var(--background); color: var(--foreground); border-color: var(--border); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }\n[data-ghcn-font-size=\"sm\"] { font-size: 15px; line-height: 1.65; }\n[data-ghcn-font-size=\"md\"] { font-size: 17px; line-height: 1.72; }\n[data-ghcn-font-size=\"lg\"] { font-size: 20px; line-height: 1.78; }\n[data-ghcn-font-family=\"serif\"] { font-family: Georgia, Cambria, \"Times New Roman\", Times, serif; }\n[data-ghcn-font-family=\"sans\"] { font-family: inherit; }\n.ghcn-reader-controls:focus-visible, :where(.ghcn-reader-controls) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "reader-controls.js",
|
|
41
|
+
"type": "js",
|
|
42
|
+
"target": "assets/js/components/reader-controls.js",
|
|
43
|
+
"content": "/* ghostcn reader-controls: persists article font size and serif/sans toggle via data attributes (CSP-safe). */\n(() => {\n const SIZE_KEY = 'ghcn-reader-size';\n const FONT_KEY = 'ghcn-reader-font';\n const SIZES = ['sm', 'md', 'lg'];\n\n function readStore(key, allowed, fallback) {\n try {\n const value = localStorage.getItem(key);\n if (allowed.includes(value)) return value;\n } catch {}\n return fallback;\n }\n\n function apply(root, size, font, persist) {\n const selector = root.dataset.contentSelector || '.ghcn-article-content';\n const target = root.parentElement?.querySelector(selector) || document.querySelector(selector);\n if (target) {\n target.dataset.ghcnFontSize = size;\n target.dataset.ghcnFontFamily = font;\n }\n if (persist) {\n try { localStorage.setItem(SIZE_KEY, size); localStorage.setItem(FONT_KEY, font); } catch {}\n }\n root.dataset.sizeValue = size;\n root.dataset.fontValue = font;\n root.querySelectorAll('[data-reader-size]').forEach(btn => {\n btn.setAttribute('aria-pressed', String(btn.dataset.readerSize === size));\n });\n root.querySelectorAll('[data-reader-font]').forEach(btn => {\n btn.setAttribute('aria-pressed', String(btn.dataset.readerFont === font));\n });\n }\n\n function init() {\n const initialSize = readStore(SIZE_KEY, SIZES, 'md');\n const initialFont = readStore(FONT_KEY, ['sans', 'serif'], 'sans');\n document.querySelectorAll('[data-ghcn-reader-controls]').forEach(root => {\n if (root.dataset.ghcnReaderReady) return;\n root.dataset.ghcnReaderReady = 'true';\n apply(root, initialSize, initialFont, false);\n root.querySelectorAll('[data-reader-size]').forEach(btn => {\n btn.addEventListener('click', () => {\n const next = btn.dataset.readerSize;\n if (SIZES.includes(next)) apply(root, next, root.dataset.fontValue || 'sans', true);\n });\n });\n root.querySelectorAll('[data-reader-font]').forEach(btn => {\n btn.addEventListener('click', () => {\n const next = btn.dataset.readerFont;\n if (next === 'sans' || next === 'serif') apply(root, root.dataset.sizeValue || 'md', next, true);\n });\n });\n });\n }\n\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"gscan": {
|
|
47
|
+
"rules_satisfied": [
|
|
48
|
+
"GS010-PJ-VALID"
|
|
49
|
+
],
|
|
50
|
+
"notes": "CSP-safe data-attribute toggles persisted in localStorage; zero external dependencies."
|
|
51
|
+
},
|
|
52
|
+
"styleSlots": {
|
|
53
|
+
"class": [
|
|
54
|
+
".ghcn-reader-controls"
|
|
55
|
+
],
|
|
56
|
+
"buttonClass": [
|
|
57
|
+
".ghcn-reader-controls__btn"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reading-meta",
|
|
3
|
+
"type": "components:content",
|
|
4
|
+
"description": "Reusable post metadata row with author, date, reading time, and optional tag or comment count.",
|
|
5
|
+
"dependencies": [],
|
|
6
|
+
"ghost_version": ">=5.0.0",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"variant": {
|
|
9
|
+
"description": "Metadata display style.",
|
|
10
|
+
"options": [
|
|
11
|
+
"default",
|
|
12
|
+
"compact",
|
|
13
|
+
"pill"
|
|
14
|
+
],
|
|
15
|
+
"default": "default"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
{
|
|
20
|
+
"name": "reading-meta.hbs",
|
|
21
|
+
"type": "partial",
|
|
22
|
+
"target": "partials/components/reading-meta.hbs",
|
|
23
|
+
"content": "{{!-- Styling parameters: class, authorClass, tagClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-reading-meta{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"compact\"}}compact{{else}}{{#match variant \"pill\"}}pill{{else}}default{{/match}}{{/match}}\">\n {{#primary_author}}\n <a class=\"ghcn-reading-meta__author{{#if ghostcnStyles.authorClass}} {{ghostcnStyles.authorClass}}{{/if}}\" href=\"{{url}}\">\n {{#if profile_image}}<img class=\"ghcn-reading-meta__avatar\" src=\"{{img_url profile_image size=\"xs\"}}\" alt=\"\" loading=\"lazy\" />{{else}}<span class=\"ghcn-reading-meta__avatar ghcn-reading-meta__avatar--fallback\" aria-hidden=\"true\">{{name.[0]}}</span>{{/if}}\n <span>{{name}}</span>\n </a>\n <span class=\"ghcn-reading-meta__sep\" aria-hidden=\"true\">•</span>\n {{/primary_author}}\n <time class=\"ghcn-reading-meta__date\" datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n <span class=\"ghcn-reading-meta__sep\" aria-hidden=\"true\">•</span>\n <span class=\"ghcn-reading-meta__time\">{{reading_time}}</span>\n {{#if primary_tag}}\n <span class=\"ghcn-reading-meta__sep\" aria-hidden=\"true\">•</span>\n <a class=\"ghcn-reading-meta__tag{{#if ghostcnStyles.tagClass}} {{ghostcnStyles.tagClass}}{{/if}}\" href=\"{{primary_tag.url}}\">{{primary_tag.name}}</a>\n {{/if}}\n {{#if @site.comments_enabled}}{{#if comments}}\n <span class=\"ghcn-reading-meta__sep\" aria-hidden=\"true\">•</span>\n <span class=\"ghcn-reading-meta__comments\">{{comment_count empty=\"0 comments\" singular=\"1 comment\" plural=\"% comments\"}}</span>\n {{/if}}{{/if}}\n</div>\n{{/with}}"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "reading-meta.css",
|
|
27
|
+
"type": "style",
|
|
28
|
+
"target": "assets/css/components/reading-meta.css",
|
|
29
|
+
"content": ".ghcn-reading-meta { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted-foreground); font-family: inherit; font-size: var(--ghcn-text-meta, 13px); line-height: 1.4; font-variant-numeric: tabular-nums; }\n.ghcn-reading-meta *, .ghcn-reading-meta *::before, .ghcn-reading-meta *::after { box-sizing: border-box; }\n.ghcn-reading-meta:where([data-variant=\"compact\"]) { font-size: 12px; gap: 4px 8px; }\n.ghcn-reading-meta:where([data-variant=\"pill\"]) { display: inline-flex; padding: 6px 14px; border: 1px solid var(--border); border-radius: 9999px; background: var(--card); }\n.ghcn-reading-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-reading-meta__author:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-reading-meta__avatar { width: 24px; height: 24px; border-radius: 9999px; object-fit: cover; flex: 0 0 auto; }\n.ghcn-reading-meta__avatar--fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--secondary); color: var(--secondary-foreground); font-size: 11px; font-weight: 700; text-transform: uppercase; border: 1px solid var(--border); }\n.ghcn-reading-meta:where([data-variant=\"compact\"]) .ghcn-reading-meta__avatar { display: none; }\n.ghcn-reading-meta__sep { color: color-mix(in srgb, var(--muted-foreground) 45%, transparent); }\n.ghcn-reading-meta__tag { color: var(--foreground); font-weight: 600; text-decoration: none; }\n.ghcn-reading-meta__tag:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ghcn-reading-meta:focus-visible, :where(.ghcn-reading-meta) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"gscan": {
|
|
33
|
+
"rules_satisfied": [
|
|
34
|
+
"GS010-PJ-VALID"
|
|
35
|
+
],
|
|
36
|
+
"notes": "Uses native Ghost content and site helpers."
|
|
37
|
+
},
|
|
38
|
+
"styleSlots": {
|
|
39
|
+
"class": [
|
|
40
|
+
".ghcn-reading-meta"
|
|
41
|
+
],
|
|
42
|
+
"authorClass": [
|
|
43
|
+
".ghcn-reading-meta__author"
|
|
44
|
+
],
|
|
45
|
+
"tagClass": [
|
|
46
|
+
".ghcn-reading-meta__tag"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"name": "related-posts.css",
|
|
22
22
|
"type": "style",
|
|
23
23
|
"target": "assets/css/components/related-posts.css",
|
|
24
|
-
"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
|
|
24
|
+
"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 24px; }\n.ghcn-related__grid { display: grid; grid-template-columns: 1fr; gap: 32px 28px; }\n@media (min-width: 640px) { .ghcn-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@media (min-width: 980px) { .ghcn-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n.ghcn-related__card { box-sizing: border-box; min-width: 0; background: transparent; color: var(--foreground); display: flex; flex-direction: column; gap: 14px; }\n.ghcn-related__image-link { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: calc(var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)) + 4px); border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: var(--muted); }\n.ghcn-related__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1); }\n.ghcn-related__card:hover .ghcn-related__image { transform: scale(1.03); }\n.ghcn-related__content { padding: 0 2px; }\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 6px; line-height: 1.3; }\n.ghcn-related__card-title a { color: inherit; text-decoration: none; transition: opacity 150ms ease; }\n.ghcn-related__card-title a:hover { opacity: 0.78; }\n.ghcn-related__description { color: var(--muted-foreground); font-size: 14.5px; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }\n.ghcn-related a:focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n"
|
|
25
25
|
}
|
|
26
26
|
],
|
|
27
27
|
"gscan": {
|