\n
\n
![\"Current](\"/mixed/img/entry-current.png\")
\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.playback : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "
\n\n"
diff --git a/ext/mixed/img/entry-current.png b/ext/mixed/img/entry-current.png
new file mode 100644
index 00000000..bab7cc9b
Binary files /dev/null and b/ext/mixed/img/entry-current.png differ
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 11df7208..7b8f0aae 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -167,13 +167,16 @@ class Display {
return;
}
+ $('.current').hide().eq(index).show();
+
const body = $('body').stop();
const entry = $('.entry').eq(index);
+ const target = index === 0 ? 0 : entry.offset().top;
if (smooth) {
- body.animate({scrollTop: entry.offset().top}, 200);
+ body.animate({scrollTop: target}, 200);
} else {
- body.scrollTop(entry.offset().top);
+ body.scrollTop(target);
}
this.index = index;
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index 4bb524cf..3cc7f966 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -1,6 +1,7 @@
{{#*inline "kanji"}}
+
![Current entry](/mixed/img/entry-current.png)
{{#if addable}}
![](/mixed/img/add-kanji.png)
{{/if}}
diff --git a/tmpl/terms.html b/tmpl/terms.html
index fa32cea1..6212cb21 100644
--- a/tmpl/terms.html
+++ b/tmpl/terms.html
@@ -20,6 +20,7 @@
{{#*inline "term"}}