Generate nav bar in JS + various optimizations

This allows for a more dynamic nav bar without inserting insanely huge
HTML code in the page (as the previous version did in some cases) and
without having to contact the server again.

The 'intro' man page has around 1500 versions, and only generates a page
of ~52KiB (~9.5KiB after compression). The previous HTML version was
106KiB (~10.3KiB after compression). Page generation times have been
improved on the server side (by 50ms for the intro man page), but I've
no idea how significant the effect is of JS is. Feels fast enough,
though.
This commit is contained in:
Yorhel 2012-07-02 16:23:43 +02:00
parent 1f4328a72c
commit 43eca4c20e
3 changed files with 122 additions and 54 deletions

View file

@ -16,8 +16,9 @@ dd { margin-left: 15px; }
a { color: #048; font-family: "Verdana"; font-weight: normal; text-decoration: underline; padding: 3px 5px;
-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; }
a:hover { text-decoration: none; background: #cde; }
table { background: #eee; border: 5px solid #f8f8f8; margin: 10px 0; }
td { padding: 1px 5px; font-size: 12px; }
table { background: #eee; border: 5px solid #f8f8f8; margin: 10px 0; border-collapse: collapse; }
thead tr { font-weight: bold; border-bottom: 1px solid #ccc }
td { padding: 1px 5px; font-size: 12px; border-left: 1px solid #ccc; }
#header { padding: 4px 20px; border-bottom: 1px solid #888; font: 24px "Arial";
-webkit-border-radius: 8px 8px 0 0; -moz-border-radius: 8px 8px 0 0; border-radius: 8px 8px 0 0;