forked from FooSoft/yomichan
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add single dictionary handlebars #814
Merged
jamesmaa
merged 21 commits into
yomidevs:master
from
StefanVukovic99:single-dictionary-handlebars
May 5, 2024
Merged
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
715cf37
add single dictionary handlebars
StefanVukovic99 65ac935
fix dicts with kanji in title
StefanVukovic99 2906d19
sort
StefanVukovic99 aa5579b
rename to single-glossary-XYZ
StefanVukovic99 484a088
add brief and no dict variants
StefanVukovic99 64dcc9e
add docs, only terms no kanji
StefanVukovic99 277bcf4
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 4677501
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 3b22826
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 21b02b6
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 0aaf6ef
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 56a97e7
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 c2a5bb2
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 8844610
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 2a3958d
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 a765327
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 9a4a69e
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 4e76423
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 1b35567
Merge branch 'master' into single-dictionary-handlebars
StefanVukovic99 9c9b01f
allow testing single dict handlebars
StefanVukovic99 dc75963
remove empty comment
StefanVukovic99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
59 changes: 59 additions & 0 deletions
59
ext/data/templates/anki-field-templates-upgrade-v33.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{{<<<<<<<}} | ||
{{~#*inline "glossary"~}} | ||
<div style="text-align: left;"> | ||
{{~#scope~}} | ||
{{~#if (op "===" definition.type "term")~}} | ||
{{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} | ||
{{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}} | ||
{{~#if (op ">" definition.definitions.length 1)~}} | ||
<ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}</li>{{~/each~}}</ol> | ||
{{~else~}} | ||
{{~#each definition.definitions~}}{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}{{~/each~}} | ||
{{~/if~}} | ||
{{~else if (op "===" definition.type "kanji")~}} | ||
{{~#if (op ">" definition.glossary.length 1)~}} | ||
<ol>{{#each definition.glossary}}<li>{{.}}</li>{{/each}}</ol> | ||
{{~else~}} | ||
{{~#each definition.glossary~}}{{.}}{{~/each~}} | ||
{{~/if~}} | ||
{{~/if~}} | ||
{{~/scope~}} | ||
</div> | ||
{{~/inline~}} | ||
{{=======}} | ||
{{~#*inline "glossary"~}} | ||
<div style="text-align: left;"> | ||
{{~#scope~}} | ||
{{~#if (op "===" definition.type "term")~}} | ||
{{~#unless (op "&&" selectedDictionary (op "!=" selectedDictionary definition.dictionary))~}} | ||
{{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} | ||
{{~/unless~}} | ||
{{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}} | ||
{{~#if (op ">" definition.definitions.length 1)~}} | ||
<ol> | ||
{{~#each definition.definitions~}} | ||
{{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} | ||
<li> | ||
{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} | ||
</li> | ||
{{~/unless~}} | ||
{{~/each~}} | ||
</ol> | ||
{{~else~}} | ||
{{~#each definition.definitions~}} | ||
{{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} | ||
{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} | ||
{{~/unless~}} | ||
{{~/each~}} | ||
{{~/if~}} | ||
{{~else if (op "===" definition.type "kanji")~}} | ||
{{~#if (op ">" definition.glossary.length 1)~}} | ||
<ol>{{#each definition.glossary}}<li>{{.}}</li>{{/each}}</ol> | ||
{{~else~}} | ||
{{~#each definition.glossary~}}{{.}}{{~/each~}} | ||
{{~/if~}} | ||
{{~/if~}} | ||
{{~/scope~}} | ||
</div> | ||
{{~/inline~}} | ||
{{>>>>>>>}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a QOL change with no functional change? I can't find the documentation for this 😅