2021-04-20 11:17:30 +00:00
{
"modelName" : "Japanese sentences" ,
"inOrderFields" : [
"SentKanji" ,
"SentFurigana" ,
"SentEng" ,
"SentAudio" ,
"MorphManFocus" ,
"VocabKanji" ,
"VocabFurigana" ,
"VocabPitchPattern" ,
"VocabPitchNum" ,
"VocabDef" ,
"VocabAudio" ,
"Image" ,
"Notes" ,
"MakeProductionCard"
] ,
2021-11-27 11:20:36 +00:00
"css" : "@charset \"utf-8\";\n\n@font-face {\n font-family: \"KanjiStrokeOrders\";\n src: local(\"KanjiStrokeOrders\"), url(\"_kso.ttf\");\n}\n\n@font-face {\n font-family: \"Yu Mincho\";\n src: local(\"Yu Mincho\"), local(\"\u6e38\u660e\u671d\"), url(\"_yumin.ttf\");\n}\n\n@font-face {\n font-family: \"Yu Mincho\";\n src: local(\"Yu Mincho Demibold\"), local(\"\u6e38\u660e\u671d Demibold\"), url(\"_yumindb.ttf\");\n font-weight: 600;\n}\n\n* {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n.card {\n background-color: #fffaf0;\n color: #2a1b0a;\n font-family: \"Noto Serif\", \"Noto Serif CJK JP\", Yu Mincho, \"Liberation Serif\", \"Times New Roman\", Times, Georgia,\n Serif;\n font-size: 24px;\n text-align: left;\n line-height: 1.4;\n margin: 0 auto;\n}\n\n.card1 {\n color: inherit;\n}\n\n.card2 .jpsentence ruby rt {\n opacity: 0;\n}\n\n@media screen and (min-width: 820px) {\n .card {\n background-color: #E5D7C9;\n display: flex;\n justify-content: center;\n }\n .wrap {\n width: 800px;\n padding: 0 5px 0;\n background-color: #fffaf0;\n border-left: 1px solid #c9bcbc;\n border-right: 1px solid #c9bcbc;\n min-height: 100vh;\n }\n .wrap .wrap {\n width: auto;\n padding: 0;\n min-height: 0;\n border: 0;\n }\n}\n\n.card2 .jpsentence:hover ruby rt {\n opacity: 1;\n}\n\nhr {\n margin: 2px 0;\n clear: both;\n border: 0;\n border-top: 1px solid #c9bcbc;\n}\n\nb {\n font-weight: 600;\n}\n\n/* links */\na {\n color: #532f2f;\n}\n\na:hover {\n color: #722a2a;\n}\n\na.hint {\n text-decoration: none;\n text-align: center;\n display: block;\n}\n\n/* Hide furigana on front */\nnokana ruby rt {\n opacity: 0;\n font-size: 0;\n display: none;\n}\n\nnotext b {\n background-color: black;\n color: transparent;\n}\n\n/* Top */\nheader {\n display: flex;\n clear: both;\n}\n\nheader .tags {\n border-radius: 0px 0px 3px 3px;\n}\n\nheader > div:not(:last-child) {\n margin-right: 3px;\n}\n\n/* Space between elements */\n.images {\n margin-top: 16px;\n}\n\n.images > img {\n margin-bottom: 16px;\n}\n\n/* Japanese sentence */\n\n.jpsentence {\n display: flex;\n justify-content: center;\n font-size: 35px;\n}\n.fside .jpsentence { display: none; }\n\n.tags {\n font-family: \"Noto Sans\", \"Noto Sans CJK JP\", \"Liberation Sans\", Arial, Sans, sans-serif;\n text-align: center;\n display: inline-block;\n text-transform: lowercase;\n background-color: #333;\n color: #fffaf0;\n font-weight: bold;\n padding: 1px 3px;\n margin: 0;\n cursor: pointer;\n border-radius: 3px;\n font-size: 12px;\n line-height: 14px;\n}\n\n/* AnkiDroid replay button */\n.replaybutton {\n margin: 0;\n margin-right: 3px;\n text-decoration: none;\n}\n\n.replaybutton span {\n padding: 0;\n font-size: 16px;\n}\n\n.replaybutton span svg {\n fill: #fffaf0;\n background: #333;\n border-radius: 3px;\n vertical-align: top;\n min-width: 16px;\n min-height: 16px;\n}\n\n/* PC replay button */\na.replay-button {\n top: -0.125em;\n position: relative;\n margin: 0;\n}\n\na.replay-button svg {\n height: 1em;\n width: 1em;\n}\n\na.replay-button svg path {\n fill: #fffaf0;\n}\n\na.replay-button svg circle {\n fill: #333;\n}\n\n/* Footer and links */\nfooter {\n font-size: 16px;\n text-align: center;\n}\n\nfooter > a {\n text-decoration: none;\n}\n\nfooter > a:after {\n content: \"\u00b7\";\n color: brown;\n display: inline-block;\n width: 6px;\n}\n\nfooter > a:last-child:after {\n content: \"\" ; \ n w i d t h : 0 ; \ n } \ n \ n / * V o c a b * / \ n . v o c a b { \ n m a r g i n - t o p : 1 6 p x ; \ n } \ n \ n . v o c a b d i v { \ n d i s p l a y : i n l i n e - b l o c k ; \ n } \ n \ n . v o c a b b r { \ n d i s p l a y : n o n e ; \ n } \ n \ n . v o c a b > . t a g s { \ n v e r t i c a l - a l i g n : t o p ; \ n } \ n \ n . n o t e s > . t a g s { \ n v e r t i c a l - a l i g n : b o t t o m ; \ n } \ n \ n / * I m a g e s * / \ n . i m a g e s { \ n d i s p l a y : f l e x ; \ n f l e x - w r a p : w r a p ; \ n f l e x - d i r e
2021-04-20 11:17:30 +00:00
"cardTemplates" : [
{
"Name" : "Recognition" ,
2021-11-27 11:20:36 +00:00
"Front" : "<!--\nmpvacious cards, version 13.0\nSat Nov 27 11:10:04 AM UTC 2021\n-->\n\n<div class=\"wrap\">\n\n<header>\n {{#MorphManFocus}}\n <div class=\"tags\">{{MorphManFocus}}</div>\n {{/MorphManFocus}}\n {{#Tags}}\n <div class=\"tags\">{{Tags}}</div>\n {{/Tags}}\n</header>\n\n<div class=\"jpsentence\" lang=\"ja\">\n<p>\n {{edit:morphHighlight:furigana:SentKanji}}\n {{^SentKanji}}\n <nokana>{{edit:kanji:SentFurigana}}</nokana>\n {{/SentKanji}}\n</p>\n</div>\n\n</div> <!-- /wrap -->\n\n<div style=\"display:none;\">\n <div id=\"pitchnum_hidden\">{{VocabPitchNum}}</div>\n <div id=\"kanaword_hidden\">{{kana:VocabFurigana}}</div>\n</div>\n\n<script>\n /* Paints the question word according to its Pitch Accent number.\n * blue for \u5e73\u677f\n * red for \u982d\u9ad8\n * orange for \u4e2d\u9ad8\n * green for \u5c3e\u9ad8\n */\n function markPitch() {\n let pitchNumber = document.getElementById(\"pitchnum_hidden\");\n if (pitchNumber === null) {\n return;\n } else {\n pitchNumber = pitchNumber.innerHTML.match(/\\d/);\n }\n if (pitchNumber === null) {\n return;\n } else {\n pitchNumber = Number(pitchNumber);\n }\n\n /* Then decide what color to use and change font color accordingly. */\n if (pitchNumber == 0) {\n // use blue for \u5e73\u677f\n paintTargetWord(\"#3366CC\");\n } else if (pitchNumber == 1) {\n // use red for \u982d\u9ad8\n paintTargetWord(\"red\");\n } else if (pitchNumber > 1) {\n if (odaka(pitchNumber)) {\n // use green for \u5c3e\u9ad8\n paintTargetWord(\"green\");\n } else {\n // use orange for \u4e2d\u9ad8\n paintTargetWord(\"#ff6207\");\n }\n }\n }\n\n function paintTargetWord(color) {\n for (sentence of document.getElementsByClassName(\"jpsentence\")) {\n for (word of sentence.getElementsByTagName(\"b\")) {\n word.style.color = color;\n }\n }\n }\n\n function odaka(pitch_num) {\n // word is odaka if number of moras is equal to pitch accent position\n const vocab_kana = document.getElementById(\"kanaword_hidden\");\n if (vocab_kana === null) {\n return false;\n }\n // small \u3063 is one mora; \u3083\u3085\u3087 are parts of single mora\n const n_moras = vocab_kana.innerHTML.replace(/[\u30e3\u30e5\u30e7\u3083\u3085\u3087]/g, '').length;\n if (n_moras == pitch_num) {\n return true;\n } else {\n return false;\n }\n }\n\n /* Splits tags into separate divs */\n function splitTagDiv() {\n const header = document.querySelector(\"header\");\n if (!header) return;\n const split = `{{MorphManFocus}} {{Tags}}`.split(' ');\n\n header.innerHTML = \"\";\n\n for (const tag of split) {\n if (tag.length < 1)\n continue;\n const tag_elem = document.createElement(\"div\");\n tag_elem.className = \"tags\";\n tag_elem.innerHTML = tag;\n header.appendChild(tag_elem);\n }\n }\n\n markPitch()\n splitTagDiv()\n</script>" ,
"Back" : "<div class=\"wrap\">\n\n<div class=\"fside\">{{FrontSide}}</div>\n\n<div class=\"jpsentence\" lang=\"ja\">\n<p>\n {{edit:furigana:SentFurigana}}\n {{^SentFurigana}}{{edit:furigana:SentKanji}}{{/SentFurigana}}\n</p>\n</div>\n\n{{#SentEng}}\n<div lang=\"en\">\n {{hint:SentEng}}\n</div>\n{{/SentEng}}\n\n<div class=\"vocab\">\n {{VocabAudio}}{{SentAudio}}\n {{VocabPitchPattern}}{{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}\n {{#VocabPitchNum}}<span class=\"tags\"\n id=\"pitchnum\">{{VocabPitchNum}}</span>{{/VocabPitchNum}}{{#VocabKanji}}\u3010{{kanji:VocabKanji}}\u3011{{/VocabKanji}}\n</div>\n\n{{#VocabDef}}\n<div class=\"definitions\">{{edit:furigana:VocabDef}}</div>\n{{/VocabDef}}\n\n{{#Notes}}\n<div class=\"notes\">\n <div class=\"tags\">Notes</div>\n <div>{{furigana:Notes}}</div>\n</div>\n{{/Notes}}\n\n{{#Image}}<div class=\"images\">{{Image}}</div>{{/Image}}\n\n<hr>\n\n<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}}\"\n title=\"Sentence on Jisho\">Jisho</a><a href=\"https://www.google.co.jp/search?q={{text:kanji:SentKanji}}&tbm=isch\"\n title=\"Search images\">Images</a>{{/SentKanji}}{{#VocabKanji}}<a\n href=\"http://www.weblio.jp/content/{{text:VocabKanji}}\" title=\"Vocab on Weblio\">Weblio</a><a\n href=\"https://wadoku.de/search/?q={{text:VocabKanji}}\" title=\"Vocab on Wadoku\">Wadoku</a>{{/VocabKanji}}\n</footer>\n\n</div> <!-- /wrap -->\n\n<script>\n function removePitchBrackets() {\n const tags = document.getElementById(\"pitchnum\");\n if (tags !== null) {\n tags.innerHTML = tags.innerHTML.replace(/[\\[\\]]/g, \"\");\n }\n }\n markPitch()\n removePitchBrackets()\n</script>\n"
2021-04-20 11:17:30 +00:00
} ,
{
"Name" : "Production" ,
2021-11-27 11:20:36 +00:00
"Front" : "{{#MakeProductionCard}}\n{{#SentKanji}}\n\n<header>{{#Tags}}<div class=\"tags\">{{Tags}}</div>{{/Tags}}</header>\n{{#Image}}<div class=\"images\">{{Image}}</div>{{/Image}}\n<div class=\"jpsentence production\">{{edit:furigana:SentFurigana}}</div>\n<div style=\"text-align: center;\">{{VocabAudio}}{{SentAudio}}</div>\n<script>\n function threeDots() {\n const sent = document.getElementsByClassName(\"production\")[0];\n if (sent) {\n for (const hidden of sent.getElementsByTagName(\"b\")) {\n hidden.style.visibility = \"visible\";\n hidden.innerText = \"\u3010\" + hidden.innerText.replace(/[^\u3041-\u3093\u30a1-\u30f3]/g, \"\") + \"\u3011\";\n }\n }\n }\n /* Splits tags into separate divs */\n function splitTagDiv() {\n const header = document.querySelector(\"header\");\n if (!header) return;\n const split = `{{MorphManFocus}} {{Tags}}`.split(' ');\n\n header.innerHTML = \"\";\n\n for (const tag of split) {\n if (tag.length < 1)\n continue;\n const tag_elem = document.createElement(\"div\");\n tag_elem.className = \"tags\";\n tag_elem.innerHTML = tag;\n header.appendChild(tag_elem);\n }\n }\n\n threeDots()\n splitTagDiv()\n</script>\n\n{{/SentKanji}}\n{{/MakeProductionCard}}\n" ,
"Back" : "{{FrontSide}}\n\n<hr>\n\n<div lang=\"en\">{{SentEng}}</div>\n<div class=\"strokeorder\">{{VocabKanji}}</div>\n\n{{#VocabKanji}}\n<div class=\"vocab\">\n {{VocabPitchPattern}}\n {{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}\n {{#VocabPitchNum}}\n <span class=\"tags\">{{VocabPitchNum}}</span>\n {{/VocabPitchNum}}\n \u3010{{VocabKanji}}\u3011\n</div>\n{{/VocabKanji}}\n\n{{#VocabDef}}\n<div class=\"definitions\">\n {{edit:furigana:VocabDef}}\n</div>\n{{/VocabDef}}\n\n{{#Notes}}\n<div class=\"notes\">\n <div class=\"tags\">Notes</div>\n <div>{{furigana:Notes}}</div>\n</div>\n{{/Notes}}\n\n<hr>\n\n<footer>{{#SentKanji}}<a href=\"https://jisho.org/search?keyword={{edit:text:SentKanji}}\"\n title=\"Sentence on Jisho\">Jisho</a><a href=\"https://www.google.co.jp/search?q={{edit:text:SentKanji}}&tbm=isch\"\n title=\"Search images\">Images</a>{{/SentKanji}}{{#VocabKanji}}<a\n href=\"http://tangorin.com/dict.php?dict=general&s={{text:VocabKanji}}\">Tangorin</a><a\n href=\"http://www.weblio.jp/content/{{text:VocabKanji}}\">Weblio</a><a\n href=\"https://wadoku.de/search/?q={{text:VocabKanji}}\">Wadoku</a> {{/VocabKanji}}</footer>\n"
2021-04-20 11:17:30 +00:00
}
]
}