more work on gllaery navbar and templating