Temporal gauge on a periodic lattice