Generates code for sliding news content