Don't include requirejs twice.
Add imagesLoaded so Masonry lays-out correctly.
Make the layout work with both Masonry and without JS.
First effort at embedding pdfs.
Generate the html pages on the server side from templates to keep things DRY.
Rebase with master to get the previous style and cleanup updates. Mesh the branches.
Merge conflicts.