start moving phots templates to jinja

the availability of logic makes it a lot easier to work with

add pager partial template, will look into moving other things to it too