aboutsummaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-11-26 18:31:35 +0200
committerGitHub <noreply@github.com>2019-11-26 18:31:35 +0200
commit3423ed7d67ff7039d21da0b734e306b2c1024643 (patch)
tree92193ecc5e041a47f2afa8417adf17e215381e1e /tmpl
parent820beb7c9338bd81501d1779b10181c7cced9992 (diff)
parent89c6ef54b0a44685cde530dd4a94405a578ce132 (diff)
Merge pull request #279 from siikamiika/query-parser-1
Search page query parser
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/query-parser.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/tmpl/query-parser.html b/tmpl/query-parser.html
new file mode 100644
index 00000000..db98b5ff
--- /dev/null
+++ b/tmpl/query-parser.html
@@ -0,0 +1,27 @@
+{{~#*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~}}
+{{~#each text~}}
+<span class="query-parser-char">{{this}}</span>
+{{~/each~}}
+{{~else~}}
+<ruby>{{~#each text~}}
+<span class="query-parser-char">{{this}}</span>
+{{~/each~}}<rt>{{reading}}</rt></ruby>
+{{~/if~}}
+{{~/inline~}}
+
+{{~#each terms~}}
+{{> term preview=../preview }}
+{{~/each~}}