aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/data')
-rw-r--r--ext/bg/data/anki-field-templates-upgrade-v8.handlebars14
-rw-r--r--ext/bg/data/default-anki-field-templates.handlebars15
2 files changed, 29 insertions, 0 deletions
diff --git a/ext/bg/data/anki-field-templates-upgrade-v8.handlebars b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
new file mode 100644
index 00000000..a5056364
--- /dev/null
+++ b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
@@ -0,0 +1,14 @@
+{{#*inline "stroke-count"}}
+ {{~#scope~}}
+ {{~#set "found" false}}{{/set~}}
+ {{~#each definition.stats.misc~}}
+ {{~#if (op "===" name "strokes")~}}
+ {{~#set "found" true}}{{/set~}}
+ Stroke count: {{value}}
+ {{~/if~}}
+ {{~/each~}}
+ {{~#if (op "!" (get "found"))~}}
+ Stroke count: Unknown
+ {{~/if~}}
+ {{~/scope~}}
+{{/inline}}
diff --git a/ext/bg/data/default-anki-field-templates.handlebars b/ext/bg/data/default-anki-field-templates.handlebars
index 1024e2e6..a0aff5d2 100644
--- a/ext/bg/data/default-anki-field-templates.handlebars
+++ b/ext/bg/data/default-anki-field-templates.handlebars
@@ -323,4 +323,19 @@
{{~/if~}}
{{/inline}}
+{{#*inline "stroke-count"}}
+ {{~#scope~}}
+ {{~#set "found" false}}{{/set~}}
+ {{~#each definition.stats.misc~}}
+ {{~#if (op "===" name "strokes")~}}
+ {{~#set "found" true}}{{/set~}}
+ Stroke count: {{value}}
+ {{~/if~}}
+ {{~/each~}}
+ {{~#if (op "!" (get "found"))~}}
+ Stroke count: Unknown
+ {{~/if~}}
+ {{~/scope~}}
+{{/inline}}
+
{{~> (lookup . "marker") ~}}