Extract sidebar from template into JS. Makes it easier to drop into a page