Template preparation of NiPS3 polymer nanocomposites