Flexible photonic crystals for strain sensing