Update server side templates to use Jinja

Dokku: https://jinja.dokku.hypothes.is

Jinja[1] is a far more front-end friendly tempting system that is similar to the language that Django[2] uses, (it also has analogs in PHP[3] and Node[4]) so it's familiar to a lot of people.

This pull request...

* Swaps out chameleon for Jinja across the board.
* Moves angular templates, layouts and helpers into their own directories.
* Renames embed.txt to embed.js to avoid confusion around the content type.
* Includes a custom Jinja extension for including raw content (used for including Angular templates).

[1] http://jinja.pocoo.org/docs/dev/
[2] https://docs.djangoproject.com/en/dev/topics/templates/
[3] http://twig.sensiolabs.org
[4] https://mozilla.github.io/nunjucks/
It adds a set of macros to the environment.

It was intended to be a collection of common blocks but it only holds the
auth dialog right now.

Whatever you do, don't inline that into a new app template because
webplatform needs to override it.

It would be fine to give it a better name and reference it directly from
the app template, though, rather than as `blocks[]`.
On Nov 4, 2014 2:38 AM, "Aron Carroll" <notifications@github.com> wrote:

> In h/subscribers.py:
>
> > @@ -15,7 +15,7 @@ def add_renderer_globals(event):
> >      event['service_url'] = request.route_url('api', subpath='')
> >
> >      # Set the blocks property to refer to the block helpers template
> > -    event['blocks'] = get_renderer('h:templates/blocks.pt').implementation()
> > +    # event['blocks'] = get_renderer('h:templates/blocks.pt').implementation()
>
> @hypothesis/developers
> <https://github.com/orgs/hypothesis/teams/developers> any idea what this
> is doing? I couldn't find it used anywhere...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hypothesis/h/pull/1628/files#r19795255>.
>