@fluid-theme/core 2.0.0 → 2.1.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 +22 -1
- package/CLAUDE.md +10 -2
- package/dist/fluid-1x.min.css +1 -1
- package/dist/fluid-fonts-archivo.min.css +2 -0
- package/dist/fluid-fonts-bodoni.min.css +2 -0
- package/dist/fluid-fonts.min.css +1 -1
- package/dist/fluid-legacy-1x.css +1 -1
- package/dist/fluid-nav.min.css +1 -1
- package/dist/fluid-toc.min.css +1 -1
- package/dist/fluid-zero.min.css +1 -1
- package/dist/fluid.min.css +1 -1
- package/dist/fonts/OFL-archivo.txt +93 -0
- package/dist/fonts/OFL-bodoni-moda.txt +93 -0
- package/dist/fonts/OFL-hanken-grotesk.txt +93 -0
- package/dist/fonts/archivo-latin-wdth-italic.woff2 +0 -0
- package/dist/fonts/archivo-latin-wdth-normal.woff2 +0 -0
- package/dist/fonts/bodoni-moda-latin-opsz-italic.woff2 +0 -0
- package/dist/fonts/bodoni-moda-latin-opsz-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-wght-normal.woff2 +0 -0
- package/package.json +8 -9
- package/src/fluid.css +1 -1
- package/starters/workflows/README.md +40 -0
- package/starters/workflows/dependabot.yml +21 -0
- package/starters/workflows/update-fluid-theme.yml +296 -0
- package/themes/fonts/OFL-archivo.txt +93 -0
- package/themes/fonts/OFL-bodoni-moda.txt +93 -0
- package/themes/fonts/OFL-hanken-grotesk.txt +93 -0
- package/themes/fonts/archivo-latin-wdth-italic.woff2 +0 -0
- package/themes/fonts/archivo-latin-wdth-normal.woff2 +0 -0
- package/themes/fonts/archivo.css +20 -0
- package/themes/fonts/bodoni-moda-latin-opsz-italic.woff2 +0 -0
- package/themes/fonts/bodoni-moda-latin-opsz-normal.woff2 +0 -0
- package/themes/fonts/bodoni.css +35 -0
- package/themes/fonts/hanken-grotesk-latin-wght-italic.woff2 +0 -0
- package/themes/fonts/hanken-grotesk-latin-wght-normal.woff2 +0 -0
- package/themes/gallery.css +105 -0
- package/themes/swiss.css +53 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-theme/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "A modern, semantic CSS design system built on physics principles — not utility classes",
|
|
5
5
|
"main": "dist/fluid.min.css",
|
|
6
6
|
"style": "dist/fluid.min.css",
|
|
@@ -8,15 +8,22 @@
|
|
|
8
8
|
".": "./dist/fluid.min.css",
|
|
9
9
|
"./zero": "./dist/fluid-zero.min.css",
|
|
10
10
|
"./fonts": "./dist/fluid-fonts.min.css",
|
|
11
|
+
"./fonts-archivo": "./dist/fluid-fonts-archivo.min.css",
|
|
12
|
+
"./fonts-bodoni": "./dist/fluid-fonts-bodoni.min.css",
|
|
11
13
|
"./legacy-1x": "./dist/fluid-legacy-1x.css",
|
|
12
14
|
"./1x": "./dist/fluid-1x.min.css",
|
|
13
15
|
"./toc": "./dist/fluid-toc.min.css",
|
|
14
16
|
"./nav": "./dist/fluid-nav.min.css",
|
|
15
17
|
"./toc-build": "./assets/js/toc-build.mjs",
|
|
18
|
+
"./themes/swiss": "./themes/swiss.css",
|
|
19
|
+
"./themes/gallery": "./themes/gallery.css",
|
|
20
|
+
"./themes/*": "./themes/*",
|
|
16
21
|
"./src": "./src/fluid.css"
|
|
17
22
|
},
|
|
18
23
|
"files": [
|
|
19
24
|
"dist/",
|
|
25
|
+
"themes/",
|
|
26
|
+
"starters/workflows/",
|
|
20
27
|
"assets/js/",
|
|
21
28
|
"src/",
|
|
22
29
|
"fluid-agent-kit/",
|
|
@@ -63,14 +70,6 @@
|
|
|
63
70
|
"url": "https://github.com/Agile-Media-Agency/the-fluid-theme/issues"
|
|
64
71
|
},
|
|
65
72
|
"homepage": "https://thefluidtheme.com",
|
|
66
|
-
"engines": {
|
|
67
|
-
"browsers": [
|
|
68
|
-
"last 2 Chrome versions",
|
|
69
|
-
"last 2 Firefox versions",
|
|
70
|
-
"last 2 Safari versions",
|
|
71
|
-
"last 2 Edge versions"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
73
|
"browserslist": [
|
|
75
74
|
"supports css-cascade-layers",
|
|
76
75
|
"supports css-container-queries",
|
package/src/fluid.css
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Automatic Fluid Theme Update Workflows
|
|
2
|
+
|
|
3
|
+
Every Fluid site pins an exact version of `@fluid-theme/core` (never a live runtime CDN link) and receives automatic pull requests when a new version is published to public npm.
|
|
4
|
+
|
|
5
|
+
No npm token or repository secret is required because `@fluid-theme/core` is public on npm (`https://www.npmjs.com/package/@fluid-theme/core`). GitHub's built-in `GITHUB_TOKEN` opens the update pull request.
|
|
6
|
+
|
|
7
|
+
## Which one a site uses
|
|
8
|
+
|
|
9
|
+
| Site | Tool | Why |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `@fluid-theme/core` in `package.json` (copies `dist/` at build) | `dependabot.yml` | Dependabot's PRs run the site's own checks and cost no Actions minutes until CI runs |
|
|
12
|
+
| CSS vendored in the repo, no npm dependency | `update-fluid-theme.yml` | Dependabot cannot see vendored files |
|
|
13
|
+
|
|
14
|
+
Use one per site, never both: the workflow skips any site whose `package.json` lists `@fluid-theme/core`, so a bump never opens two PRs.
|
|
15
|
+
|
|
16
|
+
## 1. Vendored sites: copy the workflow
|
|
17
|
+
|
|
18
|
+
Copy `update-fluid-theme.yml` into your site repository at:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
.github/workflows/update-fluid-theme.yml
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Also ensure **Settings → Actions → General → Workflow permissions → Allow GitHub Actions to create and approve pull requests** is ticked in the site repository (off by default in an organization; set it at the org level for every site at once).
|
|
25
|
+
|
|
26
|
+
**CI on the update PR.** A pull request opened with the built-in `GITHUB_TOKEN` does not trigger the site's `pull_request` workflows, so it shows no checks and an agent cannot "merge when green". Add a repository or organization secret `FLUID_UPDATE_TOKEN` (a GitHub App installation token or a fine-grained token with contents and pull-requests write); the workflow uses it when present. Without it, close and reopen the PR to run checks.
|
|
27
|
+
|
|
28
|
+
**Cost.** Each run takes about a minute of Actions time in the site's account (weekly: about 4-5 minutes a month per site). Organizations near their monthly cap can drop the `schedule:` trigger and run it by hand.
|
|
29
|
+
|
|
30
|
+
### How it works
|
|
31
|
+
|
|
32
|
+
1. Runs every Monday (`09:17 UTC`) and on manual **Run workflow** (`workflow_dispatch`).
|
|
33
|
+
2. Reads the site's current version from the first-line banner of the vendored `fluid.min.css` (`/* @fluid-theme/core vX.Y.Z | ... */`). A site whose `package.json` lists `@fluid-theme/core` is skipped: Dependabot updates it.
|
|
34
|
+
3. Checks `npm view @fluid-theme/core version` on public npm.
|
|
35
|
+
4. **Holds major upgrades by default:** if a new major version is out (for example `2.x` → `3.x`), weekly runs stay within the current major line and log a notice in the Actions summary. Trigger the workflow manually with `allow_major: true` when you are ready to adopt a major upgrade.
|
|
36
|
+
5. Refreshes the vendored `fluid*.min.css`, `fonts/`, `swiss.css` / `gallery.css` child themes, and `toc.js` / `fit-text.js` files already present in the site (it never adds new files and never runs the site's build), commits only those files, and opens or updates a single pull request on the branch `chore/fluid-theme-update` (a newer release updates the open PR rather than opening a second).
|
|
37
|
+
|
|
38
|
+
## 2. `package.json` sites: Dependabot
|
|
39
|
+
|
|
40
|
+
Sites that install `@fluid-theme/core` in `package.json` and copy `node_modules/@fluid-theme/core/dist/` during `npm run build` copy `dependabot.yml` to `.github/dependabot.yml` (not the workflow). It groups `@fluid-theme/*` updates weekly and ignores major version jumps until an intentional migration.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Optional Dependabot configuration for Fluid sites with a package.json.
|
|
2
|
+
# Copy to .github/dependabot.yml. Use it instead of update-fluid-theme.yml,
|
|
3
|
+
# never alongside (that workflow is for sites that vendor the CSS). Major
|
|
4
|
+
# theme bumps are ignored by default so a site's
|
|
5
|
+
# look never changes without an explicit migration PR.
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
day: "monday"
|
|
13
|
+
time: "09:00"
|
|
14
|
+
groups:
|
|
15
|
+
fluid-theme:
|
|
16
|
+
patterns:
|
|
17
|
+
- "@fluid-theme/*"
|
|
18
|
+
ignore:
|
|
19
|
+
- dependency-name: "@fluid-theme/core"
|
|
20
|
+
update-types:
|
|
21
|
+
- "version-update:semver-major"
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# Scheduled Fluid Theme updater for sites that VENDOR the CSS (no
|
|
2
|
+
# @fluid-theme/core in package.json). Sites with the npm dependency use
|
|
3
|
+
# Dependabot (dependabot.yml) instead; this workflow skips them, so a bump
|
|
4
|
+
# never opens two PRs. Copy to .github/workflows/update-fluid-theme.yml.
|
|
5
|
+
#
|
|
6
|
+
# @fluid-theme/core is public on npm, so no npm token is needed. A PR opened
|
|
7
|
+
# with the built-in GITHUB_TOKEN does not trigger the site's own
|
|
8
|
+
# pull_request checks; set a FLUID_UPDATE_TOKEN secret (a GitHub App or
|
|
9
|
+
# fine-grained token with contents + pull-requests write) to get CI on the
|
|
10
|
+
# update PR. Each run costs about a minute of Actions time. Major-version jumps are held by default on the weekly
|
|
11
|
+
# schedule so a site's look never changes silently; trigger manually with
|
|
12
|
+
# allow_major=true when ready to migrate.
|
|
13
|
+
name: Update Fluid Theme
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
schedule:
|
|
17
|
+
- cron: '17 9 * * 1' # Mondays at 09:17 UTC
|
|
18
|
+
workflow_dispatch:
|
|
19
|
+
inputs:
|
|
20
|
+
allow_major:
|
|
21
|
+
description: 'Allow major-version upgrades (may change default look/tokens)'
|
|
22
|
+
required: false
|
|
23
|
+
type: boolean
|
|
24
|
+
default: false
|
|
25
|
+
vendor_dir:
|
|
26
|
+
description: 'Optional directory where fluid.min.css is vendored (auto-detected if blank)'
|
|
27
|
+
required: false
|
|
28
|
+
type: string
|
|
29
|
+
default: ''
|
|
30
|
+
|
|
31
|
+
permissions:
|
|
32
|
+
contents: write
|
|
33
|
+
pull-requests: write
|
|
34
|
+
|
|
35
|
+
concurrency:
|
|
36
|
+
group: update-fluid-theme
|
|
37
|
+
cancel-in-progress: true
|
|
38
|
+
|
|
39
|
+
jobs:
|
|
40
|
+
update-theme:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
timeout-minutes: 15
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v5
|
|
45
|
+
with:
|
|
46
|
+
token: ${{ secrets.FLUID_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
47
|
+
|
|
48
|
+
- uses: actions/setup-node@v5
|
|
49
|
+
with:
|
|
50
|
+
node-version: 24
|
|
51
|
+
|
|
52
|
+
- name: Check current and published @fluid-theme/core versions
|
|
53
|
+
id: check
|
|
54
|
+
env:
|
|
55
|
+
ALLOW_MAJOR: ${{ inputs.allow_major || 'false' }}
|
|
56
|
+
INPUT_VENDOR_DIR: ${{ inputs.vendor_dir || '' }}
|
|
57
|
+
run: |
|
|
58
|
+
node <<'EOF'
|
|
59
|
+
import { existsSync, readFileSync, readdirSync, statSync, appendFileSync } from 'node:fs';
|
|
60
|
+
import { execFileSync } from 'node:child_process';
|
|
61
|
+
import { dirname, join } from 'node:path';
|
|
62
|
+
|
|
63
|
+
const out = process.env.GITHUB_OUTPUT;
|
|
64
|
+
const summary = process.env.GITHUB_STEP_SUMMARY;
|
|
65
|
+
const allowMajor = process.env.ALLOW_MAJOR === 'true';
|
|
66
|
+
const inputDir = (process.env.INPUT_VENDOR_DIR || '').trim();
|
|
67
|
+
|
|
68
|
+
const parseSemver = (v) => {
|
|
69
|
+
const m = String(v).match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
70
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
|
|
71
|
+
};
|
|
72
|
+
const cmpSemver = (a, b) => {
|
|
73
|
+
const pa = parseSemver(a);
|
|
74
|
+
const pb = parseSemver(b);
|
|
75
|
+
if (!pa || !pb) return 0;
|
|
76
|
+
for (let i = 0; i < 3; i++) {
|
|
77
|
+
if (pa[i] !== pb[i]) return pa[i] - pb[i];
|
|
78
|
+
}
|
|
79
|
+
return 0;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
let current = '';
|
|
83
|
+
let hasPkgDep = false;
|
|
84
|
+
|
|
85
|
+
if (existsSync('package.json')) {
|
|
86
|
+
const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
|
|
87
|
+
const raw = pkg.dependencies?.['@fluid-theme/core'] || pkg.devDependencies?.['@fluid-theme/core'] || '';
|
|
88
|
+
if (raw) {
|
|
89
|
+
hasPkgDep = true;
|
|
90
|
+
current = raw.replace(/^[^\d]*/, '');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (hasPkgDep) {
|
|
95
|
+
console.log('@fluid-theme/core is a package.json dependency: Dependabot updates this site (dependabot.yml). Nothing to do.');
|
|
96
|
+
appendFileSync(summary, '### Skipped\n`@fluid-theme/core` is in package.json, so Dependabot updates this site.\n\n');
|
|
97
|
+
appendFileSync(out, 'update=false\n');
|
|
98
|
+
process.exit(0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const CORE_NAMES = ['fluid.min.css', 'fluid-1x.min.css', 'fluid-zero.min.css'];
|
|
102
|
+
|
|
103
|
+
function findVendoredCore(dir, depth = 0) {
|
|
104
|
+
if (depth > 4 || !existsSync(dir)) return [];
|
|
105
|
+
const skip = new Set(['.git', 'node_modules', 'dist', '.astro', '.wrangler', '_site']);
|
|
106
|
+
const found = [];
|
|
107
|
+
for (const entry of readdirSync(dir)) {
|
|
108
|
+
if (skip.has(entry)) continue;
|
|
109
|
+
const full = join(dir, entry);
|
|
110
|
+
const st = statSync(full);
|
|
111
|
+
if (st.isDirectory()) found.push(...findVendoredCore(full, depth + 1));
|
|
112
|
+
else if (CORE_NAMES.includes(entry)) found.push(full);
|
|
113
|
+
}
|
|
114
|
+
return found;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const vendorFiles = inputDir
|
|
118
|
+
? CORE_NAMES.map((name) => join(inputDir, name)).filter(existsSync)
|
|
119
|
+
: findVendoredCore('.');
|
|
120
|
+
|
|
121
|
+
for (const f of vendorFiles) {
|
|
122
|
+
if (current) break;
|
|
123
|
+
const firstLine = readFileSync(f, 'utf8').split('\n')[0] || '';
|
|
124
|
+
const m = firstLine.match(/@fluid-theme\/(?:core|zero)\s+v(\d+\.\d+\.\d+)/);
|
|
125
|
+
if (m) current = m[1];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (!parseSemver(current)) {
|
|
129
|
+
console.error(`Could not detect a valid stable @fluid-theme/core version (got "${current}") from package.json or vendored banner.`);
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const rawVersions = JSON.parse(execFileSync('npm', ['view', '@fluid-theme/core', 'versions', '--json'], { encoding: 'utf8' }));
|
|
134
|
+
const published = [rawVersions].flat().filter((v) => parseSemver(v)).sort(cmpSemver);
|
|
135
|
+
if (!published.length) {
|
|
136
|
+
console.error('No stable versions of @fluid-theme/core found on npm.');
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const latest = published[published.length - 1];
|
|
141
|
+
const curMajor = parseSemver(current)[0];
|
|
142
|
+
const latestMajor = parseSemver(latest)[0];
|
|
143
|
+
|
|
144
|
+
let target = latest;
|
|
145
|
+
if (latestMajor > curMajor && !allowMajor) {
|
|
146
|
+
const sameMajorNewer = published.filter((v) => parseSemver(v)[0] === curMajor && cmpSemver(v, current) > 0);
|
|
147
|
+
target = sameMajorNewer.length ? sameMajorNewer[sameMajorNewer.length - 1] : current;
|
|
148
|
+
appendFileSync(
|
|
149
|
+
summary,
|
|
150
|
+
`### Major upgrade held\nLatest published version is **${latest}** (current: **${current}**). Run this workflow manually with \`allow_major: true\` after reviewing migration notes.\n\n`
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const shouldUpdate = cmpSemver(target, current) > 0;
|
|
155
|
+
const vendorDirs = [...new Set(vendorFiles.map((f) => dirname(f)))];
|
|
156
|
+
|
|
157
|
+
console.log(`Current: ${current} | Target: ${target} | Latest: ${latest} | Update: ${shouldUpdate}`);
|
|
158
|
+
appendFileSync(out, `update=${shouldUpdate}\n`);
|
|
159
|
+
appendFileSync(out, `current=${current}\n`);
|
|
160
|
+
appendFileSync(out, `target=${target}\n`);
|
|
161
|
+
appendFileSync(out, `latest=${latest}\n`);
|
|
162
|
+
appendFileSync(out, `has_pkg=${hasPkgDep}\n`);
|
|
163
|
+
appendFileSync(out, `vendor_dirs=${JSON.stringify(vendorDirs)}\n`);
|
|
164
|
+
EOF
|
|
165
|
+
|
|
166
|
+
- name: Apply theme update
|
|
167
|
+
if: steps.check.outputs.update == 'true'
|
|
168
|
+
id: apply
|
|
169
|
+
env:
|
|
170
|
+
TARGET: ${{ steps.check.outputs.target }}
|
|
171
|
+
VENDOR_DIRS: ${{ steps.check.outputs.vendor_dirs }}
|
|
172
|
+
run: |
|
|
173
|
+
set -euo pipefail
|
|
174
|
+
CHANGED=()
|
|
175
|
+
|
|
176
|
+
WORK=$(mktemp -d)
|
|
177
|
+
TARBALL=$(npm pack "@fluid-theme/core@$TARGET" --pack-destination "$WORK" | tail -n 1)
|
|
178
|
+
tar -xzf "$WORK/$TARBALL" -C "$WORK"
|
|
179
|
+
PKG="$WORK/package"
|
|
180
|
+
|
|
181
|
+
node - "$PKG" "$VENDOR_DIRS" <<'EOF' > "$WORK/copied.txt"
|
|
182
|
+
import { cpSync, existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
183
|
+
import { join } from 'node:path';
|
|
184
|
+
|
|
185
|
+
const [, , pkgDir, rawDirs] = process.argv;
|
|
186
|
+
const dirs = JSON.parse(rawDirs || '[]');
|
|
187
|
+
const copied = [];
|
|
188
|
+
|
|
189
|
+
for (const dir of dirs) {
|
|
190
|
+
if (!existsSync(dir)) continue;
|
|
191
|
+
for (const f of readdirSync(join(pkgDir, 'dist'))) {
|
|
192
|
+
if (!f.endsWith('.css')) continue;
|
|
193
|
+
const dest = join(dir, f);
|
|
194
|
+
if (!existsSync(dest)) continue;
|
|
195
|
+
let srcFile = join(pkgDir, 'dist', f);
|
|
196
|
+
// Path-A 1.x compatibility sites vendor dist/fluid-1x.min.css under the fluid.min.css name;
|
|
197
|
+
// keep serving fluid-1x.min.css when the existing banner marks "core + legacy-1x".
|
|
198
|
+
if (f === 'fluid.min.css') {
|
|
199
|
+
const banner = readFileSync(dest, 'utf8').split('\n')[0] || '';
|
|
200
|
+
if (banner.includes('core + legacy-1x') && existsSync(join(pkgDir, 'dist', 'fluid-1x.min.css'))) {
|
|
201
|
+
srcFile = join(pkgDir, 'dist', 'fluid-1x.min.css');
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
cpSync(srcFile, dest);
|
|
205
|
+
copied.push(dest);
|
|
206
|
+
}
|
|
207
|
+
const siteFontsDir = join(dir, 'fonts');
|
|
208
|
+
const pkgFontsDir = join(pkgDir, 'dist', 'fonts');
|
|
209
|
+
if (existsSync(siteFontsDir) && existsSync(pkgFontsDir)) {
|
|
210
|
+
const existingFonts = readdirSync(siteFontsDir);
|
|
211
|
+
for (const f of readdirSync(pkgFontsDir)) {
|
|
212
|
+
const dest = join(siteFontsDir, f);
|
|
213
|
+
const stem = f.startsWith('OFL-') ? f.replace(/^OFL-|\.txt$/g, '') : '';
|
|
214
|
+
const hasMatchingFace = stem && existingFonts.some((ef) => ef.endsWith('.woff2') && ef.startsWith(stem));
|
|
215
|
+
if (existsSync(dest) || hasMatchingFace) {
|
|
216
|
+
cpSync(join(pkgFontsDir, f), dest);
|
|
217
|
+
copied.push(dest);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
// The official child themes, when the site vendors them.
|
|
222
|
+
for (const t of ['swiss.css', 'gallery.css']) {
|
|
223
|
+
for (const sub of ['', 'themes']) {
|
|
224
|
+
const dest = sub ? join(dir, sub, t) : join(dir, t);
|
|
225
|
+
// Only a file that is Fluid's theme: a site's own gallery.css stays.
|
|
226
|
+
const isFluid = existsSync(dest) && readFileSync(dest, 'utf8').slice(0, 300).includes(`"${t.replace('.css', '')}": an alternate child theme on the Fluid`);
|
|
227
|
+
if (isFluid && existsSync(join(pkgDir, 'themes', t))) {
|
|
228
|
+
cpSync(join(pkgDir, 'themes', t), dest);
|
|
229
|
+
copied.push(dest);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
for (const js of ['toc.js', 'toc-build.mjs', 'fit-text.js']) {
|
|
234
|
+
for (const sub of ['', 'js']) {
|
|
235
|
+
const dest = sub ? join(dir, sub, js) : join(dir, js);
|
|
236
|
+
if (existsSync(dest) && existsSync(join(pkgDir, 'assets', 'js', js))) {
|
|
237
|
+
cpSync(join(pkgDir, 'assets', 'js', js), dest);
|
|
238
|
+
copied.push(dest);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
for (const c of copied) console.log(c);
|
|
244
|
+
EOF
|
|
245
|
+
|
|
246
|
+
while IFS= read -r file; do
|
|
247
|
+
[ -n "$file" ] && CHANGED+=("$file")
|
|
248
|
+
done < "$WORK/copied.txt"
|
|
249
|
+
rm -rf "$WORK"
|
|
250
|
+
|
|
251
|
+
printf '%s\n' "${CHANGED[@]}" | awk 'NF && !seen[$0]++' > /tmp/changed-files.txt
|
|
252
|
+
cat /tmp/changed-files.txt
|
|
253
|
+
|
|
254
|
+
- name: Commit and open or update pull request
|
|
255
|
+
if: steps.check.outputs.update == 'true'
|
|
256
|
+
env:
|
|
257
|
+
GH_TOKEN: ${{ secrets.FLUID_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
258
|
+
CURRENT: ${{ steps.check.outputs.current }}
|
|
259
|
+
TARGET: ${{ steps.check.outputs.target }}
|
|
260
|
+
run: |
|
|
261
|
+
set -euo pipefail
|
|
262
|
+
if [ ! -s /tmp/changed-files.txt ] || git diff --quiet; then
|
|
263
|
+
echo "No tracked files changed after update."
|
|
264
|
+
exit 0
|
|
265
|
+
fi
|
|
266
|
+
|
|
267
|
+
# One branch for every update, so a newer release replaces an open
|
|
268
|
+
# update PR instead of opening a second one beside it.
|
|
269
|
+
BRANCH="chore/fluid-theme-update"
|
|
270
|
+
git config user.name "github-actions[bot]"
|
|
271
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
272
|
+
git fetch origin "+refs/heads/$BRANCH:refs/remotes/origin/$BRANCH" 2>/dev/null || true
|
|
273
|
+
git checkout -B "$BRANCH"
|
|
274
|
+
|
|
275
|
+
while IFS= read -r path; do
|
|
276
|
+
[ -n "$path" ] && git add -- "$path"
|
|
277
|
+
done < /tmp/changed-files.txt
|
|
278
|
+
|
|
279
|
+
TITLE="chore(theme): update @fluid-theme/core from $CURRENT to $TARGET"
|
|
280
|
+
git commit -m "$TITLE"
|
|
281
|
+
git push --force-with-lease origin "$BRANCH"
|
|
282
|
+
|
|
283
|
+
BODY=$(cat <<EOB
|
|
284
|
+
Updates \`@fluid-theme/core\` from **v$CURRENT** to **v$TARGET**.
|
|
285
|
+
|
|
286
|
+
- npm package: https://www.npmjs.com/package/@fluid-theme/core/v/$TARGET
|
|
287
|
+
- Compare: https://github.com/Agile-Media-Agency/the-fluid-theme/compare/v$CURRENT...v$TARGET
|
|
288
|
+
EOB
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
EXISTING=$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number // empty')
|
|
292
|
+
if [ -n "$EXISTING" ]; then
|
|
293
|
+
gh pr edit "$EXISTING" --title "$TITLE" --body "$BODY"
|
|
294
|
+
else
|
|
295
|
+
gh pr create --title "$TITLE" --body "$BODY" --head "$BRANCH"
|
|
296
|
+
fi
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) Archivo-Italic[wdth,wght].ttf: 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,93 @@
|
|
|
1
|
+
Copyright 2020 The Bodoni Moda Project Authors (https://github.com/indestructible-type/Bodoni) BodoniModa-Italic[opsz,wght].ttf: Copyright 2020 The Bodoni Moda Project Authors (https://github.com/indestructible-type/Bodoni)
|
|
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.
|