CodeForTucson / codefortucson-site

Current Code for Tucson website
http://www.codefortucson.org
GNU General Public License v2.0
3 stars 8 forks source link

Fix broken hamburger #61

Closed dmsnell closed 8 years ago

dmsnell commented 8 years ago

Fixes #48

In #39 we removed the JavaScript libraries pulled in by the site's template because they appeared to add 100K to the download size without providing any actual benefit.

Apparently Bootstrap was relying on the JavaScript to open the "hamburger" navigation menu when it was collapsed and clicked.

This patch loads the JavaScript back into the website, adding the overhead again in order to protect the functionality.

This lends more priority weight to #46 because it shows a fragile aspect of this site: we don't know where the dependencies exist in the code and don't have a good way to minimize the final static output.

Additionally, since we are adding this overhead, we can at least mitigate it by referencing CDN versions of the code in hopes that the visitors will have a locally-cached version of that file.

If it comes from our domain, then there will be no possibility for them to have cached the scripts from other sites that also use them.

cc: @meiqimichelle

meiqimichelle commented 8 years ago

:tada: :confetti_ball: :boom: :mouse: