Time-dependent density-functional theory for extended systems