Main group element and metal-containing polymers as photoresponsive soft materials