Try adding the following to the frontside posterior scripts (this should make F1 the hint shorcut):
(function(){
const defaultShortcuts = document.onkeydown;
document.onkeydown = function(e) {
var ev = window.event || e;
if (ev.key === 'F1') {
e.preventDefault();
typeHint();
return false;
}
if (typeof defaultShortcuts === 'function') {
return defaultShortcuts.call(this, e);
}
};
})();
The size is not a single thing, as it is contributed by multiple parameters, such as font size of a label, font size of field content, distance between the label and the content, size of the gap between different field sections, sizes of audio buttons and images, etc. What exactly would you like to change?
Thank you for your help with the solution of the inscription, after removing it, all the fields immediately automatically rose, which is what I needed, thank you As for my second question, I don’t fully understand what I need to reduce. I’m just a little uncomfortable with the fact that all the information I need doesn’t fit completely on the back (i.e., as I wrote earlier, I need to scroll with the mouse to see everything I’ve indicated). But when looking at your script, it helps me when I remove the following line <div class="card-content back"> in this script
<hr id="answer" class="sys">
<div id="backwrap" class="backside">
{{FrontSide}}
<button id="mem-flip" class="sys">flip</button>
<div class="card-content back">
<div class="mem-alert"></div>
what action this line performs, because I just noticed that after deleting it, the margins between the fields decreased
I realized that it would be enough for me to place the Picture field on the right parallel to the Learnable field and not under it, then I would be able to fit all the information. Can you help me with this? I have the following picture in mind:
It means that this shortcut is already taken by Anki itself, so you’ll just need to find a different one which is free to use for the Hint function.
Alternatively, if you are using the template support add-on you can try adding F1 to the list of reserved keys in the configs, to unbind its default functionality and make it available for use in card scripts.
This is a container for the whole backside of a card. This line and everything above fulfill several technical roles required by the scripts, so it’s not a good idea to modify their code. You can freely add, delete, move, or modify any elements inside this container. Or, if you want to remove the empty space above it, you can overwrite its default style by adding
.card-content {
padding-top: 0;
}
As for the backside fields themselves, a couple of styles that can help make them more compact:
Grid layouts can be fiddly, however, because of how many parameters are involved in defining their behavior, which depends on the content and the size of the window. So this might require quite a bit of further tweaking to get it right for every case.
THANK YOU so much Everything is working as it should, and the most important thing is that I am satisfied with everything to the maximum, which is very rare in reality (unfortunately) I just want you to know that you gave me the motivation to continue studying the case, with the help of anki. It was something I had been burning for a very long time, but eventually I didn’t have the energy to do it anymore, and I didn’t have the time either, and the anki design made the situation even worse (I just didn’t want to go back to those monotonous cards). But you have given me a second wind, so I am extremely grateful for your help. You are incredible!!! Thank you very much
If you are referring to multiple-choice questions with no front audio – paste the following code into the “user posterior scripts” section on the back template:
It’s nice to see someone put the green color theme to use)
You can try lowering the level of the top headers by changing <h2> tags to <h3> and <h3> to <h4>. To adjust the font size for all headers of a certain size, you can add the following rule to the “user styles” section at the end of the styling tab:
.mem-field h4 {
font-size: 0.75rem;
}
Adjust the header level and the font size accordingly.
There are also other parameters to adjust, such as font size of the labels, and different kinds of margins and line spacing, depending on how you would like the result to look.
Put this into “user prior scripts” section on the back side of the template. On desktop, if you are using the support add-on, you can also press Space after answer submission for a one-time display.
I added a new field called “Flip Delay” and set it to that + 1. Seems to work, though of course I need to set any phrases longer than 1 second to a value manually.
What about not autoflipping whilst audio is being played instead? The flipDelay thing works but I have thousands of notes to go through manually, and I’d rahter not.
As explained in the linked post, audio playback is handled by Anki in the background, so card scripts have no access to the current playback status and can’t flip based on that. You can still make a delay long enough for all cards and flip at the proper moment manually, or disable that Interrupt current audio when answering in global preferences. Also, since your flipDelay is already a dedicated field, if you are open to some scripting, automatically measuring durations of audio for each card should be relatively easy with ffprobe.