summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-28 19:44:28 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-28 19:44:28 -0700
commita8c7a8602fff55df8279b9f56dfece875005a7fa (patch)
tree32dbe269d2ca9881b364ef7ded07122e8e5d1a9f /util
parent149e22baacf41ef18adf62b5e6e58d7942c5beb4 (diff)
Use partials
Diffstat (limited to 'util')
-rw-r--r--util/tmpl/defs.html7
-rw-r--r--util/tmpl/term.html3
2 files changed, 5 insertions, 5 deletions
diff --git a/util/tmpl/defs.html b/util/tmpl/defs.html
index 553a8c62..2fcc4ea9 100644
--- a/util/tmpl/defs.html
+++ b/util/tmpl/defs.html
@@ -1,9 +1,6 @@
{{#each defs}}
<div class="yomichan-def">
- <div class="yomichan-def-expression">{{expression}}</div>
- {{#if reading}}
- <div class="yomichan-def-reading">{{reading}}</div>
- {{/if}}
- <div class="yomichan-def-glossary">{{glossary}}</div>
+ {{> term.html}}
+ {{#unless @last}}<br>{{/unless}}
</div>
{{/each}}
diff --git a/util/tmpl/term.html b/util/tmpl/term.html
new file mode 100644
index 00000000..e46e9d5b
--- /dev/null
+++ b/util/tmpl/term.html
@@ -0,0 +1,3 @@
+<div class="yomichan-def-expression">{{expression}}</div>
+{{#if reading}}<div class="yomichan-def-reading">{{reading}}</div>{{/if}}
+<div class="yomichan-def-glossary">{{glossary}}</div>