summaryrefslogtreecommitdiff
path: root/tmpl/query-parser.html
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-10-31 23:56:44 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-11-23 17:45:44 +0200
commit3881457e4ed3f9c7833ac21a5e7fc44c2ba00b0f (patch)
tree7daa263a7c7c7008bb0518a06ff4e94faded20e9 /tmpl/query-parser.html
parente6a1b781648b8ab965a4508ea29ab85f0e070b35 (diff)
use handlebars templates for query parser
Diffstat (limited to 'tmpl/query-parser.html')
-rw-r--r--tmpl/query-parser.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/tmpl/query-parser.html b/tmpl/query-parser.html
new file mode 100644
index 00000000..818650e6
--- /dev/null
+++ b/tmpl/query-parser.html
@@ -0,0 +1,23 @@
+{{~#*inline "term"~}}
+{{~#if preview~}}
+<span class="query-parser-term-preview">
+{{~else~}}
+<span class="query-parser-term">
+{{~/if~}}
+{{~#each this~}}
+{{> part }}
+{{~/each~}}
+</span>
+{{~/inline~}}
+
+{{~#*inline "part"~}}
+{{~#if raw~}}
+{{text}}
+{{~else~}}
+<ruby>{{text}}<rt>{{reading}}</rt></ruby>
+{{~/if~}}
+{{~/inline~}}
+
+{{~#each terms~}}
+{{> term preview=../preview }}
+{{~/each~}}