aboutsummaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-12-22 18:50:58 -0800
committerAlex Yatskov <alex@foosoft.net>2016-12-22 18:50:58 -0800
commit39fa11f72bae62985ee5b27103e5959dab30316c (patch)
treee7fe89d18a2b0bfa892ede044d7e6dcc076bbf7b /tmpl
parent5710dc55a73491a0be2259fbd21874bddda54877 (diff)
parent9d21f8a456530c29c7c03db4896562a4902f6f8a (diff)
Merge branch 'dev'
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/dictionary.html26
-rw-r--r--tmpl/kanji-list.html10
-rw-r--r--tmpl/kanji.html8
-rw-r--r--tmpl/model.html18
-rw-r--r--tmpl/term-list.html10
-rw-r--r--tmpl/term.html12
6 files changed, 73 insertions, 11 deletions
diff --git a/tmpl/dictionary.html b/tmpl/dictionary.html
new file mode 100644
index 00000000..af0a6d28
--- /dev/null
+++ b/tmpl/dictionary.html
@@ -0,0 +1,26 @@
+<div class="dict-group well well-sm" data-title="{{title}}">
+ <h4><span class="text-muted glyphicon glyphicon-book"></span> {{title}} <small>v.{{version}}</small></h4>
+
+ <!-- <div class="row"> -->
+ <!-- <div class="col-xs-8"> -->
+ <!-- <h4><span class="text-muted glyphicon glyphicon-book"></span> {{title}} <small>v.{{version}}</small></h4> -->
+ <!-- </div> -->
+ <!-- <div class="col-xs-4 text-right disabled"> -->
+ <!-- <button type="button" class="dict-group-controls dict-delete btn btn-danger">Delete</button> -->
+ <!-- </div> -->
+ <!-- </div> -->
+
+ <div class="dict-delete-progress">
+ Dictionary data is being deleted, please be patient...
+ <div class="progress">
+ <div class="progress-bar progress-bar-striped progress-bar-danger" style="width: 0%"></div>
+ </div>
+ </div>
+
+ <div class="checkbox dict-group-controls {{#unless hasTerms}}disabled{{/unless}}">
+ <label><input type="checkbox" class="dict-enable-terms" {{#unless hasTerms}}disabled{{/unless}} {{#if enableTerms}}checked{{/if}}> Enable term search</label>
+ </div>
+ <div class="checkbox dict-group-controls {{#unless hasKanji}}disabled{{/unless}}">
+ <label><input type="checkbox" class="dict-enable-kanji" {{#unless hasKanji}}disabled{{/unless}} {{#if enableKanji}}checked{{/if}}> Enable Kanji search</label>
+ </div>
+</div>
diff --git a/tmpl/kanji-list.html b/tmpl/kanji-list.html
index d418eafd..af38d485 100644
--- a/tmpl/kanji-list.html
+++ b/tmpl/kanji-list.html
@@ -1,5 +1,9 @@
{{> header.html}}
-{{#each definitions}}
-{{> kanji.html addable=../addable root=../root options=../options sequence=../sequence}}
-{{/each}}
+{{#if definitions}}
+ {{#each definitions}}
+ {{> kanji.html addable=../addable root=../root options=../options sequence=../sequence}}
+ {{/each}}
+{{else}}
+ <p>No results found</p>
+{{/if}}
{{> footer.html}}
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index daa825be..e22dd660 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -30,15 +30,21 @@
<div class="kanji-tags">
{{#each tags}}
- <span class="tag tag-{{class}}" title="{{desc}}">{{name}}</span>
+ <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>
<div class="kanji-glossary">
+ {{#if glossary.[1]}}
<ol>
{{#each glossary}}
<li><span>{{.}}</span></li>
{{/each}}
</ol>
+ {{else}}
+ <p>
+ {{glossary.[0]}}
+ </p>
+ {{/if}}
</div>
</div>
diff --git a/tmpl/model.html b/tmpl/model.html
new file mode 100644
index 00000000..94772316
--- /dev/null
+++ b/tmpl/model.html
@@ -0,0 +1,18 @@
+<tr>
+ <td class="col-sm-2">{{name}}</td>
+ <td class="col-sm-10">
+ <div class="input-group">
+ <input type="text" class="anki-field-value form-control" data-field="{{name}}" value="{{value}}">
+ <div class="input-group-btn">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu dropdown-menu-right">
+ {{#each markers}}
+ <li><a class="marker-link" href="#">{{.}}</a></li>
+ {{/each}}
+ </ul>
+ </div>
+ </div>
+ </td>
+</tr>
diff --git a/tmpl/term-list.html b/tmpl/term-list.html
index d0b060c8..2088ac71 100644
--- a/tmpl/term-list.html
+++ b/tmpl/term-list.html
@@ -1,5 +1,9 @@
{{> header.html}}
-{{#each definitions}}
-{{> term.html addable=../addable root=../root options=../options sequence=../sequence}}
-{{/each}}
+{{#if definitions}}
+ {{#each definitions}}
+ {{> term.html addable=../addable root=../root options=../options sequence=../sequence}}
+ {{/each}}
+{{else}}
+ <p>No results found</p>
+{{/if}}
{{> footer.html}}
diff --git a/tmpl/term.html b/tmpl/term.html
index 7d60e42a..e4a0d02b 100644
--- a/tmpl/term.html
+++ b/tmpl/term.html
@@ -15,23 +15,27 @@
<div class="term-expression">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div>
{{/if}}
- <div class="term-rules">
- {{#each rules}}
- <span class="rule">{{.}}</span> {{#unless @last}}&laquo;{{/unless}}
+ <div class="term-reasons">
+ {{#each reasons}}
+ <span class="reasons">{{.}}</span> {{#unless @last}}&laquo;{{/unless}}
{{/each}}
</div>
<div class="term-tags">
{{#each tags}}
- <span class="tag tag-{{class}}" title="{{desc}}">{{name}}</span>
+ <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>
<div class="term-glossary">
+ {{#if glossary.[1]}}
<ol>
{{#each glossary}}
<li><span>{{.}}</span></li>
{{/each}}
</ol>
+ {{else}}
+ <p>{{glossary.[0]}}</p>
+ {{/if}}
</div>
</div>