@taekwondo-db/web-app 0.0.0-stage → 0.1.2

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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +297 -2
  3. package/assets/css/abstracts/base.css +54 -0
  4. package/assets/css/abstracts/variables.css +125 -0
  5. package/assets/css/components/breadcrumb.css +14 -0
  6. package/assets/css/components/card.css +35 -0
  7. package/assets/css/components/categories.css +200 -0
  8. package/assets/css/components/detail.css +591 -0
  9. package/assets/css/components/grade.css +79 -0
  10. package/assets/css/components/header.css +131 -0
  11. package/assets/css/components/language.css +38 -0
  12. package/assets/css/components/layout.css +151 -0
  13. package/assets/css/components/link.css +26 -0
  14. package/assets/css/components/result.css +123 -0
  15. package/assets/css/components/search.css +193 -0
  16. package/assets/css/components/tag.css +137 -0
  17. package/assets/css/style.css +17 -0
  18. package/assets/fonts/noto-serif-kr.css +28 -0
  19. package/assets/js/email.js +11 -0
  20. package/assets/js/gallery.js +30 -0
  21. package/assets/js/language.js +11 -0
  22. package/assets/js/main.js +17 -0
  23. package/assets/js/pwa.js +48 -0
  24. package/assets/js/search.js +276 -0
  25. package/assets/js/sorting.js +26 -0
  26. package/bin/taekwondo-db.js +145 -0
  27. package/content/_content.gotmpl +27 -0
  28. package/hugo.toml +32 -0
  29. package/i18n/de.json +107 -0
  30. package/i18n/en.json +107 -0
  31. package/i18n/ko.json +107 -0
  32. package/layouts/404.html +23 -0
  33. package/layouts/_partials/breadcrumb.html +11 -0
  34. package/layouts/_partials/categories.html +17 -0
  35. package/layouts/_partials/category-cards.html +36 -0
  36. package/layouts/_partials/category-group.html +7 -0
  37. package/layouts/_partials/category-section.html +15 -0
  38. package/layouts/_partials/category-tile.html +4 -0
  39. package/layouts/_partials/description.html +10 -0
  40. package/layouts/_partials/email.html +6 -0
  41. package/layouts/_partials/favicons.html +42 -0
  42. package/layouts/_partials/fonts.html +33 -0
  43. package/layouts/_partials/grade-badge.html +11 -0
  44. package/layouts/_partials/grade-name.html +14 -0
  45. package/layouts/_partials/head.html +17 -0
  46. package/layouts/_partials/header.html +38 -0
  47. package/layouts/_partials/historic.html +23 -0
  48. package/layouts/_partials/icon.html +13 -0
  49. package/layouts/_partials/language-label.html +3 -0
  50. package/layouts/_partials/language.html +13 -0
  51. package/layouts/_partials/page-title.html +13 -0
  52. package/layouts/_partials/scripts.html +25 -0
  53. package/layouts/_partials/search-form.html +11 -0
  54. package/layouts/_partials/search-index.html +40 -0
  55. package/layouts/_partials/source-entry.html +13 -0
  56. package/layouts/_partials/t.html +2 -0
  57. package/layouts/_partials/technique/photo.html +45 -0
  58. package/layouts/_partials/technique/word-meaning.html +33 -0
  59. package/layouts/_partials/technique-name.html +5 -0
  60. package/layouts/_partials/technique-row.html +17 -0
  61. package/layouts/_partials/term/list.html +24 -0
  62. package/layouts/_partials/term-name.html +4 -0
  63. package/layouts/_partials/url.html +11 -0
  64. package/layouts/_shortcodes/email.html +2 -0
  65. package/layouts/_shortcodes/operator.html +18 -0
  66. package/layouts/baseof.html +39 -0
  67. package/layouts/group/page.html +24 -0
  68. package/layouts/groups.html +48 -0
  69. package/layouts/home.html +19 -0
  70. package/layouts/page.html +17 -0
  71. package/layouts/source/page.html +67 -0
  72. package/layouts/technique/page.html +160 -0
  73. package/layouts/term/page.html +97 -0
  74. package/lib/database.js +33 -0
  75. package/lib/export.js +423 -0
  76. package/lib/service-worker.js +167 -0
  77. package/lib/validate.js +179 -0
  78. package/package.json +42 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 taekwondo-db contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,298 @@
1
- # Temporary Holding Version
1
+ # Taekwondo-DB Web App
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Renders [`@taekwondo-db/database`](https://gitlab.com/taekwondo-db/database) as
4
+ a static, searchable website that also works offline: a [Hugo](https://gohugo.io)
5
+ theme, a CLI that feeds it, and a container image that runs both. Live with the
6
+ complete Kukkiwon database: <https://taekwondo-db.gitlab.io/>.
7
+
8
+ A club or federation site consists only of data and configuration — no copy of
9
+ the templates. For a walkthrough with a complete example, see
10
+ [`taekwondo-db-example`](https://gitlab.com/taekwondo-db-example/taekwondo-db-example.gitlab.io).
11
+ This README is the reference.
12
+
13
+ ## Running a site
14
+
15
+ ### Container image
16
+
17
+ Needs nothing but Docker or Podman. On start the container validates the site
18
+ mounted at `/site`, builds it and serves it with [Caddy](https://caddyserver.com):
19
+
20
+ ```yaml
21
+ # compose.yaml
22
+ services:
23
+ techniques:
24
+ image: registry.gitlab.com/taekwondo-db/taekwondo-db.gitlab.io:main
25
+ ports: ["80:8080"]
26
+ volumes: ["./my-club:/site:ro"]
27
+ environment:
28
+ HUGO_BASEURL: https://techniques.example.org/
29
+ ```
30
+
31
+ | Variable | Meaning |
32
+ |---|---|
33
+ | `HUGO_BASEURL` | the site's address; overrides `baseURL` of `hugo.toml` |
34
+ | `DOMAIN` | serve this domain with a Let's Encrypt certificate: publish ports 80 and 443 on `8080` and `8443`, keep `/data` in a volume. Implies `HUGO_BASEURL` |
35
+ | `HUGO_*` | any other Hugo setting, e.g. `HUGO_TITLE` |
36
+
37
+ Changes take effect on the next start. Invalid data stops the container with
38
+ the reason in its log. The mount is only read. Without a `hugo.toml` the
39
+ container shows the complete Kukkiwon database.
40
+
41
+ Tags follow the branch `main` and Git tags (`v1.2.3`).
42
+ Built for amd64 and arm64.
43
+
44
+ ### Package
45
+
46
+ Needs Node ≥ 22.15, pnpm and Hugo ≥ 0.153 (`PATH` or `HUGO_BIN`):
47
+
48
+ Published on npm as
49
+ [`@taekwondo-db/web-app`](https://www.npmjs.com/package/@taekwondo-db/web-app):
50
+
51
+ ```bash
52
+ pnpm add @taekwondo-db/web-app # or: npm install @taekwondo-db/web-app
53
+ ```
54
+
55
+ | Command | |
56
+ |---|---|
57
+ | `taekwondo-db dev [-- <hugo flags>]` | dev server; changes under `db/` and `img/` are picked up |
58
+ | `taekwondo-db build [-- <hugo flags>]` | static site in `dist/`, with service worker |
59
+ | `taekwondo-db validate` | checks the data, see [Validation](#validation) |
60
+ | `taekwondo-db export` | only prepares the data for Hugo |
61
+
62
+ | Option | Default | |
63
+ |---|---|---|
64
+ | `--db` | `db/index.js` | module exporting the database options as `db` |
65
+ | `--img` | `img` | own image directory, repeatable |
66
+ | `--data` | `db` | where `validate` checks `$schema` pointers |
67
+
68
+ `dist/` can be served by any web server from the root of a (sub)domain — the
69
+ service worker requires that. Unknown paths should get `/404.html`.
70
+
71
+ ## Site reference
72
+
73
+ ```
74
+ hugo.toml title, address, languages, logo
75
+ db/ the data, see below
76
+ i18n/<lang>.json own or changed interface texts
77
+ content/ own pages, e.g. imprint and privacy policy
78
+ assets/ logo, favicon; own styles
79
+ img/<group>/ own technique images
80
+ layouts/ own templates
81
+ ```
82
+
83
+ ### Data
84
+
85
+ The files in `db/` become the options of `TaekwondoDatabase` — see the
86
+ [database README](https://gitlab.com/taekwondo-db/database#options) for what
87
+ they do. Every file is optional; without any, the site shows the complete
88
+ Kukkiwon database.
89
+
90
+ | File | Option |
91
+ |---|---|
92
+ | `whitelist.json` | `include` — which Kukkiwon techniques are loaded |
93
+ | `patches/techniques.json`, `patches/terms.json` | `patchTechniques`, `patchTerms` |
94
+ | `groups/<group>.json` | `techniqueGroups.<group>` — own techniques |
95
+ | `terms.json`, `sources.json` | `terms`, `sources` — own terms and sources |
96
+ | `grades.json` | `grades` |
97
+
98
+ Alternatively `db/index.js` exports the options as `db`; then only that module
99
+ counts. It is needed for anything beyond the files, such as
100
+ `includeBuiltins: false`.
101
+
102
+ Only the composed result reaches the site: techniques left out by the whitelist,
103
+ and their images, are not published.
104
+
105
+ ### Configuration
106
+
107
+ Plain Hugo configuration in `hugo.toml`; the theme's defaults are in its own
108
+ `hugo.toml`.
109
+
110
+ | Setting | Meaning |
111
+ |---|---|
112
+ | `title` | browser tab and header |
113
+ | `baseURL` | absolute address of the site; used by the sitemap and the language links |
114
+ | `defaultContentLanguage` | served at `/`, the others at `/<lang>/` |
115
+ | `[languages.<lang>]` | languages offered, ordered by `weight`; with one, the language chooser is hidden. The data covers `de` and `en`; `ko` shows the Hangeul |
116
+ | `params.logo`, `params.logoAlt` | a file in `assets/` shown before the title, and its alt text |
117
+ | `params.favicon` | a directory in `assets/` with `favicon.ico`, `favicon.svg`, `favicon-32x32.png`, `apple-touch-icon.png`, `android-chrome-512x512.png` … as icon generators name them; all optional |
118
+ | `params.categoryGroups` | colour groups of the technique groups |
119
+
120
+ ### Translations
121
+
122
+ `i18n/<lang>.json` of the site is merged key by key into the theme's: it adds
123
+ keys, such as the names of own groups, and overrides single texts.
124
+
125
+ The footer states that the site is not affiliated with or endorsed by
126
+ Kukkiwon — the key `disclaimer`.
127
+
128
+ ### Own pages
129
+
130
+ Markdown files in `content/` become pages of their own, one file per language
131
+ (`privacy.de.md`, `privacy.en.md`). The menu `footer` links them from the
132
+ footer of that language; pages of the default language are also linked from
133
+ every language that has no version of its own:
134
+
135
+ ```markdown
136
+ ---
137
+ title: Datenschutz
138
+ menus: footer
139
+ ---
140
+
141
+ …
142
+ ```
143
+
144
+ Imprint and privacy policy are the operator's: the theme, the package and the
145
+ container image ship none. Those in `site/content/` belong to
146
+ <https://taekwondo-db.gitlab.io/> only — a site of its own needs its own.
147
+
148
+ The operator's details come from the environment, so that they need not be in
149
+ the repository: the shortcode `{{< operator "<key>" >}}` reads the parameter
150
+ `operator.<key>`, which `HUGO_PARAMS_OPERATOR_<KEY>` sets, and renders an email
151
+ address like the shortcode `email`. Those in `site/content/` use:
152
+
153
+ ```sh
154
+ HUGO_PARAMS_OPERATOR_NAME="Jane Doe"
155
+ HUGO_PARAMS_OPERATOR_STREET="Example Street 1"
156
+ HUGO_PARAMS_OPERATOR_CITY="12345 Example Town"
157
+ HUGO_PARAMS_OPERATOR_EMAIL="jane@example.org"
158
+ ```
159
+
160
+ A missing one reads `TODO-operator.<key>` and the build warns; the pipeline
161
+ deploys no page that holds such a placeholder.
162
+
163
+ ### Own technique groups
164
+
165
+ A new group needs a term of the same name (its Hangeul and description head the
166
+ group page) and a display name in `i18n/`. Groups outside
167
+ `params.categoryGroups` get a neutral colour.
168
+
169
+ ### Images
170
+
171
+ `images[].src` is looked up first in the database's `img/`, then in the site's
172
+ `img/`; a site's image at the same path replaces the original. Missing images
173
+ are left out. JPEG, PNG and WebP are scaled to WebP; images with `ai: true`
174
+ carry an "AI" badge.
175
+
176
+ ### Grades
177
+
178
+ With `grades`, technique pages, lists and search results show a badge such as
179
+ "from 9th Kup" in the belt colour (`assets/css/components/grade.css`; texts:
180
+ i18n keys `grade kup`, `grade poom`, `grade dan`, `from grade`).
181
+
182
+ ### Templates and styles
183
+
184
+ A file at the same path as in this theme replaces it, e.g.
185
+ `layouts/_partials/header.html` or `assets/css/components/header.css`. Copy the
186
+ original and change only what you need — you take over its maintenance. The
187
+ templates only look up `data/taekwondo.json`; everything computed comes from
188
+ the export (`lib/export.js`).
189
+
190
+ ### Validation
191
+
192
+ `taekwondo-db validate` reads the languages from `hugo.toml` and fails on
193
+
194
+ - `$schema` pointers in `db/` that do not resolve,
195
+ - own files, whitelist and patches that do not match the database's schemas,
196
+ checked before and after composing — this catches misspelled fields in
197
+ patches,
198
+ - `$ref`s that do not resolve,
199
+ - groups without a term, techniques without a translation in a configured
200
+ language (except `ko`).
201
+
202
+ It only warns about missing image files — the public database ships without
203
+ images — and about description references to what is not loaded.
204
+
205
+ ### URLs
206
+
207
+ `/<lang>/technique/<slug>/`, `/term/…`, `/source/…`, `/group/…`, `/groups/`; the
208
+ default language without the prefix. The slug is the key in lower case, with runs of
209
+ other characters replaced by `-` (`Momtong An Makgi` → `momtong-an-makgi`).
210
+
211
+ ### Search and offline
212
+
213
+ The search runs in the browser on a per-language index; without JavaScript
214
+ every page still works. The service worker precaches the whole site on the
215
+ first visit and serves pages from the cache; a new deploy is offered as an
216
+ update.
217
+
218
+ ## Development
219
+
220
+ Node, pnpm, Hugo, Playwright, Biome and TypeScript 7 (`tsc`) come from the Nix
221
+ flake; CI uses the same dev shell:
222
+
223
+ ```bash
224
+ nix develop
225
+ pnpm install
226
+ pnpm dev # reference site site/ — the complete database, ko/de/en
227
+ pnpm build # site/dist/
228
+ pnpm test # build, then the Playwright tests
229
+ pnpm lint # biome
230
+ pnpm typecheck # tsc on the JavaScript: lib/ and bin/ (Node), assets/js/ (browser)
231
+ ```
232
+
233
+ The CLI composes the database in Node and hands it to Hugo as a generated theme
234
+ component, next to a link to this theme:
235
+
236
+ ```
237
+ .taekwondo-db/themes/web-app → this package
238
+ .taekwondo-db/themes/taekwondo-data/data/… the composed database
239
+ .taekwondo-db/themes/taekwondo-data/assets/… images, fonts, Bootstrap, the database's search
240
+ ```
241
+
242
+ A content adapter (`content/_content.gotmpl`) turns the data into pages.
243
+
244
+ **Tests** (`tests/`) run against the production build: every page and link,
245
+ search, language switch, pages without JavaScript, the 404 page, and the site
246
+ offline with the server actually stopped. Expectations are derived from the
247
+ data, not hard-coded. They are CommonJS because the Nix-provided Playwright is
248
+ found through `NODE_PATH`, which `import` ignores.
249
+
250
+ **Container image**: `nix build .#image && podman load < result`. It uses the
251
+ same Node, Hugo and Caddy as the dev shell; `container/` holds the start script
252
+ and the Caddyfile.
253
+
254
+ **CI** (`.gitlab-ci.yml`) runs lint, typecheck and the tests, publishes
255
+ `site/dist` as GitLab Pages from `main`, and pushes the image, built natively on
256
+ amd64 and arm64 runners — from `main` and tags. Version tags also release the
257
+ package, see below.
258
+
259
+ **Database updates**: the database comes from npm. Release it first, then
260
+
261
+ ```bash
262
+ pnpm update @taekwondo-db/database
263
+ ```
264
+
265
+ and update the hash `pnpmDeps` in `flake.nix`: set it to `""`, run
266
+ `nix build .#web-app` and take the hash from the error. To work on both at
267
+ once, add to `pnpm-workspace.yaml` — but do not commit it:
268
+
269
+ ```yaml
270
+ overrides:
271
+ "@taekwondo-db/database": link:../taekwondo-database
272
+ ```
273
+
274
+ ### Releasing
275
+
276
+ 1. Set `version` in `package.json` and merge.
277
+ 2. Push a tag `v<version>`, e.g. `v0.1.1`. After the tests pass, the `publish`
278
+ job stages the package on npmjs.com (`npm stage publish`), authenticated via
279
+ npm trusted publishing (GitLab OIDC); the container image gets the tag too.
280
+ 3. Then GitLab's
281
+ [`create-release`](https://gitlab.com/components/toolkit) component creates
282
+ a GitLab release for the tag. Its notes come from GitLab's
283
+ [changelog](https://docs.gitlab.com/user/project/changelogs/): every commit
284
+ since the previous version tag whose message carries a `Changelog` trailer,
285
+ grouped by its value (`added`, `fixed`, `changed`, `deprecated`, `removed`,
286
+ `security`, `performance`, `other`):
287
+
288
+ ```
289
+ feat: search in historic names
290
+
291
+ Changelog: added
292
+ ```
293
+
294
+ Commits without the trailer are left out. When a merge request is squashed,
295
+ put the trailer into the first commit (or the squash commit message).
296
+ 4. Approve the staged version with 2FA, on npmjs.com or with
297
+ `npm stage list @taekwondo-db/web-app` and `npm stage approve <stage-id>`.
298
+ Only then is it public.
@@ -0,0 +1,54 @@
1
+ /* Basics on top of Bootstrap's reboot. */
2
+
3
+ body {
4
+ background: var(--color-bg);
5
+ }
6
+
7
+ h1,
8
+ h2,
9
+ h3 {
10
+ font-weight: 700;
11
+ letter-spacing: -0.01em;
12
+ }
13
+
14
+ /*
15
+ * Blue is reserved for interactive elements. Hangeul and romanisation are
16
+ * never blue, unless they are a link themselves.
17
+ */
18
+ .hangeul {
19
+ font-family: var(--font-hangeul);
20
+ font-weight: 500;
21
+ color: var(--color-text-secondary);
22
+ }
23
+
24
+ .romanization {
25
+ font-size: var(--text-sm);
26
+ color: var(--color-text-muted);
27
+ }
28
+
29
+ /* Card heading: 15px/600 in the secondary colour. */
30
+ .section-title {
31
+ margin: 0;
32
+ font-size: var(--text-section);
33
+ font-weight: 600;
34
+ color: var(--color-text-secondary);
35
+ letter-spacing: 0;
36
+ }
37
+
38
+ .icon {
39
+ flex: none;
40
+ color: var(--color-icon-muted);
41
+ }
42
+
43
+ mark {
44
+ padding: 0 1px;
45
+ border-radius: 3px;
46
+ background: var(--color-highlight);
47
+ color: inherit;
48
+ }
49
+
50
+ /* Focus is a ring in the accent colour throughout. */
51
+ :focus-visible {
52
+ outline: 2px solid var(--color-accent);
53
+ outline-offset: 2px;
54
+ }
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Design tokens of the redesign, and the Bootstrap variables they re-theme.
3
+ *
4
+ * Bootstrap stays the framework: nothing here replaces it, everything maps a
5
+ * token onto the `--bs-*` custom property Bootstrap already reads. Component
6
+ * level overrides (`--bs-card-*`, `--bs-btn-*`, …) live next to the component
7
+ * they belong to, in `components/`.
8
+ */
9
+
10
+ :root {
11
+ /* Typefaces */
12
+ --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
13
+ --font-hangeul: "Noto Serif KR", serif;
14
+
15
+ /* Colours */
16
+ --color-bg: #f5f5f2;
17
+ --color-surface: #ffffff;
18
+ --color-surface-muted: #f5f5f2;
19
+ --color-photo-bg: #dedde2;
20
+ --color-border: #e3e4e8;
21
+ --color-border-strong: #c9ccd3;
22
+ --color-divider: #eceDF0;
23
+
24
+ --color-text: #16181d;
25
+ --color-text-secondary: #3d424d;
26
+ --color-text-muted: #5a5f6b;
27
+ --color-icon-muted: #8a8f99;
28
+
29
+ --color-accent: #1b4b91;
30
+ --color-accent-rgb: 27, 75, 145;
31
+ --color-accent-hover: #0f2f5e;
32
+ --color-accent-soft: #eaf0f8;
33
+ --color-accent-border: #b9cbe6;
34
+ --color-accent-light: #a9bcd9;
35
+ --color-focus-ring: #dce6f4;
36
+ --color-brand-red: #b3262d;
37
+ --color-highlight: #ffe8a3;
38
+
39
+ /* Technique groups — the colour hangs on the group, not on the category. */
40
+ --group-attack-mark: #d9824a;
41
+ --group-attack-bg: #fbe9dc;
42
+ --group-attack-fg: #8a3b0a;
43
+ --group-defence-mark: #4f7fc2;
44
+ --group-defence-bg: #eaf0f8;
45
+ --group-defence-fg: #1b4b91;
46
+ --group-grappling-mark: #8a5ba8;
47
+ --group-grappling-bg: #f1e8f6;
48
+ --group-grappling-fg: #5e2c7a;
49
+ --group-movement-mark: #3e8a6e;
50
+ --group-movement-bg: #e3f1ec;
51
+ --group-movement-fg: #1f5e49;
52
+ --tag-neutral-bg: #eeeeea;
53
+ --tag-neutral-fg: #3d424d;
54
+
55
+ /* Belt colours of the grades — see components/grade.css. */
56
+ --belt-white: #ffffff;
57
+ --belt-yellow: #f2c200;
58
+ --belt-green: #2e8b3d;
59
+ --belt-blue: #1f5bb5;
60
+ --belt-red: #c8202b;
61
+ --belt-black: #16181d;
62
+
63
+ /* Radii */
64
+ --radius-sm: 8px;
65
+ --radius-md: 10px;
66
+ --radius-lg: 14px;
67
+ --radius-xl: 16px;
68
+ --radius-pill: 999px;
69
+
70
+ /* Spacing */
71
+ --space-1: 4px;
72
+ --space-2: 8px;
73
+ --space-3: 12px;
74
+ --space-4: 16px;
75
+ --space-5: 20px;
76
+ --space-6: 24px;
77
+ --space-7: 28px;
78
+ --space-8: 32px;
79
+ --space-10: 40px;
80
+ --space-12: 48px;
81
+
82
+ /* Layout */
83
+ --container-max: 1200px;
84
+ --container-narrow: 880px;
85
+ --touch-target: 44px;
86
+
87
+ /* Type scale */
88
+ --text-xs: 13px;
89
+ --text-sm: 14px;
90
+ --text-section: 15px;
91
+ --text-base: 16px;
92
+ --text-lg: 18px;
93
+ --text-lead: 22px;
94
+ --text-h1: 56px;
95
+ --text-hangeul-title: 36px;
96
+
97
+ /* --- Bootstrap ------------------------------------------------------ */
98
+
99
+ --bs-font-sans-serif: var(--font-sans);
100
+ --bs-body-font-size: var(--text-base);
101
+ --bs-body-bg: var(--color-bg);
102
+ --bs-body-color: var(--color-text);
103
+ --bs-emphasis-color: var(--color-text);
104
+ --bs-heading-color: var(--color-text);
105
+ --bs-secondary-color: var(--color-text-secondary);
106
+ --bs-tertiary-color: var(--color-text-muted);
107
+
108
+ --bs-secondary-bg: var(--color-surface-muted);
109
+ --bs-tertiary-bg: var(--color-surface-muted);
110
+ --bs-border-color: var(--color-border);
111
+ --bs-highlight-bg: var(--color-highlight);
112
+
113
+ --bs-primary: var(--color-accent);
114
+ --bs-primary-rgb: var(--color-accent-rgb);
115
+ --bs-link-color: var(--color-accent);
116
+ --bs-link-color-rgb: var(--color-accent-rgb);
117
+ --bs-link-hover-color: var(--color-accent-hover);
118
+ --bs-link-hover-color-rgb: 15, 47, 94;
119
+
120
+ --bs-border-radius-sm: var(--radius-sm);
121
+ --bs-border-radius: var(--radius-md);
122
+ --bs-border-radius-lg: var(--radius-lg);
123
+ --bs-border-radius-xl: var(--radius-xl);
124
+ --bs-border-radius-pill: var(--radius-pill);
125
+ }
@@ -0,0 +1,14 @@
1
+ /* Path on detail pages: Techniques › Category › Technique. */
2
+
3
+ .breadcrumb {
4
+ --bs-breadcrumb-divider: "›";
5
+ --bs-breadcrumb-margin-bottom: var(--space-5);
6
+ --bs-breadcrumb-item-padding-x: 6px;
7
+ --bs-breadcrumb-divider-color: var(--color-text-muted);
8
+ --bs-breadcrumb-item-active-color: var(--color-text);
9
+ font-size: var(--text-sm);
10
+ }
11
+
12
+ .breadcrumb a {
13
+ color: var(--color-text-muted);
14
+ }
@@ -0,0 +1,35 @@
1
+ /* Cards: white, 1px border, radius 14, padding 20/24 — no shadow. */
2
+
3
+ .card {
4
+ --bs-card-bg: var(--color-surface);
5
+ --bs-card-border-color: var(--color-border);
6
+ --bs-card-border-radius: var(--radius-lg);
7
+ --bs-card-inner-border-radius: var(--radius-lg);
8
+ --bs-card-spacer-y: var(--space-5);
9
+ --bs-card-spacer-x: var(--space-6);
10
+ --bs-card-cap-bg: var(--color-surface);
11
+ --bs-card-cap-padding-y: var(--space-4);
12
+ --bs-card-cap-padding-x: var(--space-6);
13
+ }
14
+
15
+ .card-footer,
16
+ .card-header {
17
+ border-color: var(--color-divider);
18
+ }
19
+
20
+ /* Info cards of a detail page sit side by side while there is room. */
21
+ /*
22
+ * `auto-fill`, not `auto-fit`: a single card should keep the width of one
23
+ * track instead of stretching across the whole row, which would pull a
24
+ * key-value list apart over a thousand pixels.
25
+ */
26
+ .info-grid {
27
+ display: grid;
28
+ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
29
+ align-items: start;
30
+ gap: var(--space-5);
31
+ }
32
+
33
+ .info-grid .card--full {
34
+ grid-column: 1 / -1;
35
+ }