Permalink
Browse files

added win condition (learned all the presidents)

  • Loading branch information...
1 parent 92d4988 commit 0e62b59c1e028a65431a09c4ee198165f2f795f8 @electronicwhisper committed May 14, 2012
Showing with 24 additions and 8 deletions.
  1. +16 −3 index.html
  2. +7 −4 js/app.js
  3. +1 −1 readme.md
View
@@ -83,10 +83,15 @@ <h2 class="head">Review Your Path</h2>
<a href="#project={{projectID}}">
<div class="force-size">
<img class="i1" src="{{#project}}{{image}}{{/project}}" />
- <img class="i2" src="images/{{#president}}{{image}}{{/president}}" />
+ {{#president}}
+ <img class="i2" src="images/{{image}}" />
+ {{/president}}
</div>
- {{#project}}{{title}}{{/project}}&nbsp;=&nbsp;{{#president}}{{name}}{{/president}}
+ {{#project}}{{title}}{{/project}}
+ {{#president}}
+ &nbsp;=&nbsp;{{name}}
+ {{/president}}
</a>
</div>
{{/associations}}
@@ -114,14 +119,22 @@ <h2 class="head">Welcome to Loci - Your Real World Memory Palace</h2>
+<script id="win" type="text/html">
+<h2 class="head">No more presidents!</h2>
+<div class="content">
+<p>Congratulations! You have learned all the US presidents.</p>
+</div>
+</script>
+
+
+
<script id="about" type="text/html">
<h2 class="head">About Loci</h2>
<div class="content">
<p><a href="http://locimind.com"><b>Loci</b></a> turns your environment into a real life <b>Memory Palace </b>- helping you learn and remember whatever you want. It was developed by Maria Rabinovich as a learning application for the mobile phone. Here at the <b>ITP show</b> you can use Loci to learn about the presidents of the United States, using QR codes, but it usually runs on your mobile phone and uses GPS, allowing you to turn your walks or commute into a learning experience. Visit Maria in the app room to talk to her about this project.</p>
</div>
</script>
-
<script id="scan" type="text/html">
<h2 class="head">Scan a Loci QR Code!</h2>
<div class="content">
View
@@ -51,12 +51,15 @@ function loadPage() {
$("#content").append(html);
} else {
var num = projects.indexOf(project); // which number (i.e. president) we're on
-
- // TODO: check that presidents isn't overflowed, show "win" info
-
+
var presidentHTML = ich.president(presidentsDB[num]);
var projectHTML = ich.project(projectsDB[project]);
-
+
+ if (num >= presidentsDB.length) {
+ // learned all the presidents!
+ presidentHTML = ich.win({});
+ }
+
$("#content").append(projectHTML);
$("#content").append(presidentHTML);
}
View
@@ -22,7 +22,7 @@ This is the URL that we send to people's emails for their future reference. When
### `/#about` and `/#scan` and `#success`
-Just static pages. But change the words on the success page (`index.html` lines 132-137). And redirect the php mailer to `/#success`.
+Just static pages. But change the words on the success page. And redirect the php mailer to `/#success`.
## `/clear.html`

0 comments on commit 0e62b59

Please sign in to comment.