-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82f25bb
commit 6c9f0af
Showing
6 changed files
with
337 additions
and
0 deletions.
There are no files selected for viewing
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,57 @@ | ||
<!-- Prettify by @pranavdeshai: Basic (back) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:Front}}</div> | ||
<hr class="prettify-divider prettify-divider--answer" id="answer" /> | ||
<div class="prettify-field prettify-field--back">{{edit:Back}}</div> | ||
{{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |
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,55 @@ | ||
<!-- Prettify by @pranavdeshai: Basic (front) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:Front}}</div> | ||
{{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |
57 changes: 57 additions & 0 deletions
57
src/templates/default/basic_reverse/basic_reverse-back.html
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,57 @@ | ||
<!-- Prettify by @pranavdeshai: Basic reverse (back) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:Front}}</div> | ||
<hr class="prettify-divider prettify-divider--answer" id="answer" /> | ||
<div class="prettify-field prettify-field--back">{{edit:Back}}</div> | ||
{{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |
55 changes: 55 additions & 0 deletions
55
src/templates/default/basic_reverse/basic_reverse-front.html
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,55 @@ | ||
<!-- Prettify by @pranavdeshai: Basic reverse (front) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:Front}}</div> | ||
{{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |
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,58 @@ | ||
<!-- Prettify by @pranavdeshai: Cloze (back) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:cloze:Text}}</div> | ||
<div class="prettify-divider prettify-divider--answer"></div> | ||
{{#Back Extra}} | ||
<div class="prettify-field prettify-field--back">{{Back Extra}}</div> | ||
{{/Back Extra}} {{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |
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,55 @@ | ||
<!-- Prettify by @pranavdeshai: Cloze (front) | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
--> | ||
<div class="prettify-flashcard"> | ||
<div class="prettify-deck">{{Deck}}</div> | ||
<div class="prettify-field prettify-field--front">{{edit:cloze:Text}}</div> | ||
{{#Tags}} | ||
<div class="prettify-tags">{{clickable:Tags}}</div> | ||
{{/Tags}} | ||
</div> | ||
|
||
<script> | ||
// Split hierarchical tags | ||
var tagsContainerEl = document.querySelectorAll('.prettify-tags > *') | ||
if (tagsContainerEl.length > 0) { | ||
var tags = [] | ||
tagsContainerEl.forEach((tagEl) => { | ||
tagEl.classList.add('prettify-tag') | ||
tags.push(tagEl.innerHTML) | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
tagEl.innerHTML = childTag[childTag.length - 1].trim() | ||
}) | ||
}) | ||
} else { | ||
tagsContainerEl = document.querySelector('.prettify-tags') | ||
var tags = tagsContainerEl.innerHTML.split(' ').filter(Boolean) | ||
var html = '' | ||
tags.forEach((tag) => { | ||
var childTag = tag.split('::').filter(Boolean) | ||
html += | ||
"<span class='prettify-tag'>" + | ||
childTag[childTag.length - 1] + | ||
'</span>' | ||
}) | ||
tagsContainerEl.innerHTML = html | ||
} | ||
|
||
// Breadcrumbs to current deck | ||
var deckEl = document.querySelector('.prettify-deck') | ||
var subDecks = deckEl.innerHTML.split('::').filter(Boolean) | ||
html = [] | ||
subDecks.forEach((subDeck) => { | ||
html.push("<span class='prettify-subdeck'>" + subDeck + '</span>') | ||
}) | ||
deckEl.innerHTML = html.join(' / ') | ||
</script> |