Is there a way to use pug
with Django
when the pug templates use mixins that receive arguments? I'm trying to use pypugjs
to create django templates from pug templates.
e.g: I have a template with the following mixin syntax:
+navbar({
navbarBg: 'bg-transparent',
navbarStyle: 'navbar-dark',
navbarBrandColor: 'text-white',
navbarBtnColor: 'btn-teal',
navbarContainer: 'container',
navbarPosition: 'fixed-top'
})
which gives the following error:
unexpected token "attrs" in file sb-ui-kit-pro/src/pug/pages/index.pug on line 18
If I reformat the mixin block to the following (so that the mixin is all on one line):
+navbar({ navbarBg: 'bg-transparent', navbarStyle: 'navbar-dark', navbarBrandColor: 'text-white', navbarBtnColor: 'btn-teal', navbarContainer: 'container', navbarPosition: 'fixed-top' })
then I get the following error:
The mixin blocks are not supported yet.
Are there any alternative approaches or workarounds?