Ah that would be because you need to declare the macros first! I only provided the code for one of these macros, as I was more just showing how it makes things more readable rather than providing nunjucks macros to use (though I might release some nunjucks snippets at some point!), but you can try out the tabButton macro I gave like so:
I'm glad to hear it was helpful for you, though, and I wish you luck with your website :)
Ah weird, the tab snippet gives me a render error on my end, saying stat isn't defined. I wonder if it's a browser/settings issue or something, as one of the scripts failed to load according to the inspector (also lots of font-awesome errors lmao); it explains why nothing I tried worked my first time around attempting this. Here I thought I was just completely confused on how macros worked. 🤣
Ah that's because I didnt provide the stats macro! Only the button example has all the parts to be tested I'm afraid, if I get chance though I'll recreate these macros again so they can be played with :)
EDIT: OH and the font awesome one I have fixed but forgot to push to the live version of the site as I'm currently working on a new layout let me go fix that ty for the reminder <3
Ah that would be because you need to declare the macros first! I only provided the code for one of these macros, as I was more just showing how it makes things more readable rather than providing nunjucks macros to use (though I might release some nunjucks snippets at some point!), but you can try out the tabButton macro I gave like so:
I'm glad to hear it was helpful for you, though, and I wish you luck with your website :)
5 months, 16 days ago Edited 5:06 am
Ah weird, the tab snippet gives me a render error on my end, saying stat isn't defined. I wonder if it's a browser/settings issue or something, as one of the scripts failed to load according to the inspector (also lots of font-awesome errors lmao); it explains why nothing I tried worked my first time around attempting this. Here I thought I was just completely confused on how macros worked. 🤣
5 months, 16 days ago
Ah that's because I didnt provide the stats macro! Only the button example has all the parts to be tested I'm afraid, if I get chance though I'll recreate these macros again so they can be played with :)
EDIT: OH and the font awesome one I have fixed but forgot to push to the live version of the site as I'm currently working on a new layout let me go fix that ty for the reminder <3
5 months, 16 days ago Edited 9:11 am