Hi!
I want to change the Text color of the front card based on its status (New, Learning, Review). I have tried editing the CSS and Front HTML with AI but haven’t been successful. Thank you for any help!
<div class="card">
<div>{{Verb}}</div>
</div>
.card {
font-family: arial;
font-size: 20px;
text-align: center;
}
.card.new div {
color: blue !important;
}
.card.learning div {
color: green !important;
}
.card.review div {
color: coral !important;
}
Thank you for your guidance. Although I’m not sure where to start, at least the AI can guide me through the rest. Here’s the modified code for anyone with similar needs.
Custom scheduling:
// expose states
e = document.createElement("script")
e.text = 'var states=' + JSON.stringify(states)
document.body.appendChild(e)
// add ankiState_* to body class, e.g. ankiState_new
ankiState = Object.keys(states.current.normal).shift()
document.body.classList.add('ankiState_' + ankiState)
// Add classes for review and learning states
if (states.current.review) {
document.body.classList.add('ankiState_review')
}
if (states.current.learning) {
document.body.classList.add('ankiState_learning')
}