templates/layout: Fix a bunch of static paths to use url_for().

Fixes Leonardo being run on a non-root.