Synthesis, Characterizations, and Optical Properties of Stacked Porous Thin Films Derived from Sol–Gel Process