@Rumo Or maybe I’m just thinking of the wrong thing
I would have imagined it as some text field, let’s say in the main settings, which contains HTML, similiar to a note field, and then in the template, you could include it like {{GlobalAnkiHeader}}
.
There’s a actually a secret feature in the Anki codebase, that is kinda like this. You can write to HTML to mw.col.conf["reviewExtra"]
, and it will be added to the template in the reviewer. I guess it qualifies more as a footer, because it is under the main qa
section, but it could also contain JS to insert HTML elements anywhere. You could also use it to define a <style></style>
section and have global CSS. However it only works on Desktop Anki.
@kleinerpirat I don’t even think Svelte is that complicated, especially compared to libraries like React, or Vue, or even trying to organize your code in plain JavaScript. In the end, it all feels very vanilla. If you have some spare time, you can try out the tutorial which is very well done. I think everybody who’s familiar with HTML+CSS+JS already, can easily pick it up.
All things aside, I think the power tools to create good templates is just one side of the coin. The other side would be a good platform to share templates with other people.