I hope it’s ok to revive this—I just spent a few hours writing an extensive post asking for this exact feature, specifically in order to distinguish new cards from other types of cards, both on desktop and mobile. Right before I posted it, I decided to search the forums to see if someone else had asked for it, and found Dae’s solution here. OP probably doesn’t need this, but if someone else is looking for a solution and you don’t really know any javascript, here’s something basic to get you started:
In the “Custom scheduling” section at the bottom of the deck options menu (edit: use Edit 5 instead):
if (states.current.normal?.new) {
const new_tag = document.createElement("style");
new_tag.innerHTML = ".notifier::before {content: 'NEW! '; color: blue; font-size: 60%; white-space: pre;}";
document.body.appendChild(new_tag);
}
On the card template:
<div class="notifier">{{Your Field Here}}</div>
All the javascript is doing is adding a <style>
element to new cards, so you can customize the line new_tag.innerHTML = "...";
with CSS accordingly (say, if you wanted to change the card’s background color instead: new_tag.innerHTML = ".card {background-color: blue;}";
). Note that the tag won’t appear in preview, but it works when you actually see the card during review.
I am not a programmer, so there is probably a better way to write this particular solution—but hopefully, this will give someone with even less coding experience than me a good place to start.
ETA: Unfortunately, this isn’t working completely as I expected; at least on Anki mobile, cards are still marked as “new” after already being rated “again” for the first time. I do think OP’s original suggestion would be very helpful to people who don’t know how to code—the CSS is a lot easier to figure out on your own than the javascript.
(A bunch of trial and error attempts)
Edit 2: Ugh, doesn’t work at all if new cards come first. Will try to fix.
Edit 3: A bit of brute force, but probably the best I will be able to do. Pro is, if you wanted to customize every card type, there you go. I’m worried about it slowing down Anki throughout a full review session, but will have to wait to test.
if (states.current.normal?.new) {
const new_tag = document.createElement("style");
new_tag.innerHTML = ".notifier::before {content: 'NEW! '; color: blue; font-size: 60%; white-space: pre;}";
document.body.appendChild(new_tag);
}
if (states.current.normal?.learning) {
const learning_tag = document.createElement("style");
learning_tag.innerHTML = ".notifier::before {content: '';}";
document.body.appendChild(learning_tag);
}
if (states.current.normal?.review) {
const review_tag = document.createElement("style");
review_tag.innerHTML = ".notifier::before {content: '';}";
document.body.appendChild(review_tag);
}
if (states.current.normal?.relearning) {
const relearning_tag = document.createElement("style");
relearning_tag.innerHTML = ".notifier::before {content: '';}";
document.body.appendChild(relearning_tag);
}
Edit 4: A probably better alternative to the above, but not working on the backs of cards. Not really an issue for me, so I might stop here.
Custom scheduling:
if (states.current.normal?.new) {
document.getElementById("notification").classList.add("notifier");
}
Card template:
<div id="notification">{{Your Field}}</div>
Styling:
.notifier::before {
content: "NEW! ";
color: blue;
font-size: 60%;
white-space: pre;
}
Edit 5: Haven’t tested this extensively, but I think it’s the best version so far.
Custom scheduling:
if (document.getElementById("notification") == null) {
const notification = document.createElement("style");
notification.setAttribute("id", "notification");
document.body.appendChild(notification);
}
if (states.current.normal?.new) {
document.getElementById("notification").innerHTML = ".notifier::before {content: 'NEW! '; color: blue; font-size: 60%; white-space: pre;}";
}
if (states.current.normal?.review) {
document.getElementById("notification").innerHTML = "";
}
if (states.current.normal?.learning) {
document.getElementById("notification").innerHTML = "";
}
if (states.current.normal?.relearning) {
document.getElementById("notification").innerHTML = "";
}
Card template:
<div class="notifier">{{Your Field}}</div>