@cogenta/theme-magazine 1.3.7 → 1.4.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/src/render/blocks/logos.d.ts.map +1 -1
- package/dist/src/render/blocks/logos.js +6 -1
- package/dist/src/render/blocks/logos.js.map +1 -1
- package/dist/src/render/layout.d.ts +1 -0
- package/dist/src/render/layout.d.ts.map +1 -1
- package/dist/src/render/layout.js +37 -0
- package/dist/src/render/layout.js.map +1 -1
- package/dist/src/render/term-archive.d.ts +7 -0
- package/dist/src/render/term-archive.d.ts.map +1 -1
- package/dist/src/render/term-archive.js +18 -3
- package/dist/src/render/term-archive.js.map +1 -1
- package/fonts/OFL-fraunces.txt +93 -0
- package/fonts/OFL-libre-franklin.txt +93 -0
- package/fonts/OFL-source-serif-4.txt +93 -0
- package/fonts/README.md +49 -0
- package/fonts/fraunces-normal-latin-7234ed86.woff2 +0 -0
- package/fonts/fraunces-normal-latin-ext-a2930b27.woff2 +0 -0
- package/fonts/libre-franklin-normal-latin-52e60585.woff2 +0 -0
- package/fonts/libre-franklin-normal-latin-ext-61216d8e.woff2 +0 -0
- package/fonts/manifest.json +69 -0
- package/fonts/source-serif-4-italic-latin-96e63932.woff2 +0 -0
- package/fonts/source-serif-4-italic-latin-ext-2078240c.woff2 +0 -0
- package/fonts/source-serif-4-normal-latin-ext-155f6e70.woff2 +0 -0
- package/fonts/source-serif-4-normal-latin-f2ea9c12.woff2 +0 -0
- package/package.json +11 -8
- package/src/render/blocks/logos.ts +6 -1
- package/src/render/layout.ts +37 -0
- package/src/render/term-archive.ts +18 -3
- package/src/styles/archive.css +6 -1
- package/src/styles/blocks.css +5 -0
- package/src/styles/fonts.css +85 -0
- package/src/styles/theme.css +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAsCnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc9E"}
|
|
@@ -19,7 +19,12 @@ function renderItem(item, ctx) {
|
|
|
19
19
|
});
|
|
20
20
|
return h('li', { class: 'cg-marks__item' }, item.url === undefined
|
|
21
21
|
? mark
|
|
22
|
-
: h('a', {
|
|
22
|
+
: h('a', {
|
|
23
|
+
class: 'cg-marks__link',
|
|
24
|
+
href: ctx.link(item.url),
|
|
25
|
+
'aria-label': item.name,
|
|
26
|
+
rel: 'noopener noreferrer',
|
|
27
|
+
}, mark));
|
|
23
28
|
}
|
|
24
29
|
export function renderLogos(block, ctx) {
|
|
25
30
|
return section('section', 'logos', 'cg-marks', { 'data-count': String(Math.min(Math.max(block.items.length, 3), 6)) }, 'div', sectionHead('logos', block.title), h('ul', { class: 'cg-marks__items' }, block.items.map((item) => renderItem(item, ctx))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.js","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AACnF,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnD;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAA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,OAAO,CACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACtE,KAAK,EACL,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,EACjC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
|
|
@@ -25,4 +25,5 @@ export declare function longDate(iso: string, locale: string): string | null;
|
|
|
25
25
|
/** `Sep 13, 2026`, the form a listing sets under a headline, or `null`. */
|
|
26
26
|
export declare function shortDate(iso: string, locale: string): string | null;
|
|
27
27
|
export declare function entryKicker(entry: ContentEntry): string | undefined;
|
|
28
|
+
export declare function taxonomyKicker(name: string, locale: string): string;
|
|
28
29
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/render/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,WAAW,EAGjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,SAAS,GAAG,KAAK,EACxB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,GAAG,QAAQ,EACvB,GAAG,QAAQ,EAAE,SAAS,KAAK,EAAE,GAC5B,WAAW,CAMb;AAED;;;;GAIG;AACH,wBA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AAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAQnE;AA0BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAWnE"}
|
|
@@ -69,4 +69,41 @@ export function entryKicker(entry) {
|
|
|
69
69
|
}
|
|
70
70
|
return undefined;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* The words a section front sets above a term's name, by the taxonomy's own
|
|
74
|
+
* machine name. `TermArchiveInput.taxonomyName` is that name (`section`,
|
|
75
|
+
* `author`), never a label, so a site in French would read "SECTION" over its
|
|
76
|
+
* rubrique unless the theme says it in the page's language. A taxonomy the
|
|
77
|
+
* theme has no word for is set in sentence case, as its owner named it.
|
|
78
|
+
*/
|
|
79
|
+
const TAXONOMY_WORDS = {
|
|
80
|
+
en: {
|
|
81
|
+
section: 'Section',
|
|
82
|
+
author: 'Author',
|
|
83
|
+
tag: 'Tag',
|
|
84
|
+
category: 'Category',
|
|
85
|
+
topic: 'Topic',
|
|
86
|
+
},
|
|
87
|
+
fr: {
|
|
88
|
+
section: 'Rubrique',
|
|
89
|
+
author: 'Auteur',
|
|
90
|
+
tag: 'Sujet',
|
|
91
|
+
category: 'Catégorie',
|
|
92
|
+
topic: 'Thème',
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
export function taxonomyKicker(name, locale) {
|
|
96
|
+
const language = locale.toLowerCase().split('-')[0] ?? 'en';
|
|
97
|
+
const known = TAXONOMY_WORDS[language]?.[name.toLowerCase()];
|
|
98
|
+
if (known !== undefined)
|
|
99
|
+
return known;
|
|
100
|
+
const words = name
|
|
101
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
102
|
+
.replace(/[_-]+/g, ' ')
|
|
103
|
+
.trim()
|
|
104
|
+
.toLowerCase();
|
|
105
|
+
if (words === '')
|
|
106
|
+
return name;
|
|
107
|
+
return words.charAt(0).toLocaleUpperCase(locale) + words.slice(1);
|
|
108
|
+
}
|
|
72
109
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/render/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAIf,CAAC,EACD,OAAO,GACR,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,OAAO,CACrB,KAAwB,EACxB,KAAa,EACb,SAAiB,EACjB,KAAiB,EACjB,KAAuB,EACvB,GAAG,QAA0B;IAE7B,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,cAAc,SAAS,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EACnE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,SAAS,SAAS,EAAE,EAAE,GAAG,QAAQ,CAAC,CACrE,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,KAAyB;IACtE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACpC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,EACpB,OAAO,CACL,eAAe,CAAC,SAAS,CAAC,IAAI,IAAI,EAClC,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAClD,KAAK,CACN,CACF,CAAA;AACH,CAAC;AAED,SAAS,KAAK,CAAC,GAAW;IACxB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AACnD,CAAC;AAED,SAAS,MAAM,CAAC,IAAU,EAAE,MAAc,EAAE,OAAmC;IAC7E,IAAI,CAAC;QACH,OAAO,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AAI,CAAA;IAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type HtmlElement, type TermArchiveInput } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* How many of the stories after the lead stand as briefs beside it. Two or
|
|
4
|
+
* three keep the right-hand column about as tall as the lead; but the row of
|
|
5
|
+
* three beneath must close full, so the count is the first of 2, 3, 1, 4 that
|
|
6
|
+
* leaves a multiple of three, and never more than there are stories.
|
|
7
|
+
*/
|
|
8
|
+
export declare function briefCount(others: number): number;
|
|
2
9
|
export declare function renderTermArchive(input: TermArchiveInput): HtmlElement;
|
|
3
10
|
//# sourceMappingURL=term-archive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAoBnG;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAoGtE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h, renderArchiveIntro } from '@cogenta/theme-kit';
|
|
2
|
+
import { taxonomyKicker } from './layout.js';
|
|
2
3
|
import { renderStory, storyFromArchive } from './story.js';
|
|
3
4
|
/**
|
|
4
5
|
* The taxonomy-term archive (contract D `theme@1.3`), set as a section front.
|
|
@@ -15,14 +16,28 @@ import { renderStory, storyFromArchive } from './story.js';
|
|
|
15
16
|
* in the page's language.
|
|
16
17
|
*/
|
|
17
18
|
const BRIEFS = 3;
|
|
19
|
+
/**
|
|
20
|
+
* How many of the stories after the lead stand as briefs beside it. Two or
|
|
21
|
+
* three keep the right-hand column about as tall as the lead; but the row of
|
|
22
|
+
* three beneath must close full, so the count is the first of 2, 3, 1, 4 that
|
|
23
|
+
* leaves a multiple of three, and never more than there are stories.
|
|
24
|
+
*/
|
|
25
|
+
export function briefCount(others) {
|
|
26
|
+
for (const count of [2, 3, 1, 4]) {
|
|
27
|
+
if (count <= others && (others - count) % 3 === 0)
|
|
28
|
+
return count;
|
|
29
|
+
}
|
|
30
|
+
return Math.min(others, BRIEFS);
|
|
31
|
+
}
|
|
18
32
|
export function renderTermArchive(input) {
|
|
19
33
|
const stories = input.entries.map((entry) => storyFromArchive(entry, input.locale));
|
|
20
34
|
const [lead, ...others] = stories;
|
|
21
|
-
const
|
|
22
|
-
const
|
|
35
|
+
const count = briefCount(others.length);
|
|
36
|
+
const briefs = others.slice(0, count);
|
|
37
|
+
const more = others.slice(count);
|
|
23
38
|
return h('main', { class: 'cg-main cg-archive', id: 'cg-main' }, h('header', { class: 'cg-archive__head' }, h('div', { class: 'cg-container cg-archive__head-inner' }, input.ancestors.length === 0
|
|
24
39
|
? null
|
|
25
|
-
: h('nav', { class: 'cg-archive__breadcrumb', 'aria-label': input.labels.breadcrumb }, h('ol', {}, input.ancestors.map((link) => h('li', {}, h('a', { href: link.href }, link.label))))), h('p', { class: 'cg-archive__kicker' }, input.taxonomyName), h('h1', { class: 'cg-archive__title' }, input.term.label), renderArchiveIntro(input), input.children.length === 0
|
|
40
|
+
: h('nav', { class: 'cg-archive__breadcrumb', 'aria-label': input.labels.breadcrumb }, h('ol', {}, input.ancestors.map((link) => h('li', {}, h('a', { href: link.href }, link.label))))), h('p', { class: 'cg-archive__kicker' }, taxonomyKicker(input.taxonomyName, input.locale)), h('h1', { class: 'cg-archive__title' }, input.term.label), renderArchiveIntro(input), input.children.length === 0
|
|
26
41
|
? null
|
|
27
42
|
: h('ul', { class: 'cg-archive__children', 'aria-label': input.labels.subterms }, input.children.map((child) => h('li', {}, h('a', { href: child.href }, child.label)))))), h('section', { class: 'cg-section cg-listing', 'data-form': 'archive' }, h('div', { class: 'cg-container cg-listing__inner' }, lead === undefined
|
|
28
43
|
? h('p', { class: 'cg-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,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAA;AACnG,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,GAAG,CAAC,CAAA;AAEhB,MAAM,UAAU,iBAAiB,CAAC,KAAuB;IACvD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IACnF,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,GAAG,OAAO,CAAA;IACjC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,
|
|
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,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH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N,EACL,KAAK,CAAC,KAAK,CAAC,CACb,CACF,CACF,CAAA;AACH,CAAC;AAED,SAAS,KAAK,CAAC,KAAuB;IACpC,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IACjF,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,EACrE,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI;QAC9B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,EAC/E,KAAK,CAAC,MAAM,CAAC,QAAQ,CACtB,EACL,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI;QAC1B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAC3E,KAAK,CAAC,MAAM,CAAC,IAAI,CAClB,CACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2018 The Fraunces Project Authors (https://github.com/undercasetype/Fraunces)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The Libre Franklin Project Authors (https://github.com/googlefonts/Libre-Franklin)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014 The Source Serif 4 Project Authors (https://github.com/adobe-fonts/source-serif)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/fonts/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Fonts of `@cogenta/theme-magazine`
|
|
2
|
+
|
|
3
|
+
Served by the site itself at `/_cogenta/fonts/magazine/<file>`. A page of this
|
|
4
|
+
theme makes **no request to a font provider**.
|
|
5
|
+
|
|
6
|
+
| Family | Style | Subset | Weight | File | Size |
|
|
7
|
+
|---|---|---|---|---|---|
|
|
8
|
+
| Fraunces | normal | latin-ext | 300 800 | `fraunces-normal-latin-ext-a2930b27.woff2` | 58.0 KiB |
|
|
9
|
+
| Fraunces | normal | latin | 300 800 | `fraunces-normal-latin-7234ed86.woff2` | 65.7 KiB |
|
|
10
|
+
| Libre Franklin | normal | latin-ext | 400 800 | `libre-franklin-normal-latin-ext-61216d8e.woff2` | 25.1 KiB |
|
|
11
|
+
| Libre Franklin | normal | latin | 400 800 | `libre-franklin-normal-latin-52e60585.woff2` | 28.6 KiB |
|
|
12
|
+
| Source Serif 4 | italic | latin-ext | 400 600 | `source-serif-4-italic-latin-ext-2078240c.woff2` | 107.7 KiB |
|
|
13
|
+
| Source Serif 4 | italic | latin | 400 600 | `source-serif-4-italic-latin-96e63932.woff2` | 127.1 KiB |
|
|
14
|
+
| Source Serif 4 | normal | latin-ext | 400 700 | `source-serif-4-normal-latin-ext-155f6e70.woff2` | 98.5 KiB |
|
|
15
|
+
| Source Serif 4 | normal | latin | 400 700 | `source-serif-4-normal-latin-f2ea9c12.woff2` | 119.5 KiB |
|
|
16
|
+
|
|
17
|
+
Total: 8 files, 630.3 KiB.
|
|
18
|
+
|
|
19
|
+
## Licence
|
|
20
|
+
|
|
21
|
+
- **Fraunces**: SIL Open Font License 1.1, text in `OFL-fraunces.txt`
|
|
22
|
+
- **Libre Franklin**: SIL Open Font License 1.1, text in `OFL-libre-franklin.txt`
|
|
23
|
+
- **Source Serif 4**: SIL Open Font License 1.1, text in `OFL-source-serif-4.txt`
|
|
24
|
+
|
|
25
|
+
The OFL permits bundling and redistributing these files with this package, as
|
|
26
|
+
long as the licence text travels with them (it does) and the fonts are not sold
|
|
27
|
+
on their own.
|
|
28
|
+
|
|
29
|
+
## Source and subsets
|
|
30
|
+
|
|
31
|
+
The files are the variable WOFF2 builds that the Google Fonts `css2` API
|
|
32
|
+
serves, taken from the `google/fonts` open-source repository's distribution.
|
|
33
|
+
Only the `latin` and `latin-ext` subsets are kept: together they cover
|
|
34
|
+
French (œ Œ ’ « » and every accented capital), the other Western European
|
|
35
|
+
languages, and the euro sign. A language written in another script falls back to
|
|
36
|
+
the next family of the theme's stack.
|
|
37
|
+
|
|
38
|
+
## How they were fetched
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
node scripts/fetch-theme-fonts.mjs magazine
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The script asks `https://fonts.googleapis.com/css2` with a modern User-Agent for
|
|
45
|
+
exactly the families, axes and weights this theme used before it was
|
|
46
|
+
self-hosted, downloads each `latin`/`latin-ext` file, names it after a hash of
|
|
47
|
+
its bytes (so a changed file gets a new URL and can be cached for a year), and
|
|
48
|
+
rewrites `src/styles/fonts.css`. It needs the network once, when it is run, and
|
|
49
|
+
never when a site is built, tested or served.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"theme": "magazine",
|
|
3
|
+
"faces": [
|
|
4
|
+
{
|
|
5
|
+
"family": "Fraunces",
|
|
6
|
+
"style": "normal",
|
|
7
|
+
"weight": "300 800",
|
|
8
|
+
"subset": "latin-ext",
|
|
9
|
+
"file": "fraunces-normal-latin-ext-a2930b27.woff2",
|
|
10
|
+
"css": "@font-face {\n font-family: 'Fraunces';\n font-style: normal;\n font-weight: 300 800;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/fraunces-normal-latin-ext-a2930b27.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"family": "Fraunces",
|
|
14
|
+
"style": "normal",
|
|
15
|
+
"weight": "300 800",
|
|
16
|
+
"subset": "latin",
|
|
17
|
+
"file": "fraunces-normal-latin-7234ed86.woff2",
|
|
18
|
+
"css": "@font-face {\n font-family: 'Fraunces';\n font-style: normal;\n font-weight: 300 800;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/fraunces-normal-latin-7234ed86.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"family": "Libre Franklin",
|
|
22
|
+
"style": "normal",
|
|
23
|
+
"weight": "400 800",
|
|
24
|
+
"subset": "latin-ext",
|
|
25
|
+
"file": "libre-franklin-normal-latin-ext-61216d8e.woff2",
|
|
26
|
+
"css": "@font-face {\n font-family: 'Libre Franklin';\n font-style: normal;\n font-weight: 400 800;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/libre-franklin-normal-latin-ext-61216d8e.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"family": "Libre Franklin",
|
|
30
|
+
"style": "normal",
|
|
31
|
+
"weight": "400 800",
|
|
32
|
+
"subset": "latin",
|
|
33
|
+
"file": "libre-franklin-normal-latin-52e60585.woff2",
|
|
34
|
+
"css": "@font-face {\n font-family: 'Libre Franklin';\n font-style: normal;\n font-weight: 400 800;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/libre-franklin-normal-latin-52e60585.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"family": "Source Serif 4",
|
|
38
|
+
"style": "italic",
|
|
39
|
+
"weight": "400 600",
|
|
40
|
+
"subset": "latin-ext",
|
|
41
|
+
"file": "source-serif-4-italic-latin-ext-2078240c.woff2",
|
|
42
|
+
"css": "@font-face {\n font-family: 'Source Serif 4';\n font-style: italic;\n font-weight: 400 600;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/source-serif-4-italic-latin-ext-2078240c.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"family": "Source Serif 4",
|
|
46
|
+
"style": "italic",
|
|
47
|
+
"weight": "400 600",
|
|
48
|
+
"subset": "latin",
|
|
49
|
+
"file": "source-serif-4-italic-latin-96e63932.woff2",
|
|
50
|
+
"css": "@font-face {\n font-family: 'Source Serif 4';\n font-style: italic;\n font-weight: 400 600;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/source-serif-4-italic-latin-96e63932.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"family": "Source Serif 4",
|
|
54
|
+
"style": "normal",
|
|
55
|
+
"weight": "400 700",
|
|
56
|
+
"subset": "latin-ext",
|
|
57
|
+
"file": "source-serif-4-normal-latin-ext-155f6e70.woff2",
|
|
58
|
+
"css": "@font-face {\n font-family: 'Source Serif 4';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/source-serif-4-normal-latin-ext-155f6e70.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"family": "Source Serif 4",
|
|
62
|
+
"style": "normal",
|
|
63
|
+
"weight": "400 700",
|
|
64
|
+
"subset": "latin",
|
|
65
|
+
"file": "source-serif-4-normal-latin-f2ea9c12.woff2",
|
|
66
|
+
"css": "@font-face {\n font-family: 'Source Serif 4';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_cogenta/fonts/magazine/source-serif-4-normal-latin-f2ea9c12.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogenta/theme-magazine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A news and culture magazine theme for Cogenta: a dated masthead, an asymmetric front page with column rules, section rails and long-form article pages, zero client JavaScript.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"./tokens.json": "./tokens.json",
|
|
18
18
|
"./styles/theme.css": "./src/styles/theme.css",
|
|
19
|
-
"./styles/*.css": "./src/styles/*.css"
|
|
19
|
+
"./styles/*.css": "./src/styles/*.css",
|
|
20
|
+
"./fonts/*.woff2": "./fonts/*.woff2",
|
|
21
|
+
"./fonts/manifest.json": "./fonts/manifest.json"
|
|
20
22
|
},
|
|
21
23
|
"files": [
|
|
22
24
|
"dist",
|
|
25
|
+
"fonts",
|
|
23
26
|
"src",
|
|
24
27
|
"tokens.json"
|
|
25
28
|
],
|
|
@@ -36,17 +39,17 @@
|
|
|
36
39
|
"directory": "packages/theme-magazine"
|
|
37
40
|
},
|
|
38
41
|
"dependencies": {
|
|
39
|
-
"@cogenta/blocks": "1.1.
|
|
40
|
-
"@cogenta/render": "0.
|
|
41
|
-
"@cogenta/theme-kit": "0.7.
|
|
42
|
+
"@cogenta/blocks": "1.1.7",
|
|
43
|
+
"@cogenta/render": "0.6.0",
|
|
44
|
+
"@cogenta/theme-kit": "0.7.2"
|
|
42
45
|
},
|
|
43
46
|
"peerDependencies": {
|
|
44
|
-
"astro": "^7.2.
|
|
47
|
+
"astro": "^7.2.8"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
|
-
"astro": "^7.2.
|
|
50
|
+
"astro": "^7.2.8",
|
|
48
51
|
"typescript": "^7.0.2",
|
|
49
|
-
"vitest": "^4.1.
|
|
52
|
+
"vitest": "^4.1.11"
|
|
50
53
|
},
|
|
51
54
|
"scripts": {
|
|
52
55
|
"build": "tsc -p tsconfig.json",
|
|
@@ -26,7 +26,12 @@ function renderItem(item: LogoItem, ctx: RenderContext): HtmlElement {
|
|
|
26
26
|
? mark
|
|
27
27
|
: h(
|
|
28
28
|
'a',
|
|
29
|
-
{
|
|
29
|
+
{
|
|
30
|
+
class: 'cg-marks__link',
|
|
31
|
+
href: ctx.link(item.url),
|
|
32
|
+
'aria-label': item.name,
|
|
33
|
+
rel: 'noopener noreferrer',
|
|
34
|
+
},
|
|
30
35
|
mark,
|
|
31
36
|
),
|
|
32
37
|
)
|
package/src/render/layout.ts
CHANGED
|
@@ -103,3 +103,40 @@ export function entryKicker(entry: ContentEntry): string | undefined {
|
|
|
103
103
|
}
|
|
104
104
|
return undefined
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The words a section front sets above a term's name, by the taxonomy's own
|
|
109
|
+
* machine name. `TermArchiveInput.taxonomyName` is that name (`section`,
|
|
110
|
+
* `author`), never a label, so a site in French would read "SECTION" over its
|
|
111
|
+
* rubrique unless the theme says it in the page's language. A taxonomy the
|
|
112
|
+
* theme has no word for is set in sentence case, as its owner named it.
|
|
113
|
+
*/
|
|
114
|
+
const TAXONOMY_WORDS: Readonly<Record<string, Readonly<Record<string, string>>>> = {
|
|
115
|
+
en: {
|
|
116
|
+
section: 'Section',
|
|
117
|
+
author: 'Author',
|
|
118
|
+
tag: 'Tag',
|
|
119
|
+
category: 'Category',
|
|
120
|
+
topic: 'Topic',
|
|
121
|
+
},
|
|
122
|
+
fr: {
|
|
123
|
+
section: 'Rubrique',
|
|
124
|
+
author: 'Auteur',
|
|
125
|
+
tag: 'Sujet',
|
|
126
|
+
category: 'Catégorie',
|
|
127
|
+
topic: 'Thème',
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function taxonomyKicker(name: string, locale: string): string {
|
|
132
|
+
const language = locale.toLowerCase().split('-')[0] ?? 'en'
|
|
133
|
+
const known = TAXONOMY_WORDS[language]?.[name.toLowerCase()]
|
|
134
|
+
if (known !== undefined) return known
|
|
135
|
+
const words = name
|
|
136
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
137
|
+
.replace(/[_-]+/g, ' ')
|
|
138
|
+
.trim()
|
|
139
|
+
.toLowerCase()
|
|
140
|
+
if (words === '') return name
|
|
141
|
+
return words.charAt(0).toLocaleUpperCase(locale) + words.slice(1)
|
|
142
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HtmlElement, h, renderArchiveIntro, type TermArchiveInput } from '@cogenta/theme-kit'
|
|
2
|
+
import { taxonomyKicker } from './layout.js'
|
|
2
3
|
import { renderStory, storyFromArchive } from './story.js'
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -17,11 +18,25 @@ import { renderStory, storyFromArchive } from './story.js'
|
|
|
17
18
|
*/
|
|
18
19
|
const BRIEFS = 3
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* How many of the stories after the lead stand as briefs beside it. Two or
|
|
23
|
+
* three keep the right-hand column about as tall as the lead; but the row of
|
|
24
|
+
* three beneath must close full, so the count is the first of 2, 3, 1, 4 that
|
|
25
|
+
* leaves a multiple of three, and never more than there are stories.
|
|
26
|
+
*/
|
|
27
|
+
export function briefCount(others: number): number {
|
|
28
|
+
for (const count of [2, 3, 1, 4]) {
|
|
29
|
+
if (count <= others && (others - count) % 3 === 0) return count
|
|
30
|
+
}
|
|
31
|
+
return Math.min(others, BRIEFS)
|
|
32
|
+
}
|
|
33
|
+
|
|
20
34
|
export function renderTermArchive(input: TermArchiveInput): HtmlElement {
|
|
21
35
|
const stories = input.entries.map((entry) => storyFromArchive(entry, input.locale))
|
|
22
36
|
const [lead, ...others] = stories
|
|
23
|
-
const
|
|
24
|
-
const
|
|
37
|
+
const count = briefCount(others.length)
|
|
38
|
+
const briefs = others.slice(0, count)
|
|
39
|
+
const more = others.slice(count)
|
|
25
40
|
|
|
26
41
|
return h(
|
|
27
42
|
'main',
|
|
@@ -43,7 +58,7 @@ export function renderTermArchive(input: TermArchiveInput): HtmlElement {
|
|
|
43
58
|
input.ancestors.map((link) => h('li', {}, h('a', { href: link.href }, link.label))),
|
|
44
59
|
),
|
|
45
60
|
),
|
|
46
|
-
h('p', { class: 'cg-archive__kicker' }, input.taxonomyName),
|
|
61
|
+
h('p', { class: 'cg-archive__kicker' }, taxonomyKicker(input.taxonomyName, input.locale)),
|
|
47
62
|
h('h1', { class: 'cg-archive__title' }, input.term.label),
|
|
48
63
|
renderArchiveIntro(input),
|
|
49
64
|
input.children.length === 0
|
package/src/styles/archive.css
CHANGED
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
border-block-end: var(--cg-rule-heavy) solid var(--cg-line-ink);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/* Inside the sidebar layout the container's own padding is already spent. */
|
|
30
|
+
.cg-sidebar-layout__content .cg-archive__head-inner::after {
|
|
31
|
+
inset-inline: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
.cg-archive__kicker {
|
|
30
35
|
margin: 0;
|
|
31
36
|
color: var(--cg-accent);
|
|
@@ -82,7 +87,7 @@
|
|
|
82
87
|
/* A section front sets every story in type: the lead's headline takes the
|
|
83
88
|
size a photograph would otherwise have given it. */
|
|
84
89
|
.cg-archive .cg-story--lead .cg-story__title {
|
|
85
|
-
font-size: var(--cg-size-
|
|
90
|
+
font-size: var(--cg-size-title);
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
.cg-archive .cg-story--lead .cg-story__standfirst {
|
package/src/styles/blocks.css
CHANGED
|
@@ -550,6 +550,11 @@
|
|
|
550
550
|
quotes: "\201C" "\201D";
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
/* A French pull quote is set in guillemets, with a no-break space inside. */
|
|
554
|
+
:lang(fr) .cg-pullquote__text {
|
|
555
|
+
quotes: "\00ab\00a0" "\00a0\00bb";
|
|
556
|
+
}
|
|
557
|
+
|
|
553
558
|
.cg-pullquote__text::before {
|
|
554
559
|
content: open-quote;
|
|
555
560
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The web fonts of `@cogenta/theme-magazine`, served by the site itself.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED by `scripts/fetch-theme-fonts.mjs` — edit that script, not this
|
|
5
|
+
* file. The faces live in this package's `fonts/` directory and are sent by
|
|
6
|
+
* `cogenta serve` at `/_cogenta/fonts/magazine/<file>`; no request leaves the
|
|
7
|
+
* site, so a visitor's address is never handed to a font provider. See
|
|
8
|
+
* `fonts/README.md` for the families, their licence and their source.
|
|
9
|
+
*
|
|
10
|
+
* `font-display: swap` keeps text visible in a system face while a file loads,
|
|
11
|
+
* and `unicode-range` splits Latin from Latin Extended so a French page
|
|
12
|
+
* downloads only the first.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: 'Fraunces';
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: 300 800;
|
|
19
|
+
font-display: swap;
|
|
20
|
+
src: url(/_cogenta/fonts/magazine/fraunces-normal-latin-ext-a2930b27.woff2) format('woff2');
|
|
21
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: 'Fraunces';
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 300 800;
|
|
28
|
+
font-display: swap;
|
|
29
|
+
src: url(/_cogenta/fonts/magazine/fraunces-normal-latin-7234ed86.woff2) format('woff2');
|
|
30
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: 'Libre Franklin';
|
|
35
|
+
font-style: normal;
|
|
36
|
+
font-weight: 400 800;
|
|
37
|
+
font-display: swap;
|
|
38
|
+
src: url(/_cogenta/fonts/magazine/libre-franklin-normal-latin-ext-61216d8e.woff2) format('woff2');
|
|
39
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@font-face {
|
|
43
|
+
font-family: 'Libre Franklin';
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: 400 800;
|
|
46
|
+
font-display: swap;
|
|
47
|
+
src: url(/_cogenta/fonts/magazine/libre-franklin-normal-latin-52e60585.woff2) format('woff2');
|
|
48
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@font-face {
|
|
52
|
+
font-family: 'Source Serif 4';
|
|
53
|
+
font-style: italic;
|
|
54
|
+
font-weight: 400 600;
|
|
55
|
+
font-display: swap;
|
|
56
|
+
src: url(/_cogenta/fonts/magazine/source-serif-4-italic-latin-ext-2078240c.woff2) format('woff2');
|
|
57
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@font-face {
|
|
61
|
+
font-family: 'Source Serif 4';
|
|
62
|
+
font-style: italic;
|
|
63
|
+
font-weight: 400 600;
|
|
64
|
+
font-display: swap;
|
|
65
|
+
src: url(/_cogenta/fonts/magazine/source-serif-4-italic-latin-96e63932.woff2) format('woff2');
|
|
66
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@font-face {
|
|
70
|
+
font-family: 'Source Serif 4';
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 400 700;
|
|
73
|
+
font-display: swap;
|
|
74
|
+
src: url(/_cogenta/fonts/magazine/source-serif-4-normal-latin-ext-155f6e70.woff2) format('woff2');
|
|
75
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@font-face {
|
|
79
|
+
font-family: 'Source Serif 4';
|
|
80
|
+
font-style: normal;
|
|
81
|
+
font-weight: 400 700;
|
|
82
|
+
font-display: swap;
|
|
83
|
+
src: url(/_cogenta/fonts/magazine/source-serif-4-normal-latin-f2ea9c12.woff2) format('woff2');
|
|
84
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
85
|
+
}
|
package/src/styles/theme.css
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Not one colour is written literally in any of them: every value comes from
|
|
16
16
|
* a skin token or from a `--cg-*` property composed from those.
|
|
17
17
|
*
|
|
18
|
-
* The one thing this file adds on its own is the
|
|
18
|
+
* The one thing this file adds on its own is the self-hosted `fonts.css` faces for the
|
|
19
19
|
* three families this theme sets: Fraunces (the nameplate and every headline,
|
|
20
20
|
* with its optical-size axis across its whole range, roman only: its italic
|
|
21
21
|
* is too playful for a daily), Source Serif 4 (the text, with its optical
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
* bylines, dates, navigation, captions). A skin only names a family; it never
|
|
24
24
|
* fetches one. All three fall back to real system stacks if Google Fonts is
|
|
25
25
|
* unreachable, and `display=swap` keeps text visible while they load.
|
|
26
|
-
* `cogenta serve`
|
|
26
|
+
* `cogenta serve` serves the faces itself, from `/_cogenta/fonts/`.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
@import
|
|
29
|
+
@import "./fonts.css";
|
|
30
30
|
|
|
31
31
|
@import "./tokens.css";
|
|
32
32
|
@import "./base.css";
|