Pull Javascript out into individual files
When rendering it's all pulled into a single minified file
diff --git a/static/js/email.js b/static/js/email.js
new file mode 100644
index 0000000..90b736e
--- /dev/null
+++ b/static/js/email.js
@@ -0,0 +1,21 @@
+// Unmangle email addresses on page load
+
+function unmangleEmail(){
+ var e = document.querySelectorAll(".email");
+ for (var i = 0; i < e.length; i++) {
+ var email = e[i].getAttribute("data-email")
+ var title = e[i].getAttribute("data-title")
+ if (email){
+ e[i].href = email.split("").reverse().join("");
+ e[i].removeAttribute("data-email");
+ e[i].removeAttribute("data-title");
+ e[i].removeAttribute("class");
+ if (title){
+ e[i].setAttribute("title", title);
+ }
+ else{
+ e[i].removeAttribute("title");
+ }
+ }
+ }
+}
diff --git a/static/js/scroll.js b/static/js/scroll.js
new file mode 100644
index 0000000..6ec5f38
--- /dev/null
+++ b/static/js/scroll.js
@@ -0,0 +1,8 @@
+// Scroll past header on smaller screens
+
+function skipHeader(){
+ if (window.location.pathname != '/' && window.location.pathname != '/index.html'){
+ window.scroll(0, document.getElementById('main').offsetTop);
+ }
+}
+