Skip to content
Browse files

Started working on quiz per day.

  • Loading branch information...
1 parent f3c10de commit 7e3b6fd64a553e2ba51149a7559e590a207d5832 @Wylan Wylan committed Apr 27, 2012
Showing with 343 additions and 110 deletions.
  1. +4 −110 index.html
  2. +19 −0 js/script.js
  3. +213 −0 quiz/04-28-2012.html
  4. +107 −0 quiz/index.html
View
114 index.html
@@ -48,133 +48,27 @@
<body>
- <div id="quizone" data-role="page" data-theme="a">
+ <div id="one" data-role="page" data-theme="a">
<div data-role="header" data-position="fixed">
- <h1>Quizzes</h1>
+ <h1>Welcome</h1>
</div><!-- /header -->
<div data-role="content">
- <p id="score">Score: 0</p>
-
- <ul data-role="listview" data-inset="true">
- <li data-role="list-divider">Past</li>
- <li><a href="#pagequiz1">Episode 1 Quiz</a></li>
- <li data-role="list-divider">Present</li>
- <li><a href="#pagequiz2">Episode 5 Quiz</a></li>
- <li data-role="list-divider">Future</li>
- <li><a href="#pagequiz3">Episode 6 Quiz</a></li>
- </ul>
+ <p>If I wasnt lazy there would be something here! For now try click Quiz</p>
</div><!-- /content -->
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="iten.html">Itinerary</a></li>
- <li><a href="index.html" class="ui-btn-active">Quiz</a></li>
+ <li><a onclick="getTodaysQuiz()">Quiz</a></li>
<li><a href="bio.html">Bio</a></li>
</ul>
</div><!-- /navbar -->
</div><!-- /footer -->
</div><!-- /page one -->
-
- <div id="pagequiz1" class="quizpage" data-role="page" data-theme="a">
-
- <div data-role="header">
- <h1>Quiz 1</h1>
- </div><!-- /header -->
-
- <div data-role="content" id="quiz1" class="quizcontent">
- <h1 class="hide banner right">Correct!</h1>
- <h1 class="hide banner wrong">Incorrect!</h1>
- <p>What planet was Anakin Skywalker born on?</p>
-
- <ul data-role="listview" data-inset="true">
- <li><a class="right answer" href="#">Tattooine</a></li>
- <li><a class="wrong answer" href="#">Earth</a></li>
- <li><a class="wrong answer" href="#">Alderaan</a></li>
- <li><a class="wrong answer" href="#">Corellia</a></li>
- <li><a class="wrong answer" href="#">Coruscant</a></li>
- </ul>
- </div><!-- /content -->
-
- <div data-role="footer" data-id="foot" data-position="fixed">
- <div data-role="navbar">
- <ul>
- <li><a href="iten.html">Itinerary</a></li>
- <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
- <li><a href="bio.html">Bio</a></li>
- </ul>
- </div><!-- /navbar -->
- </div><!-- /footer -->
-
- </div><!-- /quiz one -->
-
- <div id="pagequiz2" class="quizpage" data-role="page" data-theme="a">
-
- <div data-role="header">
- <h1>Quiz 2</h1>
- </div><!-- /header -->
-
- <div data-role="content" id="quiz2" class="quizcontent">
- <h1 class="hide banner right">Correct!</h1>
- <h1 class="hide banner wrong">Incorrect!</h1>
- <p>Who is Luke Skywalker's father?</p>
-
- <ul data-role="listview" data-inset="true">
- <li><a class="wrong answer" href="#">Obi Wan</a></li>
- <li><a class="wrong answer" href="#">Jabba the Hutt</a></li>
- <li><a class="right answer" href="#">Darth Vader</a></li>
- <li><a class="wrong answer" href="#">Han Solo</a></li>
- <li><a class="wrong answer" href="#">Greedo</a></li>
- </ul>
- </div><!-- /content -->
-
- <div data-role="footer" data-id="foot" data-position="fixed">
- <div data-role="navbar">
- <ul>
- <li><a href="iten.html">Itinerary</a></li>
- <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
- <li><a href="bio.html">Bio</a></li>
- </ul>
- </div><!-- /navbar -->
- </div><!-- /footer -->
-
- </div><!-- /quiz2 -->
-
-
- <div id="pagequiz3" class="quizpage" data-role="page" data-theme="a">
-
- <div data-role="header">
- <h1>Quiz 3</h1>
- </div><!-- /header -->
-
- <div data-role="content" id="quiz3" class="quizcontent">
- <h1 class="hide banner right">Correct!</h1>
- <h1 class="hide banner wrong">Incorrect!</h1>
- <p>The creatures that help the rebels on Endor are called...</p>
-
- <ul data-role="listview" data-inset="true">
- <li><a class="wrong answer" href="#">Jawas</a></li>
- <li><a class="wrong answer" href="#">Hutts</a></li>
- <li><a class="right answer" href="#">Ewoks</a></li>
- <li><a class="wrong answer" href="#">Storm Troopers</a></li>
- <li><a class="wrong answer" href="#">Tauntauns</a></li>
- </ul>
- </div><!-- /content -->
-
- <div data-role="footer" data-id="foot" data-position="fixed">
- <div data-role="navbar">
- <ul>
- <li><a href="iten.html">Itinerary</a></li>
- <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
- <li><a href="bio.html">Bio</a></li>
- </ul>
- </div><!-- /navbar -->
- </div><!-- /footer -->
-
- </div><!-- /quiz3 -->
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
View
19 js/script.js
@@ -1,3 +1,22 @@
+//function that either gets the quiz for today, or sends you to the page showing your score if there are none
+function getTodaysQuiz() {
+ // the date as a 8 digit number 04-27-2012
+ var fullDate = new Date();
+ //convert month to 2 digits
+ var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) : '0' + (fullDate.getMonth()+1);
+
+ var currentDate = twoDigitMonth + "-" + fullDate.getDate() + "-" + fullDate.getFullYear();
+ console.log(currentDate);
+ // new page url
+ var pageUrl = "quiz/" + currentDate + ".html";
+ // transition to that page if it exists, otherwise transition to no quizes page
+ console.log($.mobile.changePage(pageUrl, { transition: "slideup"} ));
+ if ($.mobile.changePage(pageUrl, { transition: "slideup"} ) == undefined) {
+ $.mobile.changePage("quiz/index.html", { transition: "fade"} )
+ };
+ //$.mobile.changePage(pageUrl, { transition: "slideup"} );
+};
+
$("#quizone").live("pageshow", function (event) {
var score = localStorage.getItem("score");
//localStorage.removeItem("score");
View
213 quiz/04-28-2012.html
@@ -0,0 +1,213 @@
+<!doctype html>
+<!-- Conditional comment for mobile ie7 blogs.msdn.com/b/iemobile/ -->
+<!--[if IEMobile 7 ]> <html class="no-js iem7" lang="en"> <![endif]-->
+<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js" lang="en" manifest="manifest.appcache"> <!--<![endif]-->
+
+<head>
+ <meta charset="utf-8">
+
+ <title>Quiz</title>
+ <meta name="description" content="">
+
+ <!-- Mobile viewport optimization h5bp.com/ad -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width">
+
+ <!-- Home screen icon Mathias Bynens mathiasbynens.be/notes/touch-icons -->
+ <!-- For iPhone 4 with high-resolution Retina display: -->
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/h/apple-touch-icon.png">
+ <!-- For first-generation iPad: -->
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/m/apple-touch-icon.png">
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
+ <link rel="apple-touch-icon-precomposed" href="img/l/apple-touch-icon-precomposed.png">
+ <!-- For nokia devices: -->
+ <link rel="shortcut icon" href="img/l/apple-touch-icon.png">
+
+ <!-- iOS web app, delete if not needed. https://github.com/h5bp/mobile-boilerplate/issues/94 -->
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black"> -->
+ <script>(function(){var a;if(navigator.platform==="iPad"){a=window.orientation!==90||window.orientation===-90?"img/startup-tablet-landscape.png":"img/startup-tablet-portrait.png"}else{a=window.devicePixelRatio===2?"img/startup-retina.png":"img/startup.png"}document.write('<link rel="apple-touch-startup-image" href="'+a+'"/>')})()</script>
+
+ <!-- The script prevents links from opening in mobile safari. https://gist.github.com/1042026 -->
+ <!-- <script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script> -->
+
+ <!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
+ <meta http-equiv="cleartype" content="on">
+
+ <!-- more tags for your 'head' to consider h5bp.com/d/head-Tips -->
+
+ <!-- Main Stylesheet -->
+ <link rel="stylesheet" href="css/style.css">
+ <!-- jQuery mobile stylesheet -->
+ <link rel="stylesheet" href="css/jquery.mobile-1.1.0.min.css">
+
+ <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
+ <script src="js/libs/modernizr-2.0.6.min.js"></script>
+</head>
+
+<body>
+
+ <div id="quizone" data-role="page" data-theme="a">
+
+ <div data-role="header" data-position="fixed">
+ <h1>Quizzes</h1>
+ </div><!-- /header -->
+
+ <div data-role="content">
+ <p id="score">Score: 0</p>
+
+ <ul data-role="listview" data-inset="true">
+ <li data-role="list-divider">Past</li>
+ <li><a href="#pagequiz1">Episode 1 Quiz</a></li>
+ <li data-role="list-divider">Present</li>
+ <li><a href="#pagequiz2">Episode 5 Quiz</a></li>
+ <li data-role="list-divider">Future</li>
+ <li><a href="#pagequiz3">Episode 6 Quiz</a></li>
+ </ul>
+ </div><!-- /content -->
+
+ <div data-role="footer" data-id="foot" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="iten.html">Itinerary</a></li>
+ <li><a href="index.html" class="ui-btn-active">Quiz</a></li>
+ <li><a href="bio.html">Bio</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /footer -->
+
+ </div><!-- /page one -->
+
+ <div id="pagequiz1" class="quizpage" data-role="page" data-theme="a">
+
+ <div data-role="header">
+ <h1>Quiz 1</h1>
+ </div><!-- /header -->
+
+ <div data-role="content" id="quiz1" class="quizcontent">
+ <h1 class="hide banner right">Correct!</h1>
+ <h1 class="hide banner wrong">Incorrect!</h1>
+ <p>What planet was Anakin Skywalker born on?</p>
+
+ <ul data-role="listview" data-inset="true">
+ <li><a class="right answer" href="#">Tattooine</a></li>
+ <li><a class="wrong answer" href="#">Earth</a></li>
+ <li><a class="wrong answer" href="#">Alderaan</a></li>
+ <li><a class="wrong answer" href="#">Corellia</a></li>
+ <li><a class="wrong answer" href="#">Coruscant</a></li>
+ </ul>
+ </div><!-- /content -->
+
+ <div data-role="footer" data-id="foot" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="iten.html">Itinerary</a></li>
+ <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
+ <li><a href="bio.html">Bio</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /footer -->
+
+ </div><!-- /quiz one -->
+
+ <div id="pagequiz2" class="quizpage" data-role="page" data-theme="a">
+
+ <div data-role="header">
+ <h1>Quiz 2</h1>
+ </div><!-- /header -->
+
+ <div data-role="content" id="quiz2" class="quizcontent">
+ <h1 class="hide banner right">Correct!</h1>
+ <h1 class="hide banner wrong">Incorrect!</h1>
+ <p>Who is Luke Skywalker's father?</p>
+
+ <ul data-role="listview" data-inset="true">
+ <li><a class="wrong answer" href="#">Obi Wan</a></li>
+ <li><a class="wrong answer" href="#">Jabba the Hutt</a></li>
+ <li><a class="right answer" href="#">Darth Vader</a></li>
+ <li><a class="wrong answer" href="#">Han Solo</a></li>
+ <li><a class="wrong answer" href="#">Greedo</a></li>
+ </ul>
+ </div><!-- /content -->
+
+ <div data-role="footer" data-id="foot" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="iten.html">Itinerary</a></li>
+ <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
+ <li><a href="bio.html">Bio</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /footer -->
+
+ </div><!-- /quiz2 -->
+
+
+ <div id="pagequiz3" class="quizpage" data-role="page" data-theme="a">
+
+ <div data-role="header">
+ <h1>Quiz 3</h1>
+ </div><!-- /header -->
+
+ <div data-role="content" id="quiz3" class="quizcontent">
+ <h1 class="hide banner right">Correct!</h1>
+ <h1 class="hide banner wrong">Incorrect!</h1>
+ <p>The creatures that help the rebels on Endor are called...</p>
+
+ <ul data-role="listview" data-inset="true">
+ <li><a class="wrong answer" href="#">Jawas</a></li>
+ <li><a class="wrong answer" href="#">Hutts</a></li>
+ <li><a class="right answer" href="#">Ewoks</a></li>
+ <li><a class="wrong answer" href="#">Storm Troopers</a></li>
+ <li><a class="wrong answer" href="#">Tauntauns</a></li>
+ </ul>
+ </div><!-- /content -->
+
+ <div data-role="footer" data-id="foot" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="iten.html">Itinerary</a></li>
+ <li><a href="index.html" data-rel="back" class="ui-btn-active">Quiz</a></li>
+ <li><a href="bio.html">Bio</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /footer -->
+
+ </div><!-- /quiz3 -->
+ <!-- JavaScript at the bottom for fast page loading -->
+
+ <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
+ <!--
+ Default settings for jQM need to to be loaded before jQM
+ -->
+ <script src="js/defaults.js"></script>
+
+ <script src="js/libs/jquery.mobile-1.1.0.min.js"></script>
+
+
+ <!-- scripts concatenated and minified via ant build script-->
+ <script src="js/helper.js"></script>
+ <script src="js/script.js"></script>
+
+ <script>
+ MBP.scaleFix();
+ </script>
+ <!-- end scripts-->
+
+ <!-- Debugger - remove for production -->
+ <!-- <script src="https://getfirebug.com/firebug-lite.js"></script> -->
+
+ <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
+ mathiasbynens.be/notes/async-analytics-snippet -->
+ <script>
+ var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
+ g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
+ s.parentNode.insertBefore(g,s)}(document,"script"));
+ </script>
+
+</body>
+</html>
View
107 quiz/index.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<!-- Conditional comment for mobile ie7 blogs.msdn.com/b/iemobile/ -->
+<!--[if IEMobile 7 ]> <html class="no-js iem7" lang="en"> <![endif]-->
+<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js" lang="en" manifest="manifest.appcache"> <!--<![endif]-->
+
+<head>
+ <meta charset="utf-8">
+
+ <title>Quiz</title>
+ <meta name="description" content="">
+
+ <!-- Mobile viewport optimization h5bp.com/ad -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width">
+
+ <!-- Home screen icon Mathias Bynens mathiasbynens.be/notes/touch-icons -->
+ <!-- For iPhone 4 with high-resolution Retina display: -->
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/h/apple-touch-icon.png">
+ <!-- For first-generation iPad: -->
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/m/apple-touch-icon.png">
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
+ <link rel="apple-touch-icon-precomposed" href="img/l/apple-touch-icon-precomposed.png">
+ <!-- For nokia devices: -->
+ <link rel="shortcut icon" href="img/l/apple-touch-icon.png">
+
+ <!-- iOS web app, delete if not needed. https://github.com/h5bp/mobile-boilerplate/issues/94 -->
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black"> -->
+ <script>(function(){var a;if(navigator.platform==="iPad"){a=window.orientation!==90||window.orientation===-90?"img/startup-tablet-landscape.png":"img/startup-tablet-portrait.png"}else{a=window.devicePixelRatio===2?"img/startup-retina.png":"img/startup.png"}document.write('<link rel="apple-touch-startup-image" href="'+a+'"/>')})()</script>
+
+ <!-- The script prevents links from opening in mobile safari. https://gist.github.com/1042026 -->
+ <!-- <script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script> -->
+
+ <!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
+ <meta http-equiv="cleartype" content="on">
+
+ <!-- more tags for your 'head' to consider h5bp.com/d/head-Tips -->
+
+ <!-- Main Stylesheet -->
+ <link rel="stylesheet" href="css/style.css">
+ <!-- jQuery mobile stylesheet -->
+ <link rel="stylesheet" href="css/jquery.mobile-1.1.0.min.css">
+
+ <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
+ <script src="js/libs/modernizr-2.0.6.min.js"></script>
+</head>
+
+<body>
+
+ <div id="one" data-role="page" data-theme="a">
+
+ <div data-role="header" data-position="fixed">
+ <h1>Welcome</h1>
+ </div><!-- /header -->
+
+ <div data-role="content">
+ <p>This page will hold the score for today, and the overall score</p>
+ </div><!-- /content -->
+
+ <div data-role="footer" data-id="foot" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="iten.html">Itinerary</a></li>
+ <li><a href="index.html">Quiz</a></li>
+ <li><a href="bio.html">Bio</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /footer -->
+
+ </div><!-- /page one -->
+ <!-- JavaScript at the bottom for fast page loading -->
+
+ <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
+ <!--
+ Default settings for jQM need to to be loaded before jQM
+ -->
+ <script src="js/defaults.js"></script>
+
+ <script src="js/libs/jquery.mobile-1.1.0.min.js"></script>
+
+
+ <!-- scripts concatenated and minified via ant build script-->
+ <script src="js/helper.js"></script>
+ <script src="js/script.js"></script>
+
+ <script>
+ MBP.scaleFix();
+ </script>
+ <!-- end scripts-->
+
+ <!-- Debugger - remove for production -->
+ <!-- <script src="https://getfirebug.com/firebug-lite.js"></script> -->
+
+ <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
+ mathiasbynens.be/notes/async-analytics-snippet -->
+ <script>
+ var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
+ g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
+ s.parentNode.insertBefore(g,s)}(document,"script"));
+ </script>
+
+</body>
+</html>

0 comments on commit 7e3b6fd

Please sign in to comment.
Something went wrong with that request. Please try again.