Large-area nanofabrication and applications in advanced nanoelectronic and nanophotonic devices