From 9f0253f62033f03adbcf08229cbb15b15e6edefe Mon Sep 17 00:00:00 2001 From: Jack Kinsey Date: Sun, 30 Apr 2017 19:28:09 -0400 Subject: [PATCH] (Mostly) finished adding content; fixed event catching in the menuOperator function --- about/index.html | 12 ++++++++++-- code/index.html | 12 ++++++++++-- index.html | 7 +++++-- js/script.js | 12 +++++++----- res/style.css | 31 +++++++++---------------------- writing/index.html | 12 ++++++++++-- 6 files changed, 51 insertions(+), 35 deletions(-) diff --git a/about/index.html b/about/index.html index 3bc28d9..a07165a 100644 --- a/about/index.html +++ b/about/index.html @@ -53,7 +53,7 @@
-

Project "Asterisk" beta

+

Project "Asterisk" beta

A small 3D game prototype developed in JavaScript for the browser with Three.js.I blogged about its development over the course of several weeks, but many details remain unrevealed.

@@ -72,7 +72,15 @@
diff --git a/index.html b/index.html index 5279276..f2d86a8 100644 --- a/index.html +++ b/index.html @@ -53,7 +53,7 @@
diff --git a/js/script.js b/js/script.js index e7ab2b6..f31e254 100644 --- a/js/script.js +++ b/js/script.js @@ -6,9 +6,7 @@ window.addEventListener('load', function() { var body = document.getElementsByTagName("body")[0]; var menuLoc = parseInt(getComputedStyle(menu).getPropertyValue("top")); - function menuOperator(position, token="") { - event.preventDefault(); - var node = event.currentTarget; + function menuOperator(node, position, token="") { menu.setAttribute("class", position); for(var i = 0; i < links.length; i++) { links[i].children[0].removeAttribute("class"); @@ -31,12 +29,16 @@ window.addEventListener('load', function() { for(var i = 0; i < links.length - 1; i++) { links[i].children[0].onclick = function(event) { - menuOperator("top"); + event.preventDefault(); + var node = event.currentTarget; + menuOperator(node, "top"); }; } for(var i = 0; i < home.length; i++) { home[i].onclick = function(event) { - menuOperator("middle", "home"); + event.preventDefault(); + var node = event.currentTarget; + menuOperator(node, "middle", "home"); } } }, false); diff --git a/res/style.css b/res/style.css index 316676b..27f3a38 100644 --- a/res/style.css +++ b/res/style.css @@ -1,9 +1,4 @@ @import url('https://fonts.googleapis.com/css?family=Cutive+Mono|Source+Code+Pro:300'); -/* pink:473a47 - * blue:004350 - * green:0c5b57 - * yellow:4b4432 - */ body { width:100%; @@ -76,7 +71,6 @@ header.middle #avatar { height:300px; margin-left:50px; margin-right:50px; - /*background-color:lightgrey;*/ } header.middle #avatar img { @@ -111,7 +105,6 @@ header.top #avatar { width:100px; height:50px; text-align:center; - /*background-color:lightgrey;*/ } header.top #avatar img { @@ -202,6 +195,15 @@ article div { margin:25px; } +em { + font-style:italic; +} + +em > em { + font-style:normal; + font-weight:bold; +} + article div h2 { margin-bottom:5px; font-size:1.5em; @@ -211,30 +213,15 @@ article div h2 a:link, article div h2 a:visited { color:inherit; } -article div h2 a:hover { -} - article div p { margin-top:5px; - font-weight:bold; } article div p a:link, article div p a:visited { color:inherit; } -article div p a:hover { -} - #about div { width:600px; margin:25px 100px 25px 100px; } - -#about div h2 { - -} - -#about div p { - -} diff --git a/writing/index.html b/writing/index.html index 2d57773..47774ad 100644 --- a/writing/index.html +++ b/writing/index.html @@ -53,7 +53,7 @@