Skip to content

Instantly share code, notes, and snippets.

@zzJinux
Last active July 15, 2019 09:20
Show Gist options
  • Save zzJinux/24273cec5237d403c9cee663c009f50e to your computer and use it in GitHub Desktop.
Save zzJinux/24273cec5237d403c9cee663c009f50e to your computer and use it in GitHub Desktop.
Anki: Basic note type

Front Template

<div class="deck-label">{{Deck}}</div>
<div class="field">{{Front}}</div>
{{Front}}

Back Template

<div id="front_side">{{FrontSide}}</div>
<hr>
<div class="field">{{Back}}</div>

Styling

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

div {
  overflow-wrap: initial;
}

.card {
  position: relative;
  overflow-wrap: initial;
  padding: 10px 20px;
  box-sizing: border-box;
  height: 100%;
  background-color: white;
}

.card1 > div {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: "D2Coding Ligature", D2Coding, Consolas, monospace;
  font-size: 20px;
  text-align: left;
  color: black;
}

.deck-label {
  color: grey;
  font-size: 12px;
  flex-basis: 0;
}

.field {
  white-space: pre;
  flex-grow: 1;
  overflow: auto;
  padding-bottom: 1em;
}

#front_side {
  display: flex;
  flex-direction: column;
}

hr {
  margin-left: 0;
  margin-right: 0;
}
@zzJinux
Copy link
Author

zzJinux commented Jul 15, 2019

_하_이

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment