A bioinspired poly(N-isopropylacrylamide)/silver nanocomposite as a photonic crystal with both optical and thermal responses.