Controlling shape and dimensions of pores in organic–inorganic films: nanocubes and nanospheres