Precompute layouts for HTML viewer

Reduces loading time for web pages.
Added .gitignore