Skip to content

Instantly share code, notes, and snippets.

@intellectronica
Last active March 16, 2025 15:37
Show Gist options
  • Save intellectronica/7cf88b375b26006fefefb9d74592eb04 to your computer and use it in GitHub Desktop.
Save intellectronica/7cf88b375b26006fefefb9d74592eb04 to your computer and use it in GitHub Desktop.
Pretty (and dark) Anki "Basic" note type template
{{FrontSide}}
{{#Back}}
<div class="face" id="answer">
<div class="target-sentence">{{Back}}</div>
</div>
{{/Back}}
<div class="face" id="identifiers">
<span id="deckName">{{Deck}}</span>&nbsp;&nbsp;&nbsp;<i>{{Tags}}</i>
</div>
<div class="face" id="question">
{{Front}}
</div>
<script>
var element = document.getElementById("deckName");
element.innerHTML = element.innerHTML.replace("intellectronica::", "");
</script>
body {
background-color: #111;
font-family: Georgia, serif;
font-size: 20px;
font-weight: normal;
letter-spacing: 0.5px;
line-height: 140%;
}
.face {
margin: 0 auto;
padding-left: 30px;
padding-right: 30px;
max-width: 500px;
text-align: left;
border-radius: 8px;
box-shadow: 1px 1px 1px 1px #111;
}
#question, #question.night_mode {
padding-top: 10px;
padding-bottom: 10px;
color: #CCC;
margin-bottom: 10px;
background-color: #222;
}
#identifiers, #identifiers.night_mode {
font-size: 0.8em;
text-align: center;
padding-top: 5px;
padding-bottom: 5px;
color: #CCC;
margin-bottom: 10px;
background-color: #222;
}
#answer, #answer.night_mode {
padding-top: 10px;
padding-bottom: 10px;
color: #CCC;
margin-bottom: 10px;
background-color: #222;
text-align: left;
}
#answer .target-sentence{
margin-bottom: 20px;
}
blockquote {
margin-top: 3px !important;
margin-bottom: 3px !important;
margin-left: 3px !important;
margin-right: 5px !important;
font-size: 0.8em !important;
font-style: italic !important;
color: #AAA !important;
border-left: 2px solid #333 !important;
padding-left: 7px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment