@cogenta/theme-portfolio 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.
@@ -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;AA0BnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc9E"}
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;AAmCnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc9E"}
@@ -15,7 +15,12 @@ function renderItem(item, ctx) {
15
15
  });
16
16
  return h('li', { class: 'cg-marks__item' }, item.url === undefined
17
17
  ? h('div', { class: 'cg-marks__plate' }, mark)
18
- : h('a', { class: 'cg-marks__plate', href: item.url, rel: 'noopener noreferrer' }, mark), h('p', { class: 'cg-marks__name' }, item.name));
18
+ : h('a', {
19
+ class: 'cg-marks__plate',
20
+ href: item.url,
21
+ 'aria-label': item.name,
22
+ rel: 'noopener noreferrer',
23
+ }, mark), h('p', { class: 'cg-marks__name' }, item.name));
19
24
  }
20
25
  export function renderLogos(block, ctx) {
21
26
  return section('section', 'logos', 'cg-marks', { 'data-count': String(block.items.length) }, 'div', sectionHead('logos', block.title), h('ul', { class: 'cg-marks__items' }, block.items.map((item) => renderItem(item, ctx))));
@@ -1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AE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAC5C,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAQlB,MAAM,oBAAoB,CAAA;AAuD3B,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA6E7D"}
1
+ {"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAQlB,MAAM,oBAAoB,CAAA;AAuE3B,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA8E7D"}
@@ -50,6 +50,17 @@ function renderFooterNote(note) {
50
50
  .map((paragraph) => `<p>${escapeText(paragraph)}</p>`)
51
51
  .join('')}</div>`;
52
52
  }
53
+ /**
54
+ * The names a screen reader gives the header and footer landmarks, in the
55
+ * page's own language. The page's visible words come from `THEME_STRINGS`;
56
+ * these three are read aloud only, so they stay with the markup that carries
57
+ * them.
58
+ */
59
+ function landmarkLabels(locale) {
60
+ return locale.toLowerCase().startsWith('fr')
61
+ ? { menu: 'Menu', primary: 'Navigation principale', footer: 'Pied de page' }
62
+ : { menu: 'Menu', primary: 'Primary', footer: 'Footer' };
63
+ }
53
64
  export function renderChrome(input) {
54
65
  const siteName = escapeText(input.site.name);
55
66
  const home = escapeAttribute(input.homeHref);
@@ -63,13 +74,14 @@ export function renderChrome(input) {
63
74
  const tagline = input.tagline === undefined
64
75
  ? ''
65
76
  : `<p class="cg-masthead__tagline">${escapeText(input.tagline)}</p>`;
77
+ const landmarks = landmarkLabels(input.locale);
66
78
  const hasMenu = links !== '' || action !== '';
67
79
  const menu = hasMenu
68
- ? `<input type="checkbox" id="cg-nav-toggle" class="cg-nav-toggle-input" aria-label="Menu">` +
80
+ ? `<input type="checkbox" id="cg-nav-toggle" class="cg-nav-toggle-input" aria-label="${landmarks.menu}">` +
69
81
  `<label for="cg-nav-toggle" class="cg-nav-toggle-label" aria-hidden="true">` +
70
82
  `<span class="cg-nav-toggle-bar"></span><span class="cg-nav-toggle-bar"></span>` +
71
83
  `</label>` +
72
- `<nav class="cg-masthead__nav" id="cg-nav" aria-label="Primary">` +
84
+ `<nav class="cg-masthead__nav" id="cg-nav" aria-label="${landmarks.primary}">` +
73
85
  `${links === '' ? '' : `<ul class="cg-masthead__links">${links}</ul>`}` +
74
86
  `${action}` +
75
87
  `</nav>`
@@ -105,7 +117,7 @@ export function renderChrome(input) {
105
117
  `</div>` +
106
118
  `${footerLinks === ''
107
119
  ? ''
108
- : `<nav class="cg-colophon__nav" aria-label="Footer"><ul class="cg-colophon__links">${footerLinks}</ul></nav>`}` +
120
+ : `<nav class="cg-colophon__nav" aria-label="${landmarks.footer}"><ul class="cg-colophon__links">${footerLinks}</ul></nav>`}` +
109
121
  `${social === null ? '' : `<div class="cg-colophon__follow">${serialize(social)}</div>`}` +
110
122
  `<div class="cg-colophon__legal">` +
111
123
  `<p class="cg-colophon__copyright">© ${year} ${siteName}</p>` +
@@ -1 +1 @@
1
- {"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,MAAM,oBAAoB,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AAW,EAAE,CAAA;IACrC,4EAA4E;IAC5E,2EAA2E;IAC3E,MAAM,aAAa,GAAG,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE;QACvD,SAAS,EAAE,sBAAsB;QACjC,YAAY,EAAE,IAAI;KACnB,CAAC,CAAA;IAEF,MAAM,MAAM,GACV,8DAA8D;QAC9D,GAAG,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;QAC3D,kCAAkC;QAClC,sCAAsC,IAAI,KAAK,QAAQ,MAAM;QAC7D,GAAG,aAAa,GAAG,IAAI,EAAE;QACzB,QAAQ;QACR,GACE,WAAW,KAAK,EAAE;YAChB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,6CAA6C,SAAS,CAAC,MAAM,oCAAoC,WAAW,aAClH,EAAE;QACF,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oCAAoC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE;QACzF,kCAAkC;QAClC,uCAAuC,IAAI,IAAI,QAAQ,MAAM;QAC7D,sCAAsC,KAAK,CAAC,YAAY,QAAQ;QAChE,QAAQ;QACR,iBAAiB,CAAA;IAEnB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAC3B,CAAC"}
@@ -22,7 +22,7 @@ import { defineTheme } from '@cogenta/theme-kit';
22
22
  export default defineTheme({
23
23
  name: 'portfolio',
24
24
  version: '1.3.0',
25
- description: 'A theme for an independent design studio: work shown large on an asymmetric grid, Archivo set wide for display, black and white with one signal colour, zero client JavaScript.',
25
+ description: 'A theme for an independent studio, in photography or design: work shown large on an asymmetric grid, Archivo set wide for display, black and white with one signal colour, zero client JavaScript.',
26
26
  author: 'Cogenta',
27
27
  engine: '^1.0.0',
28
28
  blocks: '^2.0.0',
@@ -1 +1 @@
1
- {"version":3,"file":"theme.config.js","sourceRoot":"","sources":["../theme.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAe,WAAW,CAAC;IACzB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;IAChB,WAAW,EACT,iLAAiL;IACnL,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACV,MAAM;QACN,OAAO;QACP,aAAa;QACb,aAAa;QACb,KAAK;QACL,SAAS;QACT,OAAO;QACP,KAAK;QACL,OAAO;QACP,OAAO;QACP,gBAAgB;QAChB,OAAO;QACP,aAAa;QACb,cAAc;QACd,WAAW;QACX,aAAa;QACb,WAAW;KACZ;IACD,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE;CAClC,CAAC,CAAA"}
1
+ {"version":3,"file":"theme.config.js","sourceRoot":"","sources":["../theme.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAe,WAAW,CAAC;IACzB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;IAChB,WAAW,EACT,oMAAoM;IACtM,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACV,MAAM;QACN,OAAO;QACP,aAAa;QACb,aAAa;QACb,KAAK;QACL,SAAS;QACT,OAAO;QACP,KAAK;QACL,OAAO;QACP,OAAO;QACP,gBAAgB;QAChB,OAAO;QACP,aAAa;QACb,cAAc;QACd,WAAW;QACX,aAAa;QACb,WAAW;KACZ;IACD,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE;CAClC,CAAC,CAAA"}
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo)
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,41 @@
1
+ # Fonts of `@cogenta/theme-portfolio`
2
+
3
+ Served by the site itself at `/_cogenta/fonts/portfolio/<file>`. A page of this
4
+ theme makes **no request to a font provider**.
5
+
6
+ | Family | Style | Subset | Weight | File | Size |
7
+ |---|---|---|---|---|---|
8
+ | Archivo | normal | latin-ext | 100 900 (width 62% 125%) | `archivo-normal-latin-ext-5717f370.woff2` | 84.2 KiB |
9
+ | Archivo | normal | latin | 100 900 (width 62% 125%) | `archivo-normal-latin-e3a28ead.woff2` | 88.0 KiB |
10
+
11
+ Total: 2 files, 172.2 KiB.
12
+
13
+ ## Licence
14
+
15
+ - **Archivo**: SIL Open Font License 1.1, text in `OFL-archivo.txt`
16
+
17
+ The OFL permits bundling and redistributing these files with this package, as
18
+ long as the licence text travels with them (it does) and the fonts are not sold
19
+ on their own.
20
+
21
+ ## Source and subsets
22
+
23
+ The files are the variable WOFF2 builds that the Google Fonts `css2` API
24
+ serves, taken from the `google/fonts` open-source repository's distribution.
25
+ Only the `latin` and `latin-ext` subsets are kept: together they cover
26
+ French (œ Œ ’ « » and every accented capital), the other Western European
27
+ languages, and the euro sign. A language written in another script falls back to
28
+ the next family of the theme's stack.
29
+
30
+ ## How they were fetched
31
+
32
+ ```sh
33
+ node scripts/fetch-theme-fonts.mjs portfolio
34
+ ```
35
+
36
+ The script asks `https://fonts.googleapis.com/css2` with a modern User-Agent for
37
+ exactly the families, axes and weights this theme used before it was
38
+ self-hosted, downloads each `latin`/`latin-ext` file, names it after a hash of
39
+ its bytes (so a changed file gets a new URL and can be cached for a year), and
40
+ rewrites `src/styles/fonts.css`. It needs the network once, when it is run, and
41
+ never when a site is built, tested or served.
@@ -0,0 +1,21 @@
1
+ {
2
+ "theme": "portfolio",
3
+ "faces": [
4
+ {
5
+ "family": "Archivo",
6
+ "style": "normal",
7
+ "weight": "100 900",
8
+ "subset": "latin-ext",
9
+ "file": "archivo-normal-latin-ext-5717f370.woff2",
10
+ "css": "@font-face {\n font-family: 'Archivo';\n font-style: normal;\n font-weight: 100 900;\n font-stretch: 62% 125%;\n font-display: swap;\n src: url(/_cogenta/fonts/portfolio/archivo-normal-latin-ext-5717f370.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": "Archivo",
14
+ "style": "normal",
15
+ "weight": "100 900",
16
+ "subset": "latin",
17
+ "file": "archivo-normal-latin-e3a28ead.woff2",
18
+ "css": "@font-face {\n font-family: 'Archivo';\n font-style: normal;\n font-weight: 100 900;\n font-stretch: 62% 125%;\n font-display: swap;\n src: url(/_cogenta/fonts/portfolio/archivo-normal-latin-e3a28ead.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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogenta/theme-portfolio",
3
- "version": "1.3.7",
3
+ "version": "1.4.0",
4
4
  "description": "An ultra-modern creative-portfolio theme for Cogenta: brutalist-meets-editorial typography, an oversized display scale, and 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-portfolio"
37
40
  },
38
41
  "dependencies": {
39
- "@cogenta/blocks": "1.1.6",
40
- "@cogenta/render": "0.5.0",
41
- "@cogenta/theme-kit": "0.7.1"
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.1"
47
+ "astro": "^7.2.8"
45
48
  },
46
49
  "devDependencies": {
47
- "astro": "^7.2.1",
50
+ "astro": "^7.2.8",
48
51
  "typescript": "^7.0.2",
49
- "vitest": "^4.1.10"
52
+ "vitest": "^4.1.11"
50
53
  },
51
54
  "scripts": {
52
55
  "build": "tsc -p tsconfig.json",
@@ -20,7 +20,16 @@ function renderItem(item: LogoItem, ctx: RenderContext): HtmlElement {
20
20
  { class: 'cg-marks__item' },
21
21
  item.url === undefined
22
22
  ? h('div', { class: 'cg-marks__plate' }, mark)
23
- : h('a', { class: 'cg-marks__plate', href: item.url, rel: 'noopener noreferrer' }, mark),
23
+ : h(
24
+ 'a',
25
+ {
26
+ class: 'cg-marks__plate',
27
+ href: item.url,
28
+ 'aria-label': item.name,
29
+ rel: 'noopener noreferrer',
30
+ },
31
+ mark,
32
+ ),
24
33
  h('p', { class: 'cg-marks__name' }, item.name),
25
34
  )
26
35
  }
@@ -64,6 +64,22 @@ function renderFooterNote(note: string): string {
64
64
  .join('')}</div>`
65
65
  }
66
66
 
67
+ /**
68
+ * The names a screen reader gives the header and footer landmarks, in the
69
+ * page's own language. The page's visible words come from `THEME_STRINGS`;
70
+ * these three are read aloud only, so they stay with the markup that carries
71
+ * them.
72
+ */
73
+ function landmarkLabels(locale: string): {
74
+ readonly menu: string
75
+ readonly primary: string
76
+ readonly footer: string
77
+ } {
78
+ return locale.toLowerCase().startsWith('fr')
79
+ ? { menu: 'Menu', primary: 'Navigation principale', footer: 'Pied de page' }
80
+ : { menu: 'Menu', primary: 'Primary', footer: 'Footer' }
81
+ }
82
+
67
83
  export function renderChrome(input: ChromeInput): ChromeResult {
68
84
  const siteName = escapeText(input.site.name)
69
85
  const home = escapeAttribute(input.homeHref)
@@ -82,13 +98,14 @@ export function renderChrome(input: ChromeInput): ChromeResult {
82
98
  ? ''
83
99
  : `<p class="cg-masthead__tagline">${escapeText(input.tagline)}</p>`
84
100
 
101
+ const landmarks = landmarkLabels(input.locale)
85
102
  const hasMenu = links !== '' || action !== ''
86
103
  const menu = hasMenu
87
- ? `<input type="checkbox" id="cg-nav-toggle" class="cg-nav-toggle-input" aria-label="Menu">` +
104
+ ? `<input type="checkbox" id="cg-nav-toggle" class="cg-nav-toggle-input" aria-label="${landmarks.menu}">` +
88
105
  `<label for="cg-nav-toggle" class="cg-nav-toggle-label" aria-hidden="true">` +
89
106
  `<span class="cg-nav-toggle-bar"></span><span class="cg-nav-toggle-bar"></span>` +
90
107
  `</label>` +
91
- `<nav class="cg-masthead__nav" id="cg-nav" aria-label="Primary">` +
108
+ `<nav class="cg-masthead__nav" id="cg-nav" aria-label="${landmarks.primary}">` +
92
109
  `${links === '' ? '' : `<ul class="cg-masthead__links">${links}</ul>`}` +
93
110
  `${action}` +
94
111
  `</nav>`
@@ -131,7 +148,7 @@ export function renderChrome(input: ChromeInput): ChromeResult {
131
148
  `${
132
149
  footerLinks === ''
133
150
  ? ''
134
- : `<nav class="cg-colophon__nav" aria-label="Footer"><ul class="cg-colophon__links">${footerLinks}</ul></nav>`
151
+ : `<nav class="cg-colophon__nav" aria-label="${landmarks.footer}"><ul class="cg-colophon__links">${footerLinks}</ul></nav>`
135
152
  }` +
136
153
  `${social === null ? '' : `<div class="cg-colophon__follow">${serialize(social)}</div>`}` +
137
154
  `<div class="cg-colophon__legal">` +
@@ -510,6 +510,11 @@
510
510
  quotes: "\201C" "\201D" "\2018" "\2019";
511
511
  }
512
512
 
513
+ /* French sets a quotation in guillemets, each with a no-break space inside. */
514
+ :lang(fr) .cg-quote__quote {
515
+ quotes: "\00AB\00A0" "\00A0\00BB" "\201C" "\201D";
516
+ }
517
+
513
518
  .cg-quote__text {
514
519
  margin: 0;
515
520
  font-size: var(--cg-size-lead);
@@ -0,0 +1,33 @@
1
+ /*
2
+ * The web fonts of `@cogenta/theme-portfolio`, 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/portfolio/<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: 'Archivo';
17
+ font-style: normal;
18
+ font-weight: 100 900;
19
+ font-stretch: 62% 125%;
20
+ font-display: swap;
21
+ src: url(/_cogenta/fonts/portfolio/archivo-normal-latin-ext-5717f370.woff2) format('woff2');
22
+ 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;
23
+ }
24
+
25
+ @font-face {
26
+ font-family: 'Archivo';
27
+ font-style: normal;
28
+ font-weight: 100 900;
29
+ font-stretch: 62% 125%;
30
+ font-display: swap;
31
+ src: url(/_cogenta/fonts/portfolio/archivo-normal-latin-e3a28ead.woff2) format('woff2');
32
+ 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;
33
+ }
@@ -14,15 +14,15 @@
14
14
  * Not one colour is written literally in any of them: every value comes from
15
15
  * a skin token or from a `--cg-*` property composed from those.
16
16
  *
17
- * The one thing this file adds on its own is the Google Fonts request for
17
+ * The one thing this file adds on its own is the self-hosted `fonts.css` faces for
18
18
  * Archivo with both of its axes: width (62 to 125, the display sizes are set
19
19
  * wide) and weight. A skin only names a family; it never fetches one. The
20
- * family falls back to a real system stack if Google Fonts is unreachable,
20
+ * family falls back to a real system stack if a face fails to load,
21
21
  * and `display=swap` keeps text visible while it loads. `cogenta serve`
22
- * hoists this `@import` above the skin's rules.
22
+ * serves the faces itself, from `/_cogenta/fonts/`.
23
23
  */
24
24
 
25
- @import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&display=swap");
25
+ @import "./fonts.css";
26
26
 
27
27
  @import "./tokens.css";
28
28
  @import "./base.css";
@@ -592,6 +592,10 @@ a.cg-widget__comment-entry:hover {
592
592
  letter-spacing: -0.01em;
593
593
  }
594
594
 
595
+ :lang(fr) .cg-widget__quote-text {
596
+ quotes: "\00AB\00A0" "\00A0\00BB" "\201C" "\201D";
597
+ }
598
+
595
599
  .cg-widget__quote-text p {
596
600
  margin: 0;
597
601
  }
@@ -341,6 +341,10 @@
341
341
  }
342
342
 
343
343
  .cg-facts__link {
344
+ display: inline-flex;
345
+ align-items: center;
346
+ min-block-size: 24px;
347
+ padding-inline: 2px;
344
348
  color: var(--cg-ink);
345
349
  text-decoration-color: transparent;
346
350
  }