@cogenta/theme-docs 0.5.5 → 0.5.6
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/src/render/blocks/embed.d.ts.map +1 -1
- package/dist/src/render/blocks/embed.js +3 -3
- package/dist/src/render/blocks/embed.js.map +1 -1
- package/dist/src/render/term-archive.d.ts.map +1 -1
- package/dist/src/render/term-archive.js +2 -2
- package/dist/src/render/term-archive.js.map +1 -1
- package/package.json +4 -4
- package/src/render/blocks/embed.ts +10 -2
- package/src/render/term-archive.ts +2 -1
- package/src/styles/base.css +46 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAGL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AA+D3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAuC9E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aspectRatio, h } from '@cogenta/theme-kit';
|
|
1
|
+
import { aspectRatio, embedFrameTitle, h, renderEmbedPreview, } from '@cogenta/theme-kit';
|
|
2
2
|
/**
|
|
3
3
|
* A recorded walkthrough, a talk, a post: embedded in the hairline frame.
|
|
4
4
|
*
|
|
@@ -41,7 +41,7 @@ function frameSource(provider, rawUrl) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
function notice(block, ctx, reason) {
|
|
44
|
-
return h('div', { class: 'cd-embed__notice' }, h('p', { class: 'cd-embed__reason' }, reason), h('a', {
|
|
44
|
+
return h('div', { class: 'cd-embed__notice' }, renderEmbedPreview(ctx, block.url, 'cd-embed'), h('p', { class: 'cd-embed__reason' }, reason), h('a', {
|
|
45
45
|
class: 'cd-arrow-link cd-embed__link',
|
|
46
46
|
href: ctx.link(block.url),
|
|
47
47
|
rel: 'noopener noreferrer nofollow',
|
|
@@ -62,7 +62,7 @@ export function renderEmbed(block, ctx) {
|
|
|
62
62
|
: h('iframe', {
|
|
63
63
|
class: 'cd-embed__iframe',
|
|
64
64
|
src: source,
|
|
65
|
-
title: ctx
|
|
65
|
+
title: embedFrameTitle(ctx, block.provider, block.url),
|
|
66
66
|
loading: 'lazy',
|
|
67
67
|
referrerpolicy: 'strict-origin-when-cross-origin',
|
|
68
68
|
allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,eAAe,EAEf,CAAC,EAED,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;GAQG;AAEH,SAAS,WAAW,CAAC,QAAgC,EAAE,MAAc;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;IAE5E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS,EAAE,CAAC;YACf,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KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,gBAAgB,KAAK,EAAE,EAAE,EACrE,MAAM,KAAK,IAAI;QACb,CAAC,CAAC,MAAM,CACJ,KAAK,EACL,GAAG,EACH,KAAK,CAAC,eAAe;YACnB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC9D,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC7D;QACH,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC;YACtD,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,iCAAiC;YACjD,KAAK,EACH,iFAAiF;YACnF,eAAe,EAAE,IAAI;SACtB,CAAC,CACP,CACF,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"term-archive.d.ts","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"term-archive.d.ts","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGnG;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CA4DtE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from '@cogenta/theme-kit';
|
|
1
|
+
import { h, renderArchiveIntro } from '@cogenta/theme-kit';
|
|
2
2
|
import { longDate } from './layout.js';
|
|
3
3
|
/**
|
|
4
4
|
* The taxonomy-term archive (contract D `theme@1.3`): a titled index of
|
|
@@ -15,7 +15,7 @@ export function renderTermArchive(input) {
|
|
|
15
15
|
: h('time', { class: 'cd-index__date', datetime: entry.publishedAt }, longDate(entry.publishedAt, input.locale))));
|
|
16
16
|
return h('main', { class: 'cg-main cd-archive', id: 'cg-main' }, h('div', { class: 'cd-archive__inner' }, input.ancestors.length === 0
|
|
17
17
|
? null
|
|
18
|
-
: h('nav', { class: 'cd-breadcrumb', 'aria-label': input.labels.breadcrumb }, h('ol', { class: 'cd-breadcrumb__items' }, input.ancestors.map((link) => h('li', {}, h('a', { href: link.href }, link.label))), h('li', { 'aria-current': 'page' }, input.term.label))), h('h1', { class: 'cd-archive__title' }, input.term.label), input.children.length === 0
|
|
18
|
+
: h('nav', { class: 'cd-breadcrumb', 'aria-label': input.labels.breadcrumb }, h('ol', { class: 'cd-breadcrumb__items' }, input.ancestors.map((link) => h('li', {}, h('a', { href: link.href }, link.label))), h('li', { 'aria-current': 'page' }, input.term.label))), h('h1', { class: 'cd-archive__title' }, input.term.label), renderArchiveIntro(input), input.children.length === 0
|
|
19
19
|
? null
|
|
20
20
|
: h('ul', { class: 'cd-archive__children', 'aria-label': input.labels.subterms }, input.children.map((child) => h('li', {}, h('a', { href: child.href }, child.label)))), rows.length === 0
|
|
21
21
|
? h('p', { class: 'cd-empty' }, input.labels.empty)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"term-archive.js","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,CAAC,EAAyB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"term-archive.js","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,CAAC,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAA;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;A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|
4
4
|
"description": "A dense, reference-first documentation theme for Cogenta: a sticky sidebar-navigated doc layout, real code blocks, and a genuine dark mode — zero client JavaScript.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"directory": "packages/theme-docs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cogenta/
|
|
40
|
-
"@cogenta/
|
|
41
|
-
"@cogenta/
|
|
39
|
+
"@cogenta/render": "0.4.0",
|
|
40
|
+
"@cogenta/theme-kit": "0.7.0",
|
|
41
|
+
"@cogenta/blocks": "1.1.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"astro": "^7.2.1"
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { EmbedBlock } from '@cogenta/blocks'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
aspectRatio,
|
|
4
|
+
embedFrameTitle,
|
|
5
|
+
type HtmlElement,
|
|
6
|
+
h,
|
|
7
|
+
type RenderContext,
|
|
8
|
+
renderEmbedPreview,
|
|
9
|
+
} from '@cogenta/theme-kit'
|
|
3
10
|
|
|
4
11
|
/**
|
|
5
12
|
* A recorded walkthrough, a talk, a post: embedded in the hairline frame.
|
|
@@ -48,6 +55,7 @@ function notice(block: EmbedBlock, ctx: RenderContext, reason: string): HtmlElem
|
|
|
48
55
|
return h(
|
|
49
56
|
'div',
|
|
50
57
|
{ class: 'cd-embed__notice' },
|
|
58
|
+
renderEmbedPreview(ctx, block.url, 'cd-embed'),
|
|
51
59
|
h('p', { class: 'cd-embed__reason' }, reason),
|
|
52
60
|
h(
|
|
53
61
|
'a',
|
|
@@ -90,7 +98,7 @@ export function renderEmbed(block: EmbedBlock, ctx: RenderContext): HtmlElement
|
|
|
90
98
|
: h('iframe', {
|
|
91
99
|
class: 'cd-embed__iframe',
|
|
92
100
|
src: source,
|
|
93
|
-
title: ctx
|
|
101
|
+
title: embedFrameTitle(ctx, block.provider, block.url),
|
|
94
102
|
loading: 'lazy',
|
|
95
103
|
referrerpolicy: 'strict-origin-when-cross-origin',
|
|
96
104
|
allow:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HtmlElement, h, type TermArchiveInput } from '@cogenta/theme-kit'
|
|
1
|
+
import { type HtmlElement, h, renderArchiveIntro, type TermArchiveInput } from '@cogenta/theme-kit'
|
|
2
2
|
import { longDate } from './layout.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -54,6 +54,7 @@ export function renderTermArchive(input: TermArchiveInput): HtmlElement {
|
|
|
54
54
|
),
|
|
55
55
|
),
|
|
56
56
|
h('h1', { class: 'cd-archive__title' }, input.term.label),
|
|
57
|
+
renderArchiveIntro(input),
|
|
57
58
|
input.children.length === 0
|
|
58
59
|
? null
|
|
59
60
|
: h(
|
package/src/styles/base.css
CHANGED
|
@@ -705,3 +705,49 @@ img {
|
|
|
705
705
|
.cg-comment__form button[type="submit"] {
|
|
706
706
|
justify-self: start;
|
|
707
707
|
}
|
|
708
|
+
|
|
709
|
+
/* An author's archive (theme@1.8): their portrait and bio under the title. */
|
|
710
|
+
.cg-archive__intro {
|
|
711
|
+
display: flex;
|
|
712
|
+
align-items: flex-start;
|
|
713
|
+
gap: 1.25rem;
|
|
714
|
+
max-inline-size: 42rem;
|
|
715
|
+
margin-block: 0 2rem;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.cg-archive__portrait {
|
|
719
|
+
flex: none;
|
|
720
|
+
inline-size: 5rem;
|
|
721
|
+
block-size: 5rem;
|
|
722
|
+
object-fit: cover;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.cg-archive__bio {
|
|
726
|
+
margin: 0;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/* An embed's preview (theme@1.9): the thumbnail the site serves itself, the
|
|
730
|
+
title and author its provider gave — shown before consent, safely. */
|
|
731
|
+
.cd-embed__preview {
|
|
732
|
+
margin-block-end: 1rem;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.cd-embed__thumbnail {
|
|
736
|
+
display: block;
|
|
737
|
+
inline-size: 100%;
|
|
738
|
+
max-inline-size: 40rem;
|
|
739
|
+
block-size: auto;
|
|
740
|
+
aspect-ratio: 16 / 9;
|
|
741
|
+
object-fit: cover;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.cd-embed__title {
|
|
745
|
+
margin: 0.75rem 0 0;
|
|
746
|
+
font-weight: 600;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.cd-embed__author {
|
|
750
|
+
margin: 0.25rem 0 0;
|
|
751
|
+
font-size: 0.875rem;
|
|
752
|
+
color: var(--cd-ink-muted);
|
|
753
|
+
}
|