Coordination-bond-driven fabrication of crack-free photonic crystals