diff options
Diffstat (limited to 'tmpl')
| -rw-r--r-- | tmpl/dictionary.html | 17 | ||||
| -rw-r--r-- | tmpl/kanji.html | 11 | ||||
| -rw-r--r-- | tmpl/model.html | 18 | ||||
| -rw-r--r-- | tmpl/query-parser.html | 27 | ||||
| -rw-r--r-- | tmpl/terms.html | 13 | 
5 files changed, 40 insertions, 46 deletions
diff --git a/tmpl/dictionary.html b/tmpl/dictionary.html deleted file mode 100644 index 61bb79ac..00000000 --- a/tmpl/dictionary.html +++ /dev/null @@ -1,17 +0,0 @@ -<div class="dict-group well well-sm" data-title="{{title}}"> -    <h4><span class="text-muted glyphicon glyphicon-book"></span> {{title}} <small>rev.{{revision}}</small></h4> -    {{#if outdated}} -    <p class="text-warning">This dictionary is outdated and may not support new extension features; please import the latest version.</p> -    {{/if}} - -    <div class="checkbox"> -        <label><input type="checkbox" class="dict-enabled" {{#if enabled}}checked{{/if}}> Enable search</label> -    </div> -    <div class="checkbox options-advanced"> -        <label><input type="checkbox" class="dict-allow-secondary-searches" {{#if allowSecondarySearches}}checked{{/if}}> Allow secondary searches</label> -    </div> -    <div class="form-group options-advanced"> -        <label for="dict-{{title}}">Result priority</label> -        <input type="number" value="{{priority}}" id="dict-{{title}}" class="form-control dict-priority"> -    </div> -</div> diff --git a/tmpl/kanji.html b/tmpl/kanji.html index 0888d141..bbc0fc9d 100644 --- a/tmpl/kanji.html +++ b/tmpl/kanji.html @@ -20,13 +20,10 @@ No data found          <a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.svg" title="View added note (Alt + V)" alt></a>          <a href="#" class="action-add-note pending disabled" data-mode="kanji"><img src="/mixed/img/add-term-kanji.svg" title="Add Kanji (Alt + K)" alt></a>          {{/if}} -        {{#if source}} -        <a href="#" class="source-term"><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a> -        {{/if}}          <img src="/mixed/img/entry-current.svg" class="current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>      </div> -    <div class="glyph">{{character}}</div> +    <div class="glyph expression-scan-toggle">{{character}}</div>      {{#if frequencies}}      <div> @@ -91,9 +88,13 @@ No data found  {{/inline}}  {{#if definitions}} +<div class="term-navigation"> +    <a href="#" {{#if source}}class="source-term"{{else}}class="source-term term-button-fade"{{/if}}><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a> +    <a href="#" {{#if next}}class="next-term"{{else}}class="next-term term-button-fade"{{/if}}><img src="/mixed/img/source-term.svg" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a> +</div>  {{#each definitions}}  {{#unless @first}}<hr>{{/unless}} -{{> kanji debug=../debug addable=../addable source=../source root=../root}} +{{> kanji debug=../debug addable=../addable root=../root}}  {{/each}}  {{else}}  <p class="note">No results found</p> diff --git a/tmpl/model.html b/tmpl/model.html deleted file mode 100644 index 94772316..00000000 --- a/tmpl/model.html +++ /dev/null @@ -1,18 +0,0 @@ -<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/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~}} diff --git a/tmpl/terms.html b/tmpl/terms.html index 3dee43d7..9cfabc58 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -41,15 +41,12 @@          <a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" title="Play audio (Alt + P)" alt></a>          {{/if}}          {{/unless}} -        {{#if source}} -        <a href="#" class="source-term"><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a> -        {{/if}}          <img src="/mixed/img/entry-current.svg" class="current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>      </div>      {{#if merged}}      {{~#each expressions~}} -    <div class="expression"><span class="expression-{{termFrequency}}">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</span><div class="peek-wrapper"> +    <div class="expression expression-scan-toggle"><span class="expression-{{termFrequency}}">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</span><div class="peek-wrapper">              {{~#if ../playback~}}              <a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" title="Play audio" alt></a>              {{~/if~}} @@ -70,7 +67,7 @@      </div><span class="{{#if @last}}invisible{{/if}}">、</span></div>      {{~/each~}}      {{else}} -    <div class="expression">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</div> +    <div class="expression expression-scan-toggle">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</div>      {{#if termTags}}      <div style="display: inline-block;">          {{#each termTags}} @@ -129,9 +126,13 @@  {{/inline}}  {{#if definitions}} +<div class="term-navigation"> +    <a href="#" {{#if source}}class="source-term"{{else}}class="source-term term-button-fade"{{/if}}><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a> +    <a href="#" {{#if next}}class="next-term"{{else}}class="next-term term-button-fade"{{/if}}><img src="/mixed/img/source-term.svg" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a> +</div>  {{#each definitions}}  {{#unless @first}}<hr>{{/unless}} -{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback compactGlossaries=../compactGlossaries source=../source}} +{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback compactGlossaries=../compactGlossaries}}  {{/each}}  {{else}}  <p class="note">No results found.</p>  |