From bbac2b6393b97200f63e7a8cffbb5d94b23cb2e6 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Wed, 10 Sep 2014 16:31:23 -0700 Subject: [PATCH] add how links --- public/css/menu.css | 26 ++++++++- public/games.html | 1 + public/hft/assets/question-icon.svg | 9 +++ public/how.html | 85 ++++++++++++++++++++++++++++ public/scripts/showavailablegames.js | 15 ++++- 5 files changed, 131 insertions(+), 5 deletions(-) create mode 100644 public/hft/assets/question-icon.svg create mode 100644 public/how.html diff --git a/public/css/menu.css b/public/css/menu.css index 930c0b66..4510740d 100644 --- a/public/css/menu.css +++ b/public/css/menu.css @@ -116,16 +116,21 @@ h2 a:hover { justify-content: center; align-items: center; } -.hidden-msg { +.hidden-msg, +.unhidden-msg { position: fixed; z-index: 10; left: 0px; top: 0px; width: 100%; height: 100%; +} +.hidden-msg { display: none; } -.hidden-msg>div { + +.hidden-msg>div, +.unhidden-msg>div { position: absolute; left: 0px; top: 0px; @@ -146,12 +151,27 @@ h2 a:hover { align-content: center; align-items: center; } -.hidden-msg>div>div { +.hidden-msg>div>div, +.unhidden-msg>div>div { + width: 80%; background-color: #68F; color: white; padding: 2em; border-radius: 2em; } +.hidden-msg .strong, +.unhidden-msg .strong { + color: #F44; + text-shadow: + -0.1em -0.1em 0 #000, + 0.1em -0.1em 0 #000, + -0.1em 0.1em 0 #000, + 0.1em 0.1em 0 #000, + -0.1em 0.0em 0 #000, + 0.1em 0.0em 0 #000, + 0.0em -0.1em 0 #000, + 0.0em 0.1em 0 #000; +} .button-like { text-align: center; background-color: #CCC; diff --git a/public/games.html b/public/games.html index b2d25cce..b7866955 100644 --- a/public/games.html +++ b/public/games.html @@ -51,6 +51,7 @@
+
diff --git a/public/hft/assets/question-icon.svg b/public/hft/assets/question-icon.svg new file mode 100644 index 00000000..1d1c2c61 --- /dev/null +++ b/public/hft/assets/question-icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/how.html b/public/how.html new file mode 100644 index 00000000..0b5421dd --- /dev/null +++ b/public/how.html @@ -0,0 +1,85 @@ + + + + + + + HappyFunTimes + + + + +
+
+
+
+
+

HappyFunTimessuper-alpha

+
+
+
+

How To Play

+

+ All players must connect their phones to + the same WiFi as this computer then go to + happyfuntimes.net +

+
+
Got It!
+
+
+
+
+
+
+
Disconnected
(please re-start HappyFunTimes)
+
+
+
+
+
Exited
(over and out!)
SuperHappyFunTimes
+
+
+ + + + + diff --git a/public/scripts/showavailablegames.js b/public/scripts/showavailablegames.js index d1d1fd3e..82daccfb 100644 --- a/public/scripts/showavailablegames.js +++ b/public/scripts/showavailablegames.js @@ -231,8 +231,19 @@ requirejs( } }; - client.addEventListener('availableGames', handleAvailableGames); - client.sendCmd('getAvailableGames'); + if (gamemenu) { + client.addEventListener('availableGames', handleAvailableGames); + client.sendCmd('getAvailableGames'); + } + + (function() { + var elem = document.querySelector(".unhidden-msg"); + if (elem) { + elem.addEventListener('click', function() { + window.location.href = elem.getAttribute("target"); + }, false); + } + }()); });