diff --git a/templates/Japanese Mined Sentences (cyphar)/README.md b/templates/Japanese Mined Sentences (cyphar)/README.md index 1c23392..e12c49c 100644 --- a/templates/Japanese Mined Sentences (cyphar)/README.md +++ b/templates/Japanese Mined Sentences (cyphar)/README.md @@ -25,6 +25,15 @@ template][original-template], with the following modifications made to the I find that if both definitions are visible, my eyes immediately go to the bilingual definition even if it wasn't necessary for me to do so. + * A new field is added `Source`, which is useful for storing information about + where you mined a sentence from (be it from mpvacious or Yomichan when + browsing some website). This can be quite handy if you find that you need to + adjust the sentence some time later (or add a different image on the back). + + To use this with mpvacious, you need to be using a version which includes + [this pull-request I wrote][mpvacious-pr36], which adds support for + specifying a "miscellaneous information". Set `miscinfo_field=Source`. + I personally use these cards for sentence mining with Yomichan and Mpvacious. | Front | @@ -36,6 +45,7 @@ I personally use these cards for sentence mining with Yomichan and Mpvacious. | ![back](card_back_monolingual.webp) | ![back](card_back_multilingual.webp) | [original-template]: ../Japanese%20sentences/ +[mpvacious-pr36]: https://github.com/Ajatt-Tools/mpvacious/pull/36 ## Included card types @@ -80,6 +90,16 @@ front), use `{sentence}` instead. Note that Yomichan can be a bit peculiar when deciding how much of a conjugated verb counts as "part" of the verb, so double check that you're happy with the automatic highlighting. +Note that Yomichan will happily include the URL (and screenshot) of the +standalone search window (such as when you're using the clipboard monitor with +mpvacious), which isn't very useful. The card type has some JavaScript which +will auto-hide URLs that have the `moz-extension://` protocol (as well as +images if there was only `moz-extension://` URL sources from Yomichan), but +you'll need to make sure you use the format described above -- it will only +work if it's wrapped in a `id="yomichan-source"` node. Alternatively, you can +create a conditional profile for `moz-extension://` pages in Yomichan so that +URLs aren't included when using the search window (this is what I do). + ## Japanese Support settings If you use the [Japanese Support add-on][anki-jpn], make sure to modify diff --git a/templates/Japanese Mined Sentences (cyphar)/card_back_monolingual.webp b/templates/Japanese Mined Sentences (cyphar)/card_back_monolingual.webp index 1cf918e..0b98716 100644 Binary files a/templates/Japanese Mined Sentences (cyphar)/card_back_monolingual.webp and b/templates/Japanese Mined Sentences (cyphar)/card_back_monolingual.webp differ diff --git a/templates/Japanese Mined Sentences (cyphar)/card_back_multilingual.webp b/templates/Japanese Mined Sentences (cyphar)/card_back_multilingual.webp index 982cb49..bd7ac50 100644 Binary files a/templates/Japanese Mined Sentences (cyphar)/card_back_multilingual.webp and b/templates/Japanese Mined Sentences (cyphar)/card_back_multilingual.webp differ diff --git a/templates/Japanese Mined Sentences (cyphar)/template.json b/templates/Japanese Mined Sentences (cyphar)/template.json index 694ee71..2d34137 100644 --- a/templates/Japanese Mined Sentences (cyphar)/template.json +++ b/templates/Japanese Mined Sentences (cyphar)/template.json @@ -1,5 +1,5 @@ { - "modelName": "Japanese Mined Sentences (cyphar)", + "modelName": "Japanese Mined Sentences", "inOrderFields": [ "SentKanji", "SentFurigana", @@ -15,6 +15,7 @@ "VocabAudio", "Image", "Notes", + "Source", "MakeProductionCard" ], "css": "@font-face {font-family: \"KanjiStrokeOrders\"; src: url('_kso.ttf'); }\n@font-face {font-family: \"Yu Mincho\"; src: url(\"_yumin.ttf\"); }\n@font-face {font-family: \"Yu Mincho\"; src: url(\"_yumindb.ttf\"); font-weight: 600; }\n\n* { box-sizing: border-box; padding: 0; margin: 0; }\n.card {\n\tbackground-color: #FFFAF0;\n\tcolor: #2A1B0A;\n\tfont-family:\t\"Noto Serif\",\n\t\t\t\t\t\t\t\t\t\"Noto Serif CJK JP\",\n\t\t\t\t\t\t\t\t\tYu Mincho,\n\t\t\t\t\t\t\t\t\t\"Liberation Serif\",\n\t\t\t\t\t\t\t\t\t\"Times New Roman\",\n\t\t\t\t\t\t\t\t\tTimes,\n\t\t\t\t\t\t\t\t\tGeorgia,\n\t\t\t\t\t\t\t\t\tSerif;\n\tfont-size: 24px;\n\ttext-align: left;\n\tline-height: 1.4;\n}\n.card1 { }\n.card2 .jpsentence ruby rt { opacity: 0; }\n.card2 .jpsentence:hover ruby rt { opacity: 1; }\n\nhr { margin: 2px 0; clear: both; }\nb { font-weight: 600; }\n\n/* links */\na { color: #585858; }\na:hover { color: #222; }\na.hint { text-decoration: none; text-align: center; display: block; }\n\n/* Hide furigana on front */\nnokana ruby rt { opacity:0.0; font-size:0; display: none; }\nnotext b { background-color: black; color:transparent; }\n\n/* Top */\nheader { font-size: 14px; line-height: 14px; clear: both; }\n\n/* Space between elements */\n.images { margin-top: 16px; }\n.images > img { margin-bottom: 16px; }\n\n/* Japanese sentence */\n.jpsentence { font-size: 35px; }\n\n.tags {\n\tfont-family: \"Noto Sans\", \"Noto Sans CJK JP\", \"Liberation Sans\", Arial, Sans, sans-serif;\n\ttext-align: center;\n\tdisplay: inline-block;\n\ttext-transform: lowercase;\n\tbackground-color: #333;\n\tcolor: #FFFAF0;\n\tfont-weight: bold;\n\tpadding: 1px 3px;\n\tmargin: 0;\n\tcursor: pointer;\n\tborder-radius: 3px;\n\tfont-size: 12px;\n\tline-height: 14px;\n}\n\n/* AnkiDroid peplay button */\n.replaybutton { margin: 0; margin-right: 3px; text-decoration: none; }\n.replaybutton span { padding: 0; font-size: 16px; }\n.replaybutton span svg {\n\tfill: #FFFAF0;\n\tbackground: #333;\n\tborder-radius: 3px;\n\tvertical-align: top; \n\tmin-width: 16px;\n\tmin-height: 16px;\n}\n\n/* PC peplay button */\na.replay-button { top: -.125em; position: relative; }\na.replay-button svg {\n\theight: 1em;\n\twidth: 1em;\n}\na.replay-button svg path { fill: #FFFAF0; }\na.replay-button svg circle { fill: #333; }\n\nfooter { font-size: 16px; text-align: center; }\nfooter>a { text-decoration: none; }\n\n.vocab { margin-top: 16px; }\n.vocab div { display: inline-block; }\n.vocab br { display: none; }\n.vocab > .tags { vertical-align: top; }\n.notes > .tags { vertical-align: bottom; }\n\n.images {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex-direction: row;\n\talign-items: flex-start;\n\talign-content: space-between;\n\tjustify-content: space-evenly;\n}\n.images > img {\n\tmax-width: 47%;\n\tborder-radius: 4px;\n\tfilter: sepia(33%);\n}\n.images>img:only-child {\n max-width: 100%;\n}\n\n/* Production cards */\n.production b { visibility: hidden; }\n.strokeorder {\n\ttext-align: center;\n\tfont-size: 150px;\n\tfont-family: KanjiStrokeOrders;\n}\n\n/* Morphman coloring */\n.fside .jpsentence:hover [mtype=unknown] { background-color: #ffff99; }\n.fside .jpsentence:hover [mtype=seen] { background-color: #ffd1b3; }\n.fside .jpsentence:hover [mtype=known] { background-color: #b3e6cc; }\n.fside .jpsentence:hover [mtype=mature] { background-color: transparent; }\n.fside .jpsentence:hover [priority=true] { }\n.fside .jpsentence:hover [frequency=true] { }\n\ndel.MorphManHide {display:none;}\n\n/* Fix for Yomichan defs */\nul, ol {\n list-style-type: none; \n display: inline;\n margin: 0px;\n padding: 0px;\n}\n/* Fix for Yomichan pitch accents */\n.vocab ol > li { display: inline; }\n.vocab ol > li:after { content: \"\u30fb\"; }\n.vocab ol > li:last-child:after { content: \"\"; }", @@ -22,7 +23,7 @@ { "Name": "Recognition", "Front": "\n\n
\n\t{{#MorphManFocus}}\n\t\t
{{MorphManFocus}}
\n\t{{/MorphManFocus}}\n\t{{#Tags}}\n\t\t
{{Tags}}
\n\t{{/Tags}}\n
\n\n
\n\t{{morphHighlight:furigana:SentKanji}}\n\t{{^SentKanji}}\n\t\t{{kanji:SentFurigana}}\n\t{{/SentKanji}}\n
\n\n
\n\t
{{VocabPitchNum}}
\n\t
{{kana:VocabFurigana}}
\n
\n\n", - "Back": "
{{FrontSide}}
\n
\n
\n\t{{edit:furigana:SentFurigana}}\n\t{{^SentFurigana}}{{furigana:SentKanji}}{{/SentFurigana}}\n
\n\n{{#SentEng}}\n\t
\n\t\t{{hint:SentEng}}\n\t
\n{{/SentEng}}\n\n
\n{{VocabAudio}}{{SentAudio}}\n{{VocabPitchPattern}}{{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}\n{{#VocabPitchNum}}{{VocabPitchNum}}{{/VocabPitchNum}}{{#VocabKanji}}\u3010{{VocabKanji}}\u3011{{/VocabKanji}}\n
\n\n{{#VocabDefMonolingual}}\n
{{edit:furigana:VocabDefMonolingual}}
\n{{/VocabDefMonolingual}}\n\n{{#VocabDef}}\n{{#VocabDefMonolingual}}\n
{{edit:hint:furigana:VocabDef}}
\n{{/VocabDefMonolingual}}\n{{^VocabDefMonolingual}}\n
{{edit:furigana:VocabDef}}
\n{{/VocabDefMonolingual}}\n{{/VocabDef}}\n\n{{#Notes}}\t\n
\n\t
Notes
\n\t
{{furigana:Notes}}
\n
\n{{/Notes}}\n\n{{#Image}}
{{Image}}
{{/Image}}\n\n
\n\n" + "Back": "
{{FrontSide}}
\n
\n
\n\t{{edit:furigana:SentFurigana}}\n\t{{^SentFurigana}}{{furigana:SentKanji}}{{/SentFurigana}}\n
\n\n{{#SentEng}}\n\t
\n\t\t{{hint:SentEng}}\n\t
\n{{/SentEng}}\n\n
\n{{VocabAudio}}{{SentAudio}}\n{{VocabPitchPattern}}{{^VocabPitchPattern}}{{kana:VocabFurigana}}{{/VocabPitchPattern}}\n{{#VocabPitchNum}}{{VocabPitchNum}}{{/VocabPitchNum}}{{#VocabKanji}}\u3010{{VocabKanji}}\u3011{{/VocabKanji}}\n
\n\n{{#VocabDefMonolingual}}\n
{{edit:furigana:VocabDefMonolingual}}
\n{{/VocabDefMonolingual}}\n\n{{#VocabDef}}\n{{#VocabDefMonolingual}}\n
{{edit:hint:furigana:VocabDef}}
\n{{/VocabDefMonolingual}}\n{{^VocabDefMonolingual}}\n
{{edit:furigana:VocabDef}}
\n{{/VocabDefMonolingual}}\n{{/VocabDef}}\n\n{{#Notes}}\t\n
\n\t
Notes
\n\t
{{furigana:Notes}}
\n
\n{{/Notes}}\n\n{{#Image}}
{{Image}}
{{/Image}}\n\n\n
\n\n\n" }, { "Name": "Production", diff --git a/templates/Japanese Mined Sentences (cyphar)/yomichan_settings.webp b/templates/Japanese Mined Sentences (cyphar)/yomichan_settings.webp index 0c37908..845080a 100644 Binary files a/templates/Japanese Mined Sentences (cyphar)/yomichan_settings.webp and b/templates/Japanese Mined Sentences (cyphar)/yomichan_settings.webp differ