Responsive photonic crystal for the sensing of environmental pollutants