reformat
This commit is contained in:
parent
4594772fc1
commit
670986db1c
|
@ -1,48 +1,47 @@
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
<div class="fside">{{FrontSide}}</div>
|
||||||
|
|
||||||
<div class="fside">{{FrontSide}}</div>
|
<div class="sent-center">
|
||||||
|
<div class="jpsentence" lang="ja">
|
||||||
|
{{edit:furigana:SentFurigana}}
|
||||||
|
{{^SentFurigana}}{{edit:furigana:SentKanji}}{{/SentFurigana}}
|
||||||
|
</div>
|
||||||
|
{{#SentEng}}
|
||||||
|
<div class="ensentence" lang="en">{{hint:SentEng}}</div>
|
||||||
|
{{/SentEng}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="sent-center">
|
<div class="vocab">
|
||||||
<div class="jpsentence" lang="ja">
|
{{VocabAudio}}{{SentAudio}}{{VocabPitchPattern}}
|
||||||
{{edit:furigana:SentFurigana}}
|
{{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}
|
||||||
{{^SentFurigana}}{{edit:furigana:SentKanji}}{{/SentFurigana}}
|
{{#VocabPitchNum}}<span class="tags" id="pitchnum">{{VocabPitchNum}}</span>{{/VocabPitchNum}}
|
||||||
</div>
|
{{#VocabKanji}}【{{kanji:VocabKanji}}】{{/VocabKanji}}
|
||||||
{{#SentEng}}
|
</div>
|
||||||
<div class="ensentence" lang="en">
|
|
||||||
{{hint:SentEng}}
|
|
||||||
</div>
|
|
||||||
{{/SentEng}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vocab">
|
{{#VocabDef}}
|
||||||
{{VocabAudio}}{{SentAudio}}
|
<div class="definitions">{{edit:furigana:VocabDef}}</div>
|
||||||
{{VocabPitchPattern}}{{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}
|
{{/VocabDef}}
|
||||||
{{#VocabPitchNum}}<span class="tags"
|
{{#Notes}}
|
||||||
id="pitchnum">{{VocabPitchNum}}</span>{{/VocabPitchNum}}{{#VocabKanji}}【{{kanji:VocabKanji}}】{{/VocabKanji}}
|
<div class="notes">
|
||||||
</div>
|
<div class="tags">Notes</div>
|
||||||
|
<div>{{furigana:Notes}}</div>
|
||||||
|
</div>
|
||||||
|
{{/Notes}}
|
||||||
|
{{#Image}}
|
||||||
|
<div class="images">{{Image}}</div>
|
||||||
|
{{/Image}}
|
||||||
|
|
||||||
{{#VocabDef}}
|
<hr />
|
||||||
<div class="definitions">{{edit:furigana:VocabDef}}</div>
|
|
||||||
{{/VocabDef}}
|
|
||||||
|
|
||||||
{{#Notes}}
|
|
||||||
<div class="notes">
|
|
||||||
<div class="tags">Notes</div>
|
|
||||||
<div>{{furigana:Notes}}</div>
|
|
||||||
</div>
|
|
||||||
{{/Notes}}
|
|
||||||
|
|
||||||
{{#Image}}<div class="images">{{Image}}</div>{{/Image}}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<footer>{{#SentKanji}}<a title="Translate with SimplyTranslate" href="https://translate.metalune.xyz/?engine=google&text={{text:kanji:SentKanji}}&sl=ja&tl=en">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}}
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
{{#SentKanji}}<a title="Translate with SimplyTranslate"
|
||||||
|
href="https://translate.metalune.xyz/?engine=google&text={{text:kanji:SentKanji}}&sl=ja&tl=en">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}}
|
||||||
|
</footer>
|
||||||
</div> <!-- /wrap -->
|
</div> <!-- /wrap -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -58,7 +57,7 @@
|
||||||
tags.innerHTML = tags.innerHTML.replace(/[\[\]]/g, "");
|
tags.innerHTML = tags.innerHTML.replace(/[\[\]]/g, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
markPitch()
|
markPitch();
|
||||||
removePitchBrackets()
|
removePitchBrackets();
|
||||||
tweak_reveal_text()
|
tweak_reveal_text();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -4,25 +4,23 @@ Sat Nov 27 11:10:04 AM UTC 2021
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
<header>
|
||||||
|
{{#MorphManFocus}}
|
||||||
|
<div class="tags">{{MorphManFocus}}</div>
|
||||||
|
{{/MorphManFocus}}
|
||||||
|
{{#Tags}}
|
||||||
|
<div class="tags">{{Tags}}</div>
|
||||||
|
{{/Tags}}
|
||||||
|
</header>
|
||||||
|
|
||||||
<header>
|
<div class="sent-center">
|
||||||
{{#MorphManFocus}}
|
<div class="jpsentence" lang="ja">
|
||||||
<div class="tags">{{MorphManFocus}}</div>
|
{{edit:morphHighlight:furigana:SentKanji}}
|
||||||
{{/MorphManFocus}}
|
{{^SentKanji}}
|
||||||
{{#Tags}}
|
<nokana>{{edit:kanji:SentFurigana}}</nokana>
|
||||||
<div class="tags">{{Tags}}</div>
|
{{/SentKanji}}
|
||||||
{{/Tags}}
|
</div>
|
||||||
</header>
|
</div>
|
||||||
|
|
||||||
<div class="sent-center">
|
|
||||||
<div class="jpsentence" lang="ja">
|
|
||||||
{{edit:morphHighlight:furigana:SentKanji}}
|
|
||||||
{{^SentKanji}}
|
|
||||||
<nokana>{{edit:kanji:SentFurigana}}</nokana>
|
|
||||||
{{/SentKanji}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!-- /wrap -->
|
</div> <!-- /wrap -->
|
||||||
|
|
||||||
<div style="display:none;">
|
<div style="display:none;">
|
||||||
|
@ -83,7 +81,7 @@ Sat Nov 27 11:10:04 AM UTC 2021
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// small っ is one mora; ゃゅょ are parts of single mora
|
// small っ is one mora; ゃゅょ are parts of single mora
|
||||||
const n_moras = vocab_kana.innerHTML.replace(/[ャュョゃゅょ]/g, '').length;
|
const n_moras = vocab_kana.innerHTML.replace(/[ャュョゃゅょ]/g, "").length;
|
||||||
if (n_moras == pitch_num) {
|
if (n_moras == pitch_num) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -95,13 +93,12 @@ Sat Nov 27 11:10:04 AM UTC 2021
|
||||||
function splitTagDiv() {
|
function splitTagDiv() {
|
||||||
const header = document.querySelector("header");
|
const header = document.querySelector("header");
|
||||||
if (!header) return;
|
if (!header) return;
|
||||||
const split = `{{MorphManFocus}} {{Tags}}`.split(' ');
|
const split = `{{MorphManFocus}} {{Tags}}`.split(" ");
|
||||||
|
|
||||||
header.innerHTML = "";
|
header.innerHTML = "";
|
||||||
|
|
||||||
for (const tag of split) {
|
for (const tag of split) {
|
||||||
if (tag.length < 1)
|
if (tag.length < 1) continue;
|
||||||
continue;
|
|
||||||
const tag_elem = document.createElement("div");
|
const tag_elem = document.createElement("div");
|
||||||
tag_elem.className = "tags";
|
tag_elem.className = "tags";
|
||||||
tag_elem.innerHTML = tag;
|
tag_elem.innerHTML = tag;
|
||||||
|
@ -109,6 +106,6 @@ Sat Nov 27 11:10:04 AM UTC 2021
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
markPitch()
|
markPitch();
|
||||||
splitTagDiv()
|
splitTagDiv();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
@media screen and (min-width: 820px) {
|
@media screen and (min-width: 820px) {
|
||||||
.card {
|
.card {
|
||||||
background-color: #E5D7C9;
|
background-color: #e5d7c9;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
@ -136,11 +136,15 @@ header > div:not(:last-child) {
|
||||||
|
|
||||||
/* Japanese sentence */
|
/* Japanese sentence */
|
||||||
|
|
||||||
.jpsentence { font-size: 35px; }
|
.jpsentence {
|
||||||
|
font-size: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Hide front side when the back is shown. */
|
/* Hide front side when the back is shown. */
|
||||||
|
|
||||||
.fside .jpsentence { display: none; }
|
.fside .jpsentence {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* English */
|
/* English */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue