2021-11-27 14:58:45 +00:00
|
|
|
|
<div class="wrap">
|
2021-12-25 03:19:58 +00:00
|
|
|
|
<div class="fside">{{FrontSide}}</div>
|
|
|
|
|
|
|
|
|
|
<div class="sent-center">
|
|
|
|
|
<div class="jpsentence" lang="ja">
|
2022-10-14 21:22:13 +00:00
|
|
|
|
<div class="background">{{furigana:SentFurigana}}{{^SentFurigana}}{{furigana:SentKanji}}{{/SentFurigana}}</div>
|
|
|
|
|
<div class="overlay">{{edit:furigana:SentFurigana}}{{^SentFurigana}}{{edit:furigana:SentKanji}}{{/SentFurigana}}</div>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
</div>
|
|
|
|
|
{{#SentEng}}
|
|
|
|
|
<div class="ensentence" lang="en">{{hint:SentEng}}</div>
|
|
|
|
|
{{/SentEng}}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{#VocabDef}}
|
2023-07-26 19:44:37 +00:00
|
|
|
|
<section class="headword_section">
|
|
|
|
|
<div class="vocab">
|
|
|
|
|
<span id="vocab-audio">{{VocabAudio}}</span>
|
|
|
|
|
<span id="sent-audio">{{SentAudio}}</span>
|
2024-01-11 11:49:12 +00:00
|
|
|
|
<div class="reading" id="pitchpattern" lang="ja">{{VocabPitchPattern}}{{^VocabPitchPattern}}{{text:kana:VocabFurigana}}{{/VocabPitchPattern}}</div>
|
2023-07-26 19:44:37 +00:00
|
|
|
|
{{#VocabPitchNum}}<span class="tags" id="pitchnum">{{text:VocabPitchNum}}</span>{{/VocabPitchNum}}
|
2024-01-11 11:49:12 +00:00
|
|
|
|
{{#VocabKanji}}<div class="target_word" lang="ja">{{text:kanji:VocabKanji}}</div>{{/VocabKanji}}
|
2023-07-26 19:44:37 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="definitions">{{edit:furigana:VocabDef}}</div>
|
|
|
|
|
</section>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
{{/VocabDef}}
|
2022-10-14 21:22:13 +00:00
|
|
|
|
|
2021-12-25 03:19:58 +00:00
|
|
|
|
{{#Notes}}
|
2023-07-26 19:44:37 +00:00
|
|
|
|
<details open class="notes">
|
|
|
|
|
<summary>Notes</summary>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
<div>{{furigana:Notes}}</div>
|
2023-07-26 19:44:37 +00:00
|
|
|
|
</details>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
{{/Notes}}
|
2022-10-14 21:22:13 +00:00
|
|
|
|
|
2021-12-25 03:19:58 +00:00
|
|
|
|
{{#Image}}
|
2023-07-26 19:44:37 +00:00
|
|
|
|
<details class="images-details">
|
|
|
|
|
<summary>Image</summary>
|
|
|
|
|
<div class="images">{{Image}}</div>
|
|
|
|
|
</details>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
{{/Image}}
|
|
|
|
|
|
2022-10-14 21:22:13 +00:00
|
|
|
|
<hr>
|
2021-12-25 03:19:58 +00:00
|
|
|
|
|
|
|
|
|
<footer>
|
2022-10-14 21:22:13 +00:00
|
|
|
|
{{#SentKanji}}
|
|
|
|
|
<a href="https://simplytranslate.org/?engine=google&text={{text:kanji:SentKanji}}&sl=ja&tl=en" title="Translate with SimplyTranslate">Translate</a>
|
|
|
|
|
<a href="https://jisho.org/search?keyword={{text:kanji:SentKanji}}" title="Sentence on Jisho">Jisho</a>
|
|
|
|
|
<a href="https://www.google.co.jp/search?q={{text:kanji:SentKanji}}&tbm=isch" title="Search images">Images</a>
|
|
|
|
|
{{/SentKanji}}
|
|
|
|
|
{{#VocabKanji}}
|
|
|
|
|
<a href="http://www.weblio.jp/content/{{text:VocabKanji}}" title="Vocab on Weblio">Weblio</a>
|
|
|
|
|
<a href="https://wadoku.de/search/?q={{text:VocabKanji}}" title="Vocab on Wadoku">Wadoku</a>
|
|
|
|
|
{{/VocabKanji}}
|
2021-12-25 03:19:58 +00:00
|
|
|
|
</footer>
|
2021-11-27 14:58:45 +00:00
|
|
|
|
</div> <!-- /wrap -->
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-03-07 02:16:46 +00:00
|
|
|
|
function tweakRevealText() {
|
2021-12-25 03:12:08 +00:00
|
|
|
|
const elem = document.querySelector("div.ensentence > a.hint");
|
|
|
|
|
if (elem) {
|
|
|
|
|
elem.innerText = "Reveal English translation";
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-14 21:22:13 +00:00
|
|
|
|
|
2021-11-27 14:58:45 +00:00
|
|
|
|
function removePitchBrackets() {
|
|
|
|
|
const tags = document.getElementById("pitchnum");
|
|
|
|
|
if (tags !== null) {
|
|
|
|
|
tags.innerHTML = tags.innerHTML.replace(/[\[\]]/g, "");
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-07 02:16:21 +00:00
|
|
|
|
|
|
|
|
|
function removeNoPitchAccentDataText() {
|
|
|
|
|
const has_no_data = (tag) => tag.innerText.toLowerCase().includes("no pitch accent");
|
|
|
|
|
const pitch_num = document.getElementById("pitchnum");
|
|
|
|
|
const pitch_pattern = document.getElementById("pitchpattern");
|
2023-03-07 08:14:31 +00:00
|
|
|
|
const pitch_num_inside_html = document.querySelector(".pitch_number");
|
2023-03-07 02:16:21 +00:00
|
|
|
|
if (pitch_num && has_no_data(pitch_num)) {
|
|
|
|
|
pitch_num.remove();
|
|
|
|
|
}
|
|
|
|
|
if (pitch_pattern && has_no_data(pitch_pattern)) {
|
|
|
|
|
pitch_pattern.innerHTML = `{{text:kana:VocabFurigana}}`;
|
|
|
|
|
}
|
2023-03-07 08:14:31 +00:00
|
|
|
|
if (pitch_num && pitch_num_inside_html) {
|
|
|
|
|
pitch_num.remove();
|
|
|
|
|
}
|
2023-03-07 02:16:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-26 19:44:37 +00:00
|
|
|
|
function removeAudioIfMarkedX() {
|
|
|
|
|
const pr = document.getElementById("vocab-audio");
|
|
|
|
|
if (pr && pr.innerText.match(/^[x×]/i)) {
|
|
|
|
|
pr.style.display = "none";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-25 03:19:58 +00:00
|
|
|
|
markPitch();
|
|
|
|
|
removePitchBrackets();
|
2023-03-07 02:16:46 +00:00
|
|
|
|
tweakRevealText();
|
2023-03-07 02:16:21 +00:00
|
|
|
|
removeNoPitchAccentDataText();
|
2023-03-07 02:17:13 +00:00
|
|
|
|
reformatMultiFurigana();
|
2023-07-26 19:44:37 +00:00
|
|
|
|
removeAudioIfMarkedX();
|
|
|
|
|
toggleImageDetails();
|
2022-10-14 21:22:13 +00:00
|
|
|
|
</script>
|