Nanophotonic front electrodes for perovskite solar cells