@chassis-ui/docs 0.9.0 → 0.10.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/CHANGELOG.md +6 -0
- package/README.md +3 -2
- package/UPGRADING.md +36 -0
- package/package.json +1 -1
- package/src/layouts/SiteLogo.astro +22 -0
- package/src/layouts/footer/Footer.astro +3 -3
- package/src/layouts/head/Head.astro +4 -6
- package/src/layouts/header/Navigation.astro +4 -3
- package/src/scss/_layout.scss +8 -0
- package/src/scss/_search.scss +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @chassis-ui/docs
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Breaking.** The head links one font stylesheet, `fonts/fonts.css` under the static path, in place of `fonts/text.css`, `fonts/display.css` and `fonts/code.css`, and the navigation bar and the footer inline the logo, `images/site-logo.svg`, in place of loading it with `<img>`. chassis-assets made both changes on `app/docs` on 2026-10-19: a brand has one `fonts.css`, and the logo of the `chassis` brand has no `xmlns` and is colored by the classes `icon-default` and `icon-primary` of the page, so it shows only inline. A site moves its `vendor/assets` submodule to `db6d64b` of `app/docs` or later with `pnpm sync-submodules`; with an earlier commit the pages show the fallback fonts. The build reads `static/images/site-logo.svg` of the site's `public` directory and fails without it. The logo is `2rem` high, and the footer gives its link the margin `mb-md` in place of `mb-xs`. The search of the header is `5rem` wide from the `lg` breakpoint, the icon and the shortcut, and `12.5rem` from `xl`, where it was 200px, so that no link of the header runs under it. See [UPGRADING.md](https://github.com/chassis-ui/website/blob/main/packages/docs/UPGRADING.md#from-09-to-010).
|
|
8
|
+
|
|
3
9
|
## 0.9.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -188,10 +188,10 @@ The layouts link to files under `/static/`, which the site puts into `static/` o
|
|
|
188
188
|
| ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
189
189
|
| `/static/css/chassis.css`, `/static/css/chassis.min.css` | the `dist` folder of `@chassis-ui/css` |
|
|
190
190
|
| `/static/icons/chassis-icons.svg`, `/static/icons/chassis-icons.css` | the `icons` folder of `@chassis-ui/icons` |
|
|
191
|
-
| `/static/images/site-logo.svg`, the logo of the navigation bar and the footer
|
|
191
|
+
| `/static/images/site-logo.svg`, the logo of the navigation bar and the footer. The build inlines it, and fails without the file | the docs build of `chassis-assets` |
|
|
192
192
|
| `/static/images/favicon.png`, `favicon-16x16.png`, `favicon-32x32.png` and `apple-touch-icon.png` | the docs build of `chassis-assets` |
|
|
193
193
|
| `/static/images/social-image.png`, the image of a page without a `thumbnail`. The build reads its size, and fails without the file | the docs build of `chassis-assets` |
|
|
194
|
-
| `/static/fonts/
|
|
194
|
+
| `/static/fonts/fonts.css`, and the font files it loads | the docs build of `chassis-assets` |
|
|
195
195
|
| `/static/images/manifest.json`, the web app manifest | the site itself. The starter has one in `static/images/` |
|
|
196
196
|
|
|
197
197
|
`chassis-docs vendor` builds the docs build of `chassis-assets` in the `vendor/assets` submodule. See [Commands](#commands).
|
|
@@ -417,6 +417,7 @@ The integration provides five modules: `virtual:chassis-docs/config`, `virtual:c
|
|
|
417
417
|
|
|
418
418
|
| `@chassis-ui/docs` | Requires Astro | Requires `@chassis-ui/css` | Requires Node | Built with |
|
|
419
419
|
| ------------------ | -------------------------- | -------------------------- | ------------- | -------------------------------------- |
|
|
420
|
+
| 0.10.0 | `^7.0.0` | `>=0.10.0` | `>=22.12.0` | Astro 7.3.8, css 0.10.0, tokens 0.10.0 |
|
|
420
421
|
| 0.9.0 | `^7.0.0` | `>=0.10.0` | `>=22.12.0` | Astro 7.3.8, css 0.10.0, tokens 0.10.0 |
|
|
421
422
|
| 0.8.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.7.1, tokens 0.7.0 |
|
|
422
423
|
| 0.7.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.6.0, tokens 0.6.0 |
|
package/UPGRADING.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Upgrading @chassis-ui/docs
|
|
2
2
|
|
|
3
|
+
## From 0.9 to 0.10
|
|
4
|
+
|
|
5
|
+
0.10.0 links one font stylesheet, `fonts/fonts.css`, in place of `fonts/text.css`,
|
|
6
|
+
`fonts/display.css` and `fonts/code.css`, and inlines the logo of the navigation bar and the
|
|
7
|
+
footer, `images/site-logo.svg`, in place of loading it with `<img>`. chassis-assets made both
|
|
8
|
+
changes on `app/docs` on 2026-10-19: a brand has one `fonts.css`, the files of the `text`
|
|
9
|
+
role are `ui` files, and the logo of the `chassis` brand is for inline use. It has no `xmlns`,
|
|
10
|
+
and the classes `icon-default` and `icon-primary` of the page color its paths.
|
|
11
|
+
|
|
12
|
+
### 1. Update the dependency and the assets
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pnpm add -D @chassis-ui/docs@^0.10.0
|
|
16
|
+
pnpm sync-submodules
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The docs build of `chassis-assets` has `fonts/fonts.css` from `db6d64b` of `app/docs` on. With
|
|
20
|
+
an earlier commit the pages show the fallback fonts. A site that does not copy the docs build
|
|
21
|
+
provides `fonts/fonts.css` itself.
|
|
22
|
+
|
|
23
|
+
### What changes in the package
|
|
24
|
+
|
|
25
|
+
- **The head links `fonts/fonts.css`** under the static path, and no longer the three
|
|
26
|
+
stylesheets of the roles.
|
|
27
|
+
- **The navigation bar and the footer inline the logo.** The build reads
|
|
28
|
+
`static/images/site-logo.svg` of the site's `public` directory and fails without it. The
|
|
29
|
+
logo is `2rem` high, its width follows its `viewBox`, and the link around it names it. A
|
|
30
|
+
logo of an earlier docs build, with its own colors, a width and a height, shows at the same
|
|
31
|
+
height.
|
|
32
|
+
- **The link of the logo in the footer has the bottom margin `mb-md`,** where it was `mb-xs`.
|
|
33
|
+
|
|
34
|
+
### Check the result
|
|
35
|
+
|
|
36
|
+
Build the site before and after the upgrade and compare the pages in a browser, in both color
|
|
37
|
+
modes: the logo takes the colors of the theme.
|
|
38
|
+
|
|
3
39
|
## From 0.8 to 0.9
|
|
4
40
|
|
|
5
41
|
0.9.0 needs `@chassis-ui/css` 0.10.0 or later. css 0.10 names the font families by their
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* SiteLogo
|
|
4
|
+
*
|
|
5
|
+
* The logo of the site, `images/site-logo.svg` of the static files, inlined: the logo of the
|
|
6
|
+
* docs build of chassis-assets colors its paths with the classes `icon-default` and
|
|
7
|
+
* `icon-primary` of `@chassis-ui/css`, which reach a file that is in the page only. The link
|
|
8
|
+
* around it names it, so the drawing is hidden from assistive technology. The build fails
|
|
9
|
+
* without the file.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import fs from 'node:fs'
|
|
13
|
+
import { getPublicFsPath } from '../site'
|
|
14
|
+
|
|
15
|
+
const svg = fs
|
|
16
|
+
.readFileSync(getPublicFsPath('static/images/site-logo.svg'), 'utf8')
|
|
17
|
+
.replace(/^\s*<\?xml[^>]*\?>\s*/, '')
|
|
18
|
+
.replace(/^<svg\b/, '<svg aria-hidden="true" focusable="false"')
|
|
19
|
+
.trim()
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<Fragment set:html={svg} />
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Site footer with logo, license information, and navigation links.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import SiteLogo from '../SiteLogo.astro'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
<footer class="cxd-footer py-6xl">
|
|
@@ -13,11 +13,11 @@ import { getStaticPath } from '../../site'
|
|
|
13
13
|
<div class="grid row-gap-0">
|
|
14
14
|
<div class="col-span-full md:col-span-10 lg:col-span-5 mb-md">
|
|
15
15
|
<a
|
|
16
|
-
class="d-inline-flex align-items-center mb-
|
|
16
|
+
class="cxd-site-logo d-inline-flex align-items-center mb-md text-body-emphasis text-decoration-none"
|
|
17
17
|
href="/"
|
|
18
18
|
aria-label="Chassis"
|
|
19
19
|
>
|
|
20
|
-
<
|
|
20
|
+
<SiteLogo />
|
|
21
21
|
</a>
|
|
22
22
|
<p class="mb-xs">
|
|
23
23
|
This project is licensed under the MIT License, which allows for free use, modification,
|
|
@@ -42,13 +42,11 @@ const pageTitle = isHome
|
|
|
42
42
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
43
43
|
|
|
44
44
|
<!--
|
|
45
|
-
The fonts of the
|
|
46
|
-
|
|
47
|
-
not after the stylesheet that imports
|
|
45
|
+
The fonts of the brand, from the docs build of chassis-assets: one stylesheet declares the
|
|
46
|
+
family of every role. A link, not an `@import` in the styles, so that the browser finds it
|
|
47
|
+
with the page and not after the stylesheet that imports it
|
|
48
48
|
-->
|
|
49
|
-
<link rel="stylesheet" href={getStaticPath('fonts/
|
|
50
|
-
<link rel="stylesheet" href={getStaticPath('fonts/display.css')} />
|
|
51
|
-
<link rel="stylesheet" href={getStaticPath('fonts/code.css')} />
|
|
49
|
+
<link rel="stylesheet" href={getStaticPath('fonts/fonts.css')} />
|
|
52
50
|
|
|
53
51
|
<meta name="description" content={description} />
|
|
54
52
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Layout } from '../../libs/layout'
|
|
9
|
-
import { getConfig
|
|
9
|
+
import { getConfig } from '../../site'
|
|
10
|
+
import SiteLogo from '../SiteLogo.astro'
|
|
10
11
|
import NavLink from '../../components/NavLink.astro'
|
|
11
12
|
import ThemeToggler from '../../components/ThemeToggler.astro'
|
|
12
13
|
import SearchTrigger from './SearchTrigger.astro'
|
|
@@ -52,8 +53,8 @@ const isActive = (path: string) => {
|
|
|
52
53
|
)}
|
|
53
54
|
{layout !== 'docs' && <div class="lg:d-none" style="width: 4.25rem;" />}
|
|
54
55
|
|
|
55
|
-
<a class="navbar-brand m-0 py-sm lg:me-md" href="/" aria-label="Chassis">
|
|
56
|
-
<
|
|
56
|
+
<a class="navbar-brand cxd-site-logo m-0 py-sm lg:me-md" href="/" aria-label="Chassis">
|
|
57
|
+
<SiteLogo />
|
|
57
58
|
</a>
|
|
58
59
|
|
|
59
60
|
<div class="d-flex">
|
package/src/scss/_layout.scss
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
@use "@chassis-ui/css/scss/mixins" as *;
|
|
3
3
|
|
|
4
4
|
@layer custom {
|
|
5
|
+
// The navbar and the footer inline the logo. The height sets its size, also for a file that
|
|
6
|
+
// has a width and a height of its own.
|
|
7
|
+
.cxd-site-logo > svg {
|
|
8
|
+
display: block;
|
|
9
|
+
width: auto;
|
|
10
|
+
height: 2rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
.cxd-gutter {
|
|
6
14
|
--cx-container-padding: #{$cxd-gutter-x * .5};
|
|
7
15
|
}
|
package/src/scss/_search.scss
CHANGED
|
@@ -12,15 +12,17 @@
|
|
|
12
12
|
@include media-breakpoint-up(lg) {
|
|
13
13
|
position: absolute;
|
|
14
14
|
top: 20%;
|
|
15
|
-
right:
|
|
16
|
-
width:
|
|
15
|
+
right: 11.5rem;
|
|
16
|
+
width: 5rem;
|
|
17
17
|
|
|
18
18
|
[dir="rtl"] & {
|
|
19
19
|
right: auto;
|
|
20
|
-
left:
|
|
20
|
+
left: 11.5rem;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
@include media-breakpoint-up(xl) {
|
|
24
|
+
width: 12.5rem;
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
|