Macroporous photonic crystal-based anti-ultraviolet and anti-near-infrared materials by doctor blade coating