@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
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Command line of @taekwondo-db/web-app, run from the site directory.
4
+ *
5
+ * taekwondo-db build [--db <file>] [--img <dir>]… [-- <hugo flags>]
6
+ * taekwondo-db dev [--db <file>] [--img <dir>]… [-- <hugo flags>]
7
+ * taekwondo-db export [--db <file>] [--img <dir>]…
8
+ * taekwondo-db validate [--db <file>] [--img <dir>]… [--data <dir>]
9
+ */
10
+ import { spawn, spawnSync } from "node:child_process";
11
+ import fs from "node:fs";
12
+ import path from "node:path";
13
+ import { parseArgs } from "node:util";
14
+ import {
15
+ DATA_THEME,
16
+ exportSite,
17
+ imageDirsOf,
18
+ loadDbOptions,
19
+ THEME,
20
+ } from "../lib/export.js";
21
+ import { writeServiceWorker } from "../lib/service-worker.js";
22
+ import { validateSite } from "../lib/validate.js";
23
+
24
+ const HUGO = process.env.HUGO_BIN ?? "hugo";
25
+
26
+ // Not taken from a theme's config, so set here; a site can still override it.
27
+ process.env.HUGO_DISABLEKINDS ??= "taxonomy term rss";
28
+ const USAGE =
29
+ "Usage: taekwondo-db build|dev|export|validate [--db <file>] [--img <dir>]… [-- <hugo flags>]";
30
+
31
+ const { positionals, values } = parseArgs({
32
+ allowPositionals: true,
33
+ options: {
34
+ data: { default: "db", type: "string" },
35
+ db: { default: "db/index.js", type: "string" },
36
+ img: { default: ["img"], multiple: true, type: "string" },
37
+ },
38
+ });
39
+
40
+ const [command, ...hugoArgs] = positionals;
41
+ const root = process.cwd();
42
+ const db = await loadDbOptions(root, values.db);
43
+ const imageDirs = imageDirsOf(db, root, values.img);
44
+ const run = () => exportSite({ db, imageDirs, root });
45
+
46
+ function themeArgs(themesDir) {
47
+ return ["--themesDir", themesDir, "--theme", `${DATA_THEME},${THEME}`];
48
+ }
49
+
50
+ function hugoConfig(themesDir) {
51
+ const result = spawnSync(
52
+ HUGO,
53
+ ["config", "--format", "json", ...(themesDir ? themeArgs(themesDir) : [])],
54
+ { encoding: "utf8" },
55
+ );
56
+ if (result.error) throw result.error;
57
+ if (result.status !== 0) throw new Error(result.stderr);
58
+ return JSON.parse(result.stdout);
59
+ }
60
+
61
+ switch (command) {
62
+ case "export": {
63
+ run();
64
+ break;
65
+ }
66
+
67
+ case "build": {
68
+ const { themesDir } = run();
69
+ const outDir = path.resolve(root, "dist");
70
+ const result = spawnSync(
71
+ HUGO,
72
+ [
73
+ "build",
74
+ ...themeArgs(themesDir),
75
+ "--destination",
76
+ outDir,
77
+ "--cleanDestinationDir",
78
+ "--minify",
79
+ ...hugoArgs,
80
+ ],
81
+ { stdio: "inherit" },
82
+ );
83
+ if (result.status !== 0) {
84
+ process.exitCode = result.status ?? 1;
85
+ break;
86
+ }
87
+ const base = new URL(hugoConfig(themesDir).baseurl || "/", "http://x")
88
+ .pathname;
89
+ const count = writeServiceWorker(
90
+ outDir,
91
+ base.endsWith("/") ? base : `${base}/`,
92
+ );
93
+ console.log(`sw.js: ${count} files precached`);
94
+ break;
95
+ }
96
+
97
+ case "dev": {
98
+ const { themesDir } = run();
99
+ let timer;
100
+ for (const dir of [
101
+ path.dirname(path.resolve(root, values.db)),
102
+ ...imageDirs,
103
+ ]) {
104
+ if (!fs.existsSync(dir) || dir.includes("node_modules")) continue;
105
+ fs.watch(dir, { recursive: true }, () => {
106
+ clearTimeout(timer);
107
+ // A fresh process: Node caches the imported JSON files.
108
+ timer = setTimeout(() => {
109
+ spawnSync(
110
+ process.execPath,
111
+ [
112
+ process.argv[1],
113
+ "export",
114
+ "--db",
115
+ values.db,
116
+ ...values.img.flatMap((dir) => ["--img", dir]),
117
+ ],
118
+ { stdio: "inherit" },
119
+ );
120
+ }, 200);
121
+ });
122
+ }
123
+ spawn(HUGO, ["server", ...themeArgs(themesDir), ...hugoArgs], {
124
+ stdio: "inherit",
125
+ }).on("exit", (code) => process.exit(code ?? 0));
126
+ break;
127
+ }
128
+
129
+ case "validate": {
130
+ const languages = Object.keys(hugoConfig().languages ?? {});
131
+ const valid = await validateSite({
132
+ dataDir: values.data,
133
+ db,
134
+ imageDirs,
135
+ languages,
136
+ root,
137
+ });
138
+ process.exitCode = valid ? 0 : 1;
139
+ break;
140
+ }
141
+
142
+ default:
143
+ console.error(USAGE);
144
+ process.exitCode = 1;
145
+ }
@@ -0,0 +1,27 @@
1
+ {{- /* Every page of the site is generated from the database exported by `taekwondo-db export`. */ -}}
2
+ {{- $db := hugo.Data.taekwondo -}}
3
+ {{- if not $db -}}
4
+ {{- errorf "taekwondo-db: no exported database — run `taekwondo-db build` or `taekwondo-db dev`" -}}
5
+ {{- end -}}
6
+ {{- $sites := dict "matrix" (dict "languages" (slice "**")) -}}
7
+ {{- $hidden := dict "render" "never" "list" "never" -}}
8
+ {{- /* Hugo's default for pages from files; a zero value would read as "least important". */ -}}
9
+ {{- $sitemap := dict "priority" -1 -}}
10
+
11
+ {{- range slice "technique" "term" "source" "group" -}}
12
+ {{- $.AddPage (dict "kind" "section" "path" . "build" $hidden "sites" $sites) -}}
13
+ {{- end -}}
14
+
15
+ {{- range $key, $entry := $db.techniques -}}
16
+ {{- $.AddPage (dict "kind" "page" "path" (printf "technique/%s" $entry.slug) "title" $key "params" (dict "key" $key) "sitemap" $sitemap "sites" $sites) -}}
17
+ {{- end -}}
18
+ {{- range $key, $entry := $db.terms -}}
19
+ {{- $.AddPage (dict "kind" "page" "path" (printf "term/%s" $entry.slug) "title" $key "params" (dict "key" $key) "sitemap" $sitemap "sites" $sites) -}}
20
+ {{- end -}}
21
+ {{- range $key, $entry := $db.sources -}}
22
+ {{- $.AddPage (dict "kind" "page" "path" (printf "source/%s" $entry.slug) "title" $entry.title "params" (dict "key" $key) "sitemap" $sitemap "sites" $sites) -}}
23
+ {{- end -}}
24
+ {{- range $db.groups -}}
25
+ {{- $.AddPage (dict "kind" "page" "path" (printf "group/%s" .slug) "title" .key "params" (dict "key" .key) "sitemap" $sitemap "sites" $sites) -}}
26
+ {{- end -}}
27
+ {{- $.AddPage (dict "kind" "page" "path" "groups" "layout" "groups" "title" "groups" "sitemap" $sitemap "sites" $sites) -}}
package/hugo.toml ADDED
@@ -0,0 +1,32 @@
1
+ # Theme defaults. A site overrides any of them in its own hugo.toml.
2
+
3
+ disableKinds = ["taxonomy", "term", "rss"]
4
+
5
+ [module.hugoVersion]
6
+ extended = false
7
+ min = "0.153.0"
8
+
9
+ [params]
10
+ # Path inside the site's assets/, e.g. "logo.svg". Empty: no logo.
11
+ logo = ""
12
+ # Alt text of the logo. Empty: the site title.
13
+ logoAlt = ""
14
+ # Directory inside the site's assets/ with favicon.ico, apple-touch-icon.png,
15
+ # android-chrome-512x512.png … Empty: no icons.
16
+ favicon = ""
17
+
18
+ # Presentation-only grouping of the technique categories: the colour hangs on
19
+ # the group, not on the single category. Categories in no group get the
20
+ # neutral colour and are listed last. Within a group: by frequency in training.
21
+ [[params.categoryGroups]]
22
+ id = "attack"
23
+ categories = ["chagi", "chigi", "jireugi", "jjireugi"]
24
+ [[params.categoryGroups]]
25
+ id = "defence"
26
+ categories = ["makgi", "pihagi", "ppaegi"]
27
+ [[params.categoryGroups]]
28
+ id = "grappling"
29
+ categories = ["japgi", "kkeokgi", "milgi", "neomgigi"]
30
+ [[params.categoryGroups]]
31
+ id = "movement"
32
+ categories = ["seogi", "ditgi", "ttwigi"]
package/i18n/de.json ADDED
@@ -0,0 +1,107 @@
1
+ {
2
+ "about the source": "Zur Quelle",
3
+ "adjective": "Adjektiv",
4
+ "adverb": "Adverb",
5
+ "ai badge": "KI",
6
+ "ai generated": "Mit KI generiertes Bild",
7
+ "all": "Alle",
8
+ "all categories": "Alle Kategorien",
9
+ "alphabetical": "A–Z",
10
+ "areas": "Bereiche",
11
+ "author": "Autor",
12
+ "back": "hinten",
13
+ "book": "Buch",
14
+ "build date": "Stand",
15
+ "by groups": "Nach Gruppen",
16
+ "categories": "Kategorien",
17
+ "category": "Kategorie",
18
+ "category groups": "Gruppen",
19
+ "chagi": "Tritt",
20
+ "chigi": "Schlag",
21
+ "clear input": "Eingabe löschen",
22
+ "close": "schließen",
23
+ "combinedWithTerms": "Zusammensetzung",
24
+ "disclaimer": "Nicht mit dem Kukkiwon verbunden und nicht von ihm unterstützt.",
25
+ "ditgi": "Schrittarbeit",
26
+ "filter results": "Ergebnisse filtern",
27
+ "from grade": "ab {{ .Grade }}",
28
+ "front": "vorne",
29
+ "generic": "Oberbegriff",
30
+ "google translate": "Google Übersetzer",
31
+ "grade dan": "{{ .Level }}. Dan",
32
+ "grade kup": "{{ .Level }}. Kup",
33
+ "grade poom": "{{ .Level }}. Poom",
34
+ "group attack": "Angriff",
35
+ "group attack description": "Treffen mit Fuß, Hand oder Fingerspitzen",
36
+ "group defence": "Abwehr",
37
+ "group defence description": "Angriffe stoppen, ihnen entgehen oder sich lösen",
38
+ "group grappling": "Greifen & Werfen",
39
+ "group grappling description": "Nahdistanz: kontrollieren und aus dem Gleichgewicht bringen",
40
+ "group movement": "Stand & Bewegung",
41
+ "group movement description": "Haltung, Schritte und Sprünge",
42
+ "groups": "Technikkategorien",
43
+ "hangeul details": "Hangeul-Details",
44
+ "historic data": "Historische Daten",
45
+ "historical names": "Historische Namen",
46
+ "home subtitle": "Techniken und Begriffe – auf Deutsch oder in koreanischer Umschrift.",
47
+ "image": "Bild",
48
+ "images": "Bilder",
49
+ "imprint": "Impressum",
50
+ "in": "in",
51
+ "japgi": "Greifen",
52
+ "jireugi": "Stoß",
53
+ "jjireugi": "Stich",
54
+ "kkeokgi": "Hebeln",
55
+ "language": "Sprache",
56
+ "legal": "Rechtliches",
57
+ "lemma": "Grundform",
58
+ "look up": "Nachschlagen",
59
+ "makgi": "Block",
60
+ "mccune reischauer": "McCune-Reischauer",
61
+ "milgi": "Schubsen",
62
+ "missing source": "Die Quelle ist unbekannt.",
63
+ "modifier": "Bestimmungsform",
64
+ "naver dictionary": "Naver-Wörterbuch",
65
+ "neomgigi": "Werfen",
66
+ "next": "Nächste Technik",
67
+ "no results": "Es wurden keine Ergebniss gefunden.",
68
+ "noun": "Nomen",
69
+ "occurs in": "Kommt vor in",
70
+ "open in google translate": "In Google Übersetzer öffnen",
71
+ "open source": "Quelle öffnen",
72
+ "other categories": "Weitere Kategorien",
73
+ "page": "Seite",
74
+ "page not found": "Seite nicht gefunden",
75
+ "page not found text": "Unter dieser Adresse gibt es nichts – vielleicht wurde die Seite umbenannt. Die Suche oder die Kategorien helfen weiter.",
76
+ "path": "Pfad",
77
+ "pihagi": "Ausweichen",
78
+ "ppaegi": "Wegziehen",
79
+ "previous": "Vorherige Technik",
80
+ "privacy policy": "Datenschutzerklärung",
81
+ "references": "Referenzen",
82
+ "revised romanization": "Revidierte Romanisierung",
83
+ "search": "Suche",
84
+ "search categories": "Zeige Kategorien",
85
+ "search placeholder": "Suche nach Techniken oder Begriffen...",
86
+ "search placeholder short": "Begriff oder Übersetzung",
87
+ "seogi": "Stand",
88
+ "sorting": "Sortierung",
89
+ "source": "Quelle",
90
+ "sources": "Quellen",
91
+ "specialization": "Spezialisierung",
92
+ "supplementaryName": "Alternativer Name",
93
+ "technique": "Technik",
94
+ "techniques": "Techniken",
95
+ "term": "Begriff",
96
+ "termCombinations": "Verwendung in zusammengesetzten Begriffen",
97
+ "termForms": "Wortformen",
98
+ "terms": "Begriffe",
99
+ "ttwigi": "Springen",
100
+ "unknown": "Unbekannt",
101
+ "update available": "Eine neue Version ist verfügbar. Jetzt aktualisieren?",
102
+ "verb": "Verb",
103
+ "videos": "Videos",
104
+ "weight": "Gewicht",
105
+ "word meaning": "Wortbedeutung",
106
+ "year": "Jahr"
107
+ }
package/i18n/en.json ADDED
@@ -0,0 +1,107 @@
1
+ {
2
+ "about the source": "About the source",
3
+ "adjective": "Adjective",
4
+ "adverb": "Adverb",
5
+ "ai badge": "AI",
6
+ "ai generated": "Image generated with AI",
7
+ "all": "All",
8
+ "all categories": "All categories",
9
+ "alphabetical": "A–Z",
10
+ "areas": "Areas",
11
+ "author": "Author",
12
+ "back": "back",
13
+ "book": "Book",
14
+ "build date": "Built",
15
+ "by groups": "By group",
16
+ "categories": "categories",
17
+ "category": "Category",
18
+ "category groups": "groups",
19
+ "chagi": "Kick",
20
+ "chigi": "Strike",
21
+ "clear input": "Clear input",
22
+ "close": "close",
23
+ "combinedWithTerms": "Combination of",
24
+ "disclaimer": "Not affiliated with or endorsed by Kukkiwon.",
25
+ "ditgi": "Stepping",
26
+ "filter results": "Filter results",
27
+ "from grade": "from {{ .Grade }}",
28
+ "front": "front",
29
+ "generic": "Generic term",
30
+ "google translate": "Google Translate",
31
+ "grade dan": "{{ .Ordinal }} Dan",
32
+ "grade kup": "{{ .Ordinal }} Kup",
33
+ "grade poom": "{{ .Ordinal }} Poom",
34
+ "group attack": "Attack",
35
+ "group attack description": "Striking with foot, hand or fingertips",
36
+ "group defence": "Defence",
37
+ "group defence description": "Stopping attacks, evading them or breaking free",
38
+ "group grappling": "Grappling & throwing",
39
+ "group grappling description": "Close range: controlling and unbalancing",
40
+ "group movement": "Stance & movement",
41
+ "group movement description": "Posture, steps and jumps",
42
+ "groups": "Technique Groups",
43
+ "hangeul details": "Hangeul details",
44
+ "historic data": "Historical data",
45
+ "historical names": "Historical names",
46
+ "home subtitle": "Techniques and terms — in English or in Korean romanisation.",
47
+ "image": "Image",
48
+ "images": "Images",
49
+ "imprint": "Legal Notice",
50
+ "in": "in",
51
+ "japgi": "Grasping",
52
+ "jireugi": "Punch",
53
+ "jjireugi": "Thrust",
54
+ "kkeokgi": "Joint-lock",
55
+ "language": "Language",
56
+ "legal": "Legal",
57
+ "lemma": "Base form",
58
+ "look up": "Look up",
59
+ "makgi": "Block",
60
+ "mccune reischauer": "McCune-Reischauer",
61
+ "milgi": "Pushing",
62
+ "missing source": "Source is currently missing",
63
+ "modifier": "Modifier",
64
+ "naver dictionary": "Naver dictionary",
65
+ "neomgigi": "Take down",
66
+ "next": "Next technique",
67
+ "no results": "No results have been found.",
68
+ "noun": "Noun",
69
+ "occurs in": "Occurs in",
70
+ "open in google translate": "Open in Google Translate",
71
+ "open source": "Open source",
72
+ "other categories": "Other categories",
73
+ "page": "Page",
74
+ "page not found": "Page not found",
75
+ "page not found text": "Nothing lives at this address – the page may have been renamed. The search or the categories will help you on.",
76
+ "path": "Path",
77
+ "pihagi": "Dodging",
78
+ "ppaegi": "Pull away",
79
+ "previous": "Previous technique",
80
+ "privacy policy": "Privacy Policy",
81
+ "references": "References",
82
+ "revised romanization": "Revised Romanization",
83
+ "search": "Search",
84
+ "search categories": "Show technique groups",
85
+ "search placeholder": "Search for techniques or terms...",
86
+ "search placeholder short": "Term or translation",
87
+ "seogi": "Stance",
88
+ "sorting": "Sorting",
89
+ "source": "Source",
90
+ "sources": "Sources",
91
+ "specialization": "Specialization",
92
+ "supplementaryName": "Supplementary name",
93
+ "technique": "Technique",
94
+ "techniques": "Techniques",
95
+ "term": "Term",
96
+ "termCombinations": "Used in combinations",
97
+ "termForms": "Word forms",
98
+ "terms": "Terms",
99
+ "ttwigi": "Jumping",
100
+ "unknown": "Unknown",
101
+ "update available": "A new version is available. Update now?",
102
+ "verb": "Verb",
103
+ "videos": "Videos",
104
+ "weight": "Weight",
105
+ "word meaning": "Word meaning",
106
+ "year": "Year"
107
+ }
package/i18n/ko.json ADDED
@@ -0,0 +1,107 @@
1
+ {
2
+ "about the source": "출처 정보",
3
+ "adjective": "형용사",
4
+ "adverb": "부사",
5
+ "ai badge": "AI",
6
+ "ai generated": "AI로 생성된 이미지",
7
+ "all": "전체",
8
+ "all categories": "모든 분류",
9
+ "alphabetical": "A–Z",
10
+ "areas": "영역",
11
+ "author": "저자",
12
+ "back": "뒤",
13
+ "book": "도서",
14
+ "build date": "빌드",
15
+ "by groups": "묶음별",
16
+ "categories": "분류",
17
+ "category": "분류",
18
+ "category groups": "묶음",
19
+ "chagi": "차기",
20
+ "chigi": "치기",
21
+ "clear input": "입력 지우기",
22
+ "close": "닫기",
23
+ "combinedWithTerms": "조합",
24
+ "disclaimer": "국기원과 관련이 없으며 국기원의 승인을 받지 않았습니다.",
25
+ "ditgi": "딛기",
26
+ "filter results": "결과 거르기",
27
+ "from grade": "{{ .Grade }}부터",
28
+ "front": "앞",
29
+ "generic": "상위 개념",
30
+ "google translate": "구글 번역",
31
+ "grade dan": "{{ .Level }}단",
32
+ "grade kup": "{{ .Level }}급",
33
+ "grade poom": "{{ .Level }}품",
34
+ "group attack": "공격",
35
+ "group attack description": "발, 손, 손끝으로 치기",
36
+ "group defence": "막기",
37
+ "group defence description": "공격을 막거나 피하거나 빠져나오기",
38
+ "group grappling": "잡기와 넘기기",
39
+ "group grappling description": "가까운 거리에서 잡고 무너뜨리기",
40
+ "group movement": "서기와 움직임",
41
+ "group movement description": "자세, 걸음, 뛰기",
42
+ "groups": "기술 분류",
43
+ "hangeul details": "한글 정보",
44
+ "historic data": "역사 자료",
45
+ "historical names": "역사적 명칭",
46
+ "home subtitle": "기술과 용어 — 한국어 또는 로마자 표기로.",
47
+ "image": "이미지",
48
+ "images": "이미지",
49
+ "imprint": "운영자 정보",
50
+ "in": "/",
51
+ "japgi": "잡기",
52
+ "jireugi": "지르기",
53
+ "jjireugi": "찌르기",
54
+ "kkeokgi": "꺾기",
55
+ "language": "언어",
56
+ "legal": "법적 고지",
57
+ "lemma": "기본형",
58
+ "look up": "찾아보기",
59
+ "makgi": "막기",
60
+ "mccune reischauer": "매큔-라이샤워",
61
+ "milgi": "밀기",
62
+ "missing source": "출처가 확인되지 않았습니다.",
63
+ "modifier": "수식어",
64
+ "naver dictionary": "네이버 사전",
65
+ "neomgigi": "넘기기",
66
+ "next": "다음 기술",
67
+ "no results": "검색 결과가 없습니다.",
68
+ "noun": "명사",
69
+ "occurs in": "쓰이는 곳",
70
+ "open in google translate": "구글 번역에서 열기",
71
+ "open source": "출처 열기",
72
+ "other categories": "기타 분류",
73
+ "page": "페이지",
74
+ "page not found": "페이지를 찾을 수 없습니다",
75
+ "page not found text": "이 주소에는 페이지가 없습니다. 이름이 바뀌었을 수 있습니다. 검색하거나 분류에서 찾아보세요.",
76
+ "path": "경로",
77
+ "pihagi": "피하기",
78
+ "ppaegi": "빼기",
79
+ "previous": "이전 기술",
80
+ "privacy policy": "개인정보 처리방침",
81
+ "references": "참고 자료",
82
+ "revised romanization": "국어의 로마자 표기법",
83
+ "search": "검색",
84
+ "search categories": "기술 분류 표시",
85
+ "search placeholder": "기술이나 용어를 검색하세요...",
86
+ "search placeholder short": "용어 또는 번역",
87
+ "seogi": "서기",
88
+ "sorting": "정렬",
89
+ "source": "출처",
90
+ "sources": "출처",
91
+ "specialization": "세부 분류",
92
+ "supplementaryName": "보조 명칭",
93
+ "technique": "기술",
94
+ "techniques": "기술",
95
+ "term": "용어",
96
+ "termCombinations": "복합 용어에서의 사용",
97
+ "termForms": "단어 형태",
98
+ "terms": "용어",
99
+ "ttwigi": "뛰기",
100
+ "unknown": "알 수 없음",
101
+ "update available": "새 버전이 있습니다. 지금 업데이트할까요?",
102
+ "verb": "동사",
103
+ "videos": "동영상",
104
+ "weight": "가중치",
105
+ "word meaning": "낱말 뜻",
106
+ "year": "연도"
107
+ }
@@ -0,0 +1,23 @@
1
+ {{- /*
2
+ Not found: laid out like the entry page, so the way on is right there — the
3
+ search and the categories.
4
+ */ -}}
5
+ {{ define "main" }}
6
+ <div class="stack-lg" data-search data-search-inline>
7
+ <div class="home-hero">
8
+ <div class="home-hero__text" data-search-idle>
9
+ <span class="pill-outline">404</span>
10
+ <h1>{{ T "page not found" }}</h1>
11
+ {{- if ne site.Language.Lang "ko" }}
12
+ <span class="hangeul not-found__hangeul" lang="ko">찾을 수 없음</span>
13
+ {{- end }}
14
+ <p>{{ T "page not found text" }}</p>
15
+ </div>
16
+ {{ partial "search-form.html" (dict "id" "app-search-input") }}
17
+ </div>
18
+
19
+ <div class="search-results" data-search-results hidden></div>
20
+
21
+ {{- partial "category-cards.html" . }}
22
+ </div>
23
+ {{ end }}
@@ -0,0 +1,11 @@
1
+ {{- /* dict "trail" (slice (dict "label" … "href" …)) "current" … */ -}}
2
+ {{- with .trail -}}
3
+ <nav aria-label="{{ T "path" }}">
4
+ <ol class="breadcrumb">
5
+ {{- range . }}
6
+ <li class="breadcrumb-item"><a href="{{ .href }}">{{ .label }}</a></li>
7
+ {{- end }}
8
+ <li class="breadcrumb-item active" aria-current="page">{{ $.current }}</li>
9
+ </ol>
10
+ </nav>
11
+ {{- end -}}
@@ -0,0 +1,17 @@
1
+ {{- /*
2
+ The loaded categories, sorted into the colour groups of params.categoryGroups:
3
+ dict "all" (slice …) "grouped" (slice (dict "id" … "categories" …)) "ungrouped" (slice …)
4
+ */ -}}
5
+ {{- $all := slice -}}
6
+ {{- range hugo.Data.taekwondo.groups }}{{ $all = $all | append .key }}{{ end -}}
7
+ {{- $grouped := slice -}}
8
+ {{- $inGroup := slice -}}
9
+ {{- range $group := site.Params.categoryGroups -}}
10
+ {{- with intersect $group.categories $all -}}
11
+ {{- $grouped = $grouped | append (dict "id" $group.id "categories" .) -}}
12
+ {{- end -}}
13
+ {{- $inGroup = $inGroup | append $group.categories -}}
14
+ {{- end -}}
15
+ {{- $ungrouped := slice -}}
16
+ {{- range $all }}{{ if not (in $inGroup .) }}{{ $ungrouped = $ungrouped | append . }}{{ end }}{{ end -}}
17
+ {{- return (dict "all" $all "grouped" $grouped "ungrouped" $ungrouped) -}}
@@ -0,0 +1,36 @@
1
+ {{- /* The categories as one card per colour group — the overview to browse instead of search. */ -}}
2
+ {{- $categories := partial "categories.html" . -}}
3
+ {{- $cards := slice -}}
4
+ {{- range $categories.grouped -}}
5
+ {{- $cards = $cards | append (dict "id" .id "label" (T (printf "group %s" .id)) "categories" .categories) -}}
6
+ {{- end -}}
7
+ {{- with $categories.ungrouped -}}
8
+ {{- $cards = $cards | append (dict "id" "" "label" (T "other categories") "categories" .) -}}
9
+ {{- end -}}
10
+
11
+ {{- with $cards }}
12
+ <section class="stack" style="gap: 16px" data-search-idle>
13
+ <div class="d-flex flex-wrap justify-content-between align-items-baseline gap-2">
14
+ <h2 class="h4 m-0">{{ T "techniques" }}</h2>
15
+ <a href="{{ relLangURL "groups/" }}" class="fw-semibold">{{ T "all categories" }} →</a>
16
+ </div>
17
+
18
+ <div class="category-group-grid">
19
+ {{- range . }}
20
+ <div class="category-group-card" data-group="{{ .id }}">
21
+ <h3 class="section-title mb-1">{{ .label }}</h3>
22
+ <ul>
23
+ {{- range .categories }}
24
+ <li>
25
+ <a href="{{ partial "url.html" (dict "kind" "group" "key" .) }}">
26
+ <span>{{ partial "t.html" . }}</span>
27
+ <span class="romanization">{{ . }}</span>
28
+ </a>
29
+ </li>
30
+ {{- end }}
31
+ </ul>
32
+ </div>
33
+ {{- end }}
34
+ </div>
35
+ </section>
36
+ {{- end }}
@@ -0,0 +1,7 @@
1
+ {{- /* The colour group of a technique category, or "" when it belongs to none. */ -}}
2
+ {{- $category := . -}}
3
+ {{- $id := "" -}}
4
+ {{- range site.Params.categoryGroups -}}
5
+ {{- if in .categories $category -}}{{- $id = .id -}}{{- end -}}
6
+ {{- end -}}
7
+ {{- return $id -}}
@@ -0,0 +1,15 @@
1
+ {{- /* dict "group" … "label" … "description" … "categories" … */ -}}
2
+ <section class="stack" style="gap: 14px">
3
+ <div class="category-group-heading">
4
+ <span class="group-mark" data-group="{{ .group }}" aria-hidden="true"></span>
5
+ <h2>{{ .label }}</h2>
6
+ {{- with .description }}{{ if ne . $.label }}
7
+ <p>{{ . }}</p>
8
+ {{- end }}{{ end }}
9
+ </div>
10
+ <div class="category-tile-grid">
11
+ {{- range .categories }}
12
+ {{ partial "category-tile.html" . }}
13
+ {{- end }}
14
+ </div>
15
+ </section>
@@ -0,0 +1,4 @@
1
+ <a class="category-tile" href="{{ partial "url.html" (dict "kind" "group" "key" .) }}">
2
+ <span class="category-tile__name">{{ partial "t.html" . }}</span>
3
+ <span class="category-tile__reading">{{ . }}</span>
4
+ </a>
@@ -0,0 +1,10 @@
1
+ {{- /* Description segments; references to loaded techniques and terms become links. */ -}}
2
+ {{- range . -}}
3
+ {{- if eq .type "technique" -}}
4
+ <a class="description-ref" href="{{ partial "url.html" (dict "kind" "technique" "key" .key) }}">{{ .label }}</a>
5
+ {{- else if eq .type "term" -}}
6
+ <a class="description-ref description-ref--term" href="{{ partial "url.html" (dict "kind" "term" "key" .key) }}">{{ .label }}</a>
7
+ {{- else -}}
8
+ {{- .text -}}
9
+ {{- end -}}
10
+ {{- end -}}