A templated electrosynthesis of macroporous NiAl layered double hydroxides thin films