diff options
author | Bryan Berry <bryan@olenepal.org> | 2009-11-02 20:07:34 (GMT) |
---|---|---|
committer | Bryan Berry <bryan@olenepal.org> | 2009-11-02 20:07:34 (GMT) |
commit | f0066c10b4c1983c745f01e8794ed029f2e2c654 (patch) | |
tree | 00bf5e02def3a6559708bb8a78c961f87e95f2b2 | |
parent | b0913303e8d049884d054826d5296ef09c486b58 (diff) |
now have both canvas and svg versions of adding_up
m--------- | examples/Conozco-Uruguay | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/css/knavbar.css (copied from examples/adding_up_to_10/css/knavbar.css) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/css/lesson.css (copied from examples/adding_up_to_10/css/lesson.css) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/exercise.html (renamed from examples/adding_up_to_10/exercise.html) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/index.html (copied from examples/adding_up_to_10/index.html) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/index_knavbar.html (copied from examples/adding_up_to_10/index_knavbar.html) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_canvas/js/lesson.js (renamed from examples/adding_up_to_10/js/lesson.js) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/en/sounds/en_correct.ogg (renamed from examples/adding_up_to_10/assets/en/sounds/en_correct.ogg) | bin | 12811 -> 12811 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/en/sounds/en_incorrect.ogg (renamed from examples/adding_up_to_10/assets/en/sounds/en_incorrect.ogg) | bin | 12683 -> 12683 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_correct.ogg (renamed from examples/adding_up_to_10/assets/es-MX/sounds/es-MX_correct.ogg) | bin | 14432 -> 14432 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_incorrect.ogg (renamed from examples/adding_up_to_10/assets/es-MX/sounds/es-MX_incorrect.ogg) | bin | 13705 -> 13705 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/ball37px.png (renamed from examples/adding_up_to_10/assets/generic/images/ball37px.png) | bin | 2745 -> 2745 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/balloon37px.png (renamed from examples/adding_up_to_10/assets/generic/images/balloon37px.png) | bin | 2020 -> 2020 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/banana37px.png (renamed from examples/adding_up_to_10/assets/generic/images/banana37px.png) | bin | 2063 -> 2063 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/chilli.png (renamed from examples/adding_up_to_10/assets/generic/images/chilli.png) | bin | 2692 -> 2692 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/fish64px.png (renamed from examples/adding_up_to_10/assets/generic/images/fish64px.png) | bin | 2515 -> 2515 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/flower37px.png (renamed from examples/adding_up_to_10/assets/generic/images/flower37px.png) | bin | 2957 -> 2957 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/happyChimp_120x125.png (renamed from examples/adding_up_to_10/assets/generic/images/happyChimp_120x125.png) | bin | 16261 -> 16261 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/happyMonkey.jpg (renamed from examples/adding_up_to_10/assets/generic/images/happyMonkey.jpg) | bin | 12348 -> 12348 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/normalChimp_120x125.png (renamed from examples/adding_up_to_10/assets/generic/images/normalChimp_120x125.png) | bin | 15326 -> 15326 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/plussign.png (renamed from examples/adding_up_to_10/assets/generic/images/plussign.png) | bin | 1080 -> 1080 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/sadChimp_120x125.png (renamed from examples/adding_up_to_10/assets/generic/images/sadChimp_120x125.png) | bin | 15698 -> 15698 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/scorebox.png (renamed from examples/adding_up_to_10/assets/generic/images/scorebox.png) | bin | 5015 -> 5015 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/sidebar.png (renamed from examples/adding_up_to_10/assets/generic/images/sidebar.png) | bin | 8189 -> 8189 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/images/yellowBox.png (renamed from examples/adding_up_to_10/assets/generic/images/yellowBox.png) | bin | 1524 -> 1524 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/sounds/correct.ogg (renamed from examples/adding_up_to_10/assets/generic/sounds/correct.ogg) | bin | 12359 -> 12359 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/sounds/incorrect.ogg (renamed from examples/adding_up_to_10/assets/generic/sounds/incorrect.ogg) | bin | 15542 -> 15542 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/generic/sounds/trigger.ogg (renamed from examples/adding_up_to_10/assets/generic/sounds/trigger.ogg) | bin | 10771 -> 10771 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/he/sounds/he_correct.ogg (renamed from examples/adding_up_to_10/assets/he/sounds/he_correct.ogg) | bin | 38612 -> 38612 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/he/sounds/he_incorrect.ogg (renamed from examples/adding_up_to_10/assets/he/sounds/he_incorrect.ogg) | bin | 51319 -> 51319 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/ne/sounds/ne_correct.ogg (renamed from examples/adding_up_to_10/assets/ne/sounds/ne_correct.ogg) | bin | 11930 -> 11930 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/assets/ne/sounds/ne_incorrect.ogg (renamed from examples/adding_up_to_10/assets/ne/sounds/ne_incorrect.ogg) | bin | 15827 -> 15827 bytes | |||
-rwxr-xr-x | examples/adding_up_to_10_svg/css/knavbar.css (renamed from examples/adding_up_to_10/css/knavbar.css) | 41 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/css/lesson.css (renamed from examples/adding_up_to_10/css/lesson.css) | 76 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/exercise.html (renamed from examples/adding_up_to_10/index.html) | 19 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/index.html | 84 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/index_knavbar.html (renamed from examples/adding_up_to_10/index_knavbar.html) | 4 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/js/lesson.js | 369 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/po/en.po (renamed from examples/adding_up_to_10/po/en.po) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/po/es-MX.po (renamed from examples/adding_up_to_10/po/es-MX.po) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/po/es.po (renamed from examples/adding_up_to_10/po/es.po) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/po/he-IL.po (renamed from examples/adding_up_to_10/po/he-IL.po) | 0 | ||||
-rwxr-xr-x | examples/adding_up_to_10_svg/resources.html (renamed from examples/adding_up_to_10/resources.html) | 0 |
43 files changed, 530 insertions, 63 deletions
diff --git a/examples/Conozco-Uruguay b/examples/Conozco-Uruguay new file mode 160000 +Subproject c81a6fba4aa94662019013a857c8bb875e15fc8 diff --git a/examples/adding_up_to_10/css/knavbar.css b/examples/adding_up_to_10_canvas/css/knavbar.css index 26e3896..26e3896 100755 --- a/examples/adding_up_to_10/css/knavbar.css +++ b/examples/adding_up_to_10_canvas/css/knavbar.css diff --git a/examples/adding_up_to_10/css/lesson.css b/examples/adding_up_to_10_canvas/css/lesson.css index 5147cfa..5147cfa 100755 --- a/examples/adding_up_to_10/css/lesson.css +++ b/examples/adding_up_to_10_canvas/css/lesson.css diff --git a/examples/adding_up_to_10/exercise.html b/examples/adding_up_to_10_canvas/exercise.html index eaf3d63..eaf3d63 100755 --- a/examples/adding_up_to_10/exercise.html +++ b/examples/adding_up_to_10_canvas/exercise.html diff --git a/examples/adding_up_to_10/index.html b/examples/adding_up_to_10_canvas/index.html index ea752d9..ea752d9 100755 --- a/examples/adding_up_to_10/index.html +++ b/examples/adding_up_to_10_canvas/index.html diff --git a/examples/adding_up_to_10/index_knavbar.html b/examples/adding_up_to_10_canvas/index_knavbar.html index e1e2fca..e1e2fca 100755 --- a/examples/adding_up_to_10/index_knavbar.html +++ b/examples/adding_up_to_10_canvas/index_knavbar.html diff --git a/examples/adding_up_to_10/js/lesson.js b/examples/adding_up_to_10_canvas/js/lesson.js index 852bd3f..852bd3f 100755 --- a/examples/adding_up_to_10/js/lesson.js +++ b/examples/adding_up_to_10_canvas/js/lesson.js diff --git a/examples/adding_up_to_10/assets/en/sounds/en_correct.ogg b/examples/adding_up_to_10_svg/assets/en/sounds/en_correct.ogg Binary files differindex a0d9e3a..a0d9e3a 100755 --- a/examples/adding_up_to_10/assets/en/sounds/en_correct.ogg +++ b/examples/adding_up_to_10_svg/assets/en/sounds/en_correct.ogg diff --git a/examples/adding_up_to_10/assets/en/sounds/en_incorrect.ogg b/examples/adding_up_to_10_svg/assets/en/sounds/en_incorrect.ogg Binary files differindex 4805e55..4805e55 100755 --- a/examples/adding_up_to_10/assets/en/sounds/en_incorrect.ogg +++ b/examples/adding_up_to_10_svg/assets/en/sounds/en_incorrect.ogg diff --git a/examples/adding_up_to_10/assets/es-MX/sounds/es-MX_correct.ogg b/examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_correct.ogg Binary files differindex a54f738..a54f738 100755 --- a/examples/adding_up_to_10/assets/es-MX/sounds/es-MX_correct.ogg +++ b/examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_correct.ogg diff --git a/examples/adding_up_to_10/assets/es-MX/sounds/es-MX_incorrect.ogg b/examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_incorrect.ogg Binary files differindex 0474b93..0474b93 100755 --- a/examples/adding_up_to_10/assets/es-MX/sounds/es-MX_incorrect.ogg +++ b/examples/adding_up_to_10_svg/assets/es-MX/sounds/es-MX_incorrect.ogg diff --git a/examples/adding_up_to_10/assets/generic/images/ball37px.png b/examples/adding_up_to_10_svg/assets/generic/images/ball37px.png Binary files differindex 4388283..4388283 100755 --- a/examples/adding_up_to_10/assets/generic/images/ball37px.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/ball37px.png diff --git a/examples/adding_up_to_10/assets/generic/images/balloon37px.png b/examples/adding_up_to_10_svg/assets/generic/images/balloon37px.png Binary files differindex 8f47d6a..8f47d6a 100755 --- a/examples/adding_up_to_10/assets/generic/images/balloon37px.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/balloon37px.png diff --git a/examples/adding_up_to_10/assets/generic/images/banana37px.png b/examples/adding_up_to_10_svg/assets/generic/images/banana37px.png Binary files differindex 90728e6..90728e6 100755 --- a/examples/adding_up_to_10/assets/generic/images/banana37px.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/banana37px.png diff --git a/examples/adding_up_to_10/assets/generic/images/chilli.png b/examples/adding_up_to_10_svg/assets/generic/images/chilli.png Binary files differindex 5f8b64d..5f8b64d 100755 --- a/examples/adding_up_to_10/assets/generic/images/chilli.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/chilli.png diff --git a/examples/adding_up_to_10/assets/generic/images/fish64px.png b/examples/adding_up_to_10_svg/assets/generic/images/fish64px.png Binary files differindex a29f12c..a29f12c 100755 --- a/examples/adding_up_to_10/assets/generic/images/fish64px.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/fish64px.png diff --git a/examples/adding_up_to_10/assets/generic/images/flower37px.png b/examples/adding_up_to_10_svg/assets/generic/images/flower37px.png Binary files differindex 224e707..224e707 100755 --- a/examples/adding_up_to_10/assets/generic/images/flower37px.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/flower37px.png diff --git a/examples/adding_up_to_10/assets/generic/images/happyChimp_120x125.png b/examples/adding_up_to_10_svg/assets/generic/images/happyChimp_120x125.png Binary files differindex 5e721c9..5e721c9 100755 --- a/examples/adding_up_to_10/assets/generic/images/happyChimp_120x125.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/happyChimp_120x125.png diff --git a/examples/adding_up_to_10/assets/generic/images/happyMonkey.jpg b/examples/adding_up_to_10_svg/assets/generic/images/happyMonkey.jpg Binary files differindex bfe0d38..bfe0d38 100755 --- a/examples/adding_up_to_10/assets/generic/images/happyMonkey.jpg +++ b/examples/adding_up_to_10_svg/assets/generic/images/happyMonkey.jpg diff --git a/examples/adding_up_to_10/assets/generic/images/normalChimp_120x125.png b/examples/adding_up_to_10_svg/assets/generic/images/normalChimp_120x125.png Binary files differindex a731df4..a731df4 100755 --- a/examples/adding_up_to_10/assets/generic/images/normalChimp_120x125.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/normalChimp_120x125.png diff --git a/examples/adding_up_to_10/assets/generic/images/plussign.png b/examples/adding_up_to_10_svg/assets/generic/images/plussign.png Binary files differindex 915c5aa..915c5aa 100755 --- a/examples/adding_up_to_10/assets/generic/images/plussign.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/plussign.png diff --git a/examples/adding_up_to_10/assets/generic/images/sadChimp_120x125.png b/examples/adding_up_to_10_svg/assets/generic/images/sadChimp_120x125.png Binary files differindex 1dec5f0..1dec5f0 100755 --- a/examples/adding_up_to_10/assets/generic/images/sadChimp_120x125.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/sadChimp_120x125.png diff --git a/examples/adding_up_to_10/assets/generic/images/scorebox.png b/examples/adding_up_to_10_svg/assets/generic/images/scorebox.png Binary files differindex 424b60b..424b60b 100755 --- a/examples/adding_up_to_10/assets/generic/images/scorebox.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/scorebox.png diff --git a/examples/adding_up_to_10/assets/generic/images/sidebar.png b/examples/adding_up_to_10_svg/assets/generic/images/sidebar.png Binary files differindex 9632788..9632788 100755 --- a/examples/adding_up_to_10/assets/generic/images/sidebar.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/sidebar.png diff --git a/examples/adding_up_to_10/assets/generic/images/yellowBox.png b/examples/adding_up_to_10_svg/assets/generic/images/yellowBox.png Binary files differindex f7a72ca..f7a72ca 100755 --- a/examples/adding_up_to_10/assets/generic/images/yellowBox.png +++ b/examples/adding_up_to_10_svg/assets/generic/images/yellowBox.png diff --git a/examples/adding_up_to_10/assets/generic/sounds/correct.ogg b/examples/adding_up_to_10_svg/assets/generic/sounds/correct.ogg Binary files differindex c89ce57..c89ce57 100755 --- a/examples/adding_up_to_10/assets/generic/sounds/correct.ogg +++ b/examples/adding_up_to_10_svg/assets/generic/sounds/correct.ogg diff --git a/examples/adding_up_to_10/assets/generic/sounds/incorrect.ogg b/examples/adding_up_to_10_svg/assets/generic/sounds/incorrect.ogg Binary files differindex 2306562..2306562 100755 --- a/examples/adding_up_to_10/assets/generic/sounds/incorrect.ogg +++ b/examples/adding_up_to_10_svg/assets/generic/sounds/incorrect.ogg diff --git a/examples/adding_up_to_10/assets/generic/sounds/trigger.ogg b/examples/adding_up_to_10_svg/assets/generic/sounds/trigger.ogg Binary files differindex f22512a..f22512a 100755 --- a/examples/adding_up_to_10/assets/generic/sounds/trigger.ogg +++ b/examples/adding_up_to_10_svg/assets/generic/sounds/trigger.ogg diff --git a/examples/adding_up_to_10/assets/he/sounds/he_correct.ogg b/examples/adding_up_to_10_svg/assets/he/sounds/he_correct.ogg Binary files differindex 4e12c65..4e12c65 100755 --- a/examples/adding_up_to_10/assets/he/sounds/he_correct.ogg +++ b/examples/adding_up_to_10_svg/assets/he/sounds/he_correct.ogg diff --git a/examples/adding_up_to_10/assets/he/sounds/he_incorrect.ogg b/examples/adding_up_to_10_svg/assets/he/sounds/he_incorrect.ogg Binary files differindex 9e314bb..9e314bb 100755 --- a/examples/adding_up_to_10/assets/he/sounds/he_incorrect.ogg +++ b/examples/adding_up_to_10_svg/assets/he/sounds/he_incorrect.ogg diff --git a/examples/adding_up_to_10/assets/ne/sounds/ne_correct.ogg b/examples/adding_up_to_10_svg/assets/ne/sounds/ne_correct.ogg Binary files differindex 8ced3cd..8ced3cd 100755 --- a/examples/adding_up_to_10/assets/ne/sounds/ne_correct.ogg +++ b/examples/adding_up_to_10_svg/assets/ne/sounds/ne_correct.ogg diff --git a/examples/adding_up_to_10/assets/ne/sounds/ne_incorrect.ogg b/examples/adding_up_to_10_svg/assets/ne/sounds/ne_incorrect.ogg Binary files differindex 106fe0f..106fe0f 100755 --- a/examples/adding_up_to_10/assets/ne/sounds/ne_incorrect.ogg +++ b/examples/adding_up_to_10_svg/assets/ne/sounds/ne_incorrect.ogg diff --git a/examples/adding_up_to_10/css/knavbar.css b/examples/adding_up_to_10_svg/css/knavbar.css index 26e3896..b39f205 100755 --- a/examples/adding_up_to_10/css/knavbar.css +++ b/examples/adding_up_to_10_svg/css/knavbar.css @@ -5,6 +5,12 @@ margin:0; padding:0; } +#knavbar { +display: table; +width: 800px; +margin: 0 auto; +} + nav { list-style: none; @@ -15,24 +21,6 @@ width:100%; background: #FFFFFF; } -nav li -{ -float: left; -} - -nav li a -{ -height: 63px; -text-align: center; -font-weight: bold; -font-size: 110%; -display: block; -color:#000000; -padding-left: 0.2em; -padding-right: 0.2em; -text-decoration: none; -} - nav img { border: none; @@ -109,6 +97,11 @@ img border: none; } +#lessonTitle +{ +display: block; +} + nav a:hover { text-decoration: underline; outline-width:1px; @@ -131,4 +124,16 @@ padding:0px; .icon_right { float: right; +} + +.floatLeft { + float: left; + margin-left: 5px; + margin-bottom: 5px; +} + +.floatRight { + float: right; + margin-right: 5px; + margin-bottom: 5px; }
\ No newline at end of file diff --git a/examples/adding_up_to_10/css/lesson.css b/examples/adding_up_to_10_svg/css/lesson.css index 5147cfa..e368b14 100755 --- a/examples/adding_up_to_10/css/lesson.css +++ b/examples/adding_up_to_10_svg/css/lesson.css @@ -1,32 +1,33 @@ +@charset "UTF-8"; -#main { +#karma-main { width:800px; height:600px; position:absolute; } -#action { + +#main { float:left; position:relative; width: 650px; height: 600px; } -#sidebar { +#side { background-image: url(../assets/generic/images/sidebar.png); --moz-background-clip:border; --moz-background-inline-policy:continuous; --moz-background-origin:padding; background:none none repeat scroll 0 0; float:left; height:600px; position:relative; width:150px; } -#actionTop { + +#top { width: 650px; height: 300px; position:relative; } + #bottom { clear:both; float:left; @@ -34,32 +35,26 @@ width: 650px; height: 300px; position:relative; } -#topLtSide { +#topLeftArea { float:left; width: 300px; height: 300px; position:relative; } -#topMd { --moz-background-clip:border; --moz-background-inline-policy:continuous; --moz-background-origin:padding; +#topMiddleArea { background:none none repeat scroll 0 0; float:left; width: 50px; height: 300px; position:relative; } -#topRtSide { +#topRightArea { float:left; width: 300px; height:300px; position:relative; } -#topLtBox { --moz-background-clip:border; --moz-background-inline-policy:continuous; --moz-background-origin:padding; +#topLeftCard { background:none none repeat scroll 0 0; width: 200px; height: 200px; @@ -68,22 +63,22 @@ position:absolute; top:50px; } -#topLtCanvas { --moz-background-clip:border; --moz-background-inline-policy:continuous; --moz-background-origin:padding; +#topLeftPaper { background:none none repeat scroll 0 0; position:absolute; top: 50px; left: 75px; +width:200px; +height:200px; } -#plussign { + +#plusSign { display: block; margin-left: auto; margin-right: auto; margin-top: 150px; } -#topRtBox { +#topRightCard { background: none none repeat scroll 0 0; width: 200px; height: 200px; @@ -91,18 +86,17 @@ position:absolute; right: 50px; top: 50px; } -#topRtCanvas { +#topRightPaper { background:none none repeat scroll 0 0; position:absolute; left: 50px; right:50px; top:50px; +width:200px; +height:200px; } .bottom { --moz-background-clip:border; --moz-background-inline-policy:continuous; --moz-background-origin:padding; background:none none repeat scroll 0 0; float:left; width: 216.5px; @@ -110,7 +104,7 @@ height: 300px; position:relative; } -.bottomBox { +.bottomCard { left:25px; position:absolute; width: 200px; @@ -118,7 +112,8 @@ position:relative; top: 20px; } -.sidebarItem { + +.sideItem { clear:both; float:left; width:150px; @@ -134,7 +129,7 @@ top:10px; left:25px; } -#timerCanvas { +#timerPaper { position:absolute; width:100px; height:150px; @@ -142,28 +137,31 @@ top:10px; left:25px; } -#scorebox { +#scoreBox { position:absolute; width:100px; height:150px; top:10px; left:25px; +z-index: 10; } -#scoreboxCanvas { -position:absolute; -width:100px; -height:150px; -top:10px; -left:25px; +#scoreBoxText { +position:relative; +top:60px; +font: 70px Arial; +color: #fff; +text-align: center; +z-index: 100; } -#chimpCanvas { +#chimpPaper { position:absolute; top:10px; left:25px; - +width:120px; +height:125px; } #buttons { diff --git a/examples/adding_up_to_10/index.html b/examples/adding_up_to_10_svg/exercise.html index ea752d9..a99ec93 100755 --- a/examples/adding_up_to_10/index.html +++ b/examples/adding_up_to_10_svg/exercise.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <title>Karma - Adding Up to 10</title> + <title>Adding up to 10 - Exercise (Alpha)</title> <meta name="keywords" content="karma,javascript,html5,sugar,sugarlabs,gsoc,ole,nepal" /> <link type="text/css" rel="stylesheet" href="css/lesson.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> @@ -11,12 +11,23 @@ <script type="text/javascript" src="../../js/karma.Gettext.js"></script> <script type="text/javascript" src="../../js/jquery.karma.js"></script> <script type="text/javascript" src="js/lesson.js"></script> - - + <link rel="stylesheet" href="css/knavbar.css" type="text/css"/> </head> <body> + +<section id="navigation"> + <nav id="knavbar"> + <a href="../../chakra/grade1mathematics.html"><img src="../../assets/default/images/back.png" alt="Back" title="Back" class="floatLeft"></a> + <div id="lessonTitle" class="floatLeft"><a id="welcome" href="index_knavbar.html">Adding up to 10</a></div> + <a href="http://olenepal.org/" target="_blank"><img src="../../assets/default/images/olenepal_logo.gif" alt="OLE Nepal logo" title="OLE Nepal Web site" class="floatRight"></a> + <a href="#tab_help"><img src="../../assets/default/images/help.png" alt="Help" title="Help" class="floatRight"></a> + <img src="../../assets/default/images/tutorial_bw.png" alt="Tutorial" title="Tutorial" class="floatRight"> + <a href="exercise.html" class="selected"><img src="../../assets/default/images/exercise.png" alt="Exercise" title="Exercise" class="floatRight"></a> + </nav> +</section> + <div id="karma-main"> <div id="action"> <div id="actionTop"> @@ -77,7 +88,7 @@ </div> - +</div> </body> diff --git a/examples/adding_up_to_10_svg/index.html b/examples/adding_up_to_10_svg/index.html new file mode 100755 index 0000000..6a861d1 --- /dev/null +++ b/examples/adding_up_to_10_svg/index.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <title>Karma - Adding Up to 10</title> + <meta name="keywords" content="karma,javascript,html5,sugar,sugarlabs,gsoc,ole,nepal" /> + <link type="text/css" rel="stylesheet" href="css/lesson.css" /> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <link type="image/ico" rel="icon" href="../../assets/default/images/favicon.ico" /> + <link type="text/css" rel="stylesheet" href="../../css/karma.css" /> + <script type="text/javascript" src="../../js/raphael-min.js"></script> + <script type="text/javascript" src="../../js/jquery-1.3.2.min.js"></script> + <script type="text/javascript" src="../../js/karma.Gettext.js"></script> + <script type="text/javascript" src="../../js/jquery.karma.js"></script> + <script type="text/javascript" src="js/lesson.js"></script> + + + +</head> + +<body> + <div id="karma-main"> + <div id="main"> + <div id="top"> + + <div id="topLeftArea"> + <img id="topLeftCard" src="assets/generic/images/yellowBox.png" alt="" /> + <div id="topLeftPaper" ></div> + + </div> + <div id="topMiddleArea"> + <img id="plusSign" src="assets/generic/images/plussign.png" alt=""/> + </div> + <div id="topRightArea"> + <img id="topRightCard" src="assets/generic/images/yellowBox.png" alt=""/> + <div id="topRightPaper"></div> + </div> + + </div> + + <div id="bottom"> + <div id="bottomLeft" class="bottom"> + <img class="bottomCard" src="assets/generic/images/yellowBox.png" alt=""/> + <div id="bottomLeftPaper" class="bottomCard"> </div> + </div> + <div id="bottomMiddle" class="bottom"> + <img class="bottomCard" src="assets/generic/images/yellowBox.png" alt=""/> + <div id="bottomMiddlePaper" class="bottomCard"> </div> + </div> + <div id="bottomRight" class="bottom"> + <img class="bottomCard" src="assets/generic/images/yellowBox.png" alt=""/> + <div id="bottomRightPaper" class="bottomCard"> </div> + </div> + + </div> + + </div> + <div id="side"> + <div class="sideItem"> + <img id="timer" src="assets/generic/images/scorebox.png" alt=""/> + <div id="timerPaper"> </div> + </div> + <div class="sideItem"> + <img id="scoreBox" src="assets/generic/images/scorebox.png" alt=""/> + <div id="scoreBoxText"></div> + </div> + <div class="sideItem"> + <div id="chimpPaper"> </div> + <div id="buttons"> + <button id="start">Start</button> + <button id="stop">Stop</button> + <button id="reset">Restart</button> + </div> + </div> + + + </div> + <div id="overlay"></div> + <div id="overlayPaper"></div> + </div> + + +</body> + +</html> diff --git a/examples/adding_up_to_10/index_knavbar.html b/examples/adding_up_to_10_svg/index_knavbar.html index e1e2fca..6bd5e7a 100755 --- a/examples/adding_up_to_10/index_knavbar.html +++ b/examples/adding_up_to_10_svg/index_knavbar.html @@ -19,8 +19,8 @@ <div id="lesson"> <nav> -<li><a href="../../chakra/grade1mathematics.html"><img src="../../assets/default/images/back.png" alt="Back" title="Back"></a></li> -<li><a id="welcome" href="index_knavbar.html" class="selected">Adding up to 10</a></li> +<a href="../../chakra/grade1mathematics.html"><img src="../../assets/default/images/back.png" alt="Back" title="Back" class="floatLeft"></a> +<div id="lessonTitle" class="floatLeft"><a id="welcome" href="index_knavbar.html" class="selected">Adding up to 10</a></div> </nav> <div id="subject">Mathematics</div> diff --git a/examples/adding_up_to_10_svg/js/lesson.js b/examples/adding_up_to_10_svg/js/lesson.js new file mode 100755 index 0000000..ef878d3 --- /dev/null +++ b/examples/adding_up_to_10_svg/js/lesson.js @@ -0,0 +1,369 @@ +/* jslint browser: true +*/ +$(document).ready(function(){ + + + var k = $.karma({container: "#karma-main", lang: "en"}); + + k.init({ + images: [ + {name: "ball", file: "ball37px.png", localized : false }, + {name: "balloon", file: "balloon37px.png", localized : false }, + {name: "banana", file: "banana37px.png", localized : false }, + {name: "chilli", file: "chilli.png", localized : false }, + {name: "fish" , file: "fish64px.png", localized : false }, + {name: "flower", file: "flower37px.png", localized : false }, + {name: "normalChimp", file: "normalChimp_120x125.png", + localized : false}, + {name: "happyChimp", file: "happyChimp_120x125.png", + localized: false}, + {name: "sadChimp", file: "sadChimp_120x125.png", + localized : false}], + sounds: [ + {name: "correct", file: "correct.ogg"}, + {name: "incorrect", file: "incorrect.ogg"}, + {name: "trigger", file: "trigger.ogg", localized: false} + ] + + }); + + +k.main(function() { + + + var imageNames = ["ball", "banana", "balloon","chilli", "fish", "flower"]; + //game logic + var cards; + var totalCorrect = 0, n0 = 0, n1 = 0, correctCard = 0, + level = 0, score = 0, numCorrectAnswers = 0; + var DRAW_MAX_X = 170, DRAW_MAX_Y = 170; + var choices=[0, 0, 0]; + var timerSpeed = 12000; + var START_TIMER_Y = 25, END_TIMER_Y = 125; + var timerPaper, chimpPaper; + var timerRect; + var normalChimpImage, sadChimpImage, happyChimpImage; + var overlayCard, topLeftCard, topRightCard, bottomLeftCard, + bottomMiddleCard, bottomRightCard; + + var buttons=[]; + var isTimerRunning = false; + var dispatchChoice; + + var createCard = function (paperName, width, height) { + var set; + var paper; + + if(!width || !height){ + paper = Raphael(paperName+"Paper", 200, 200); + } + else { + paper = Raphael(paperName+"Paper", width, height); + } + set = paper.set(); + return { "paper": paper, "prefix": paperName, "set": set}; + }; + + + overlayCard = createCard("overlay", 800, 600); + topLeftCard = createCard("topLeft"); + topRightCard = createCard("topRight"); + bottomLeftCard = createCard("bottomLeft"); + bottomMiddleCard = createCard("bottomMiddle"); + bottomRightCard = createCard("bottomRight"); + + + cards = [ topLeftCard, topRightCard, bottomLeftCard, + bottomMiddleCard, bottomRightCard]; + + sets = [topLeftCard.set, topRightCard.set, bottomLeftCard.set, + bottomMiddleCard.set, bottomRightCard.set]; + + + function drawCards () { + var imageId = imageNames[ level ]; + //reinitialize choices to zero + choices = [0, 0, 0]; + + cards.forEach(function (box) { + box.set.remove(); + }); + + totalCorrect = k.math.rand( 2, 5 + level ); //the totalCorrect + n0 = totalCorrect - k.math.rand(1, totalCorrect - 1 ); //first number + n1 = totalCorrect - n0; //second number + + //chose one option (the correct option) + //and then put the correct value into it + correctCard = k.math.rand( 0, 2 ); + choices[ correctCard ] = totalCorrect; + + var computeUniqueChoice = function(choice){ + var newChoice = 0; + if (choice === totalCorrect) { + return choice; + } else { + newChoice = k.math.rand( 1, 10 ); + if (newChoice === totalCorrect){ + return computeUniqueChoice(choice); + } else { + return newChoice; + } + } + }; + + choices = choices.map(computeUniqueChoice); + + var drawCard = function (card, n) { + var positions = []; + var x = 0, y = 0; + var isOverlapping = false; + var imageVarNames = {}; + var varPrefix = card.prefix; + imageVarNames[varPrefix] = []; + card.set = card.paper.set(); + + for (var i=0; i<n; i++) { + do { + isOverlapping = false; + x = k.math.rand( 0, DRAW_MAX_X); + y = k.math.rand( 0, DRAW_MAX_Y ); + for ( var j=0; j<positions.length; j++) { + if ( k.geometry.distance2( positions[j], + {"x": x, "y": y} ) < 137 ) { + isOverlapping = true; + break; + } + } + + }while ( isOverlapping === true ); + positions.push( { "x":x, "y": y } ); + imageVarNames[varPrefix][i] = card.paper. + image(k.library.images[imageId].src, x , y, 35, 35); + card.set.push(imageVarNames[varPrefix][i]); + } + + }; + + //put the cards + drawCard(topLeftCard, n0); + drawCard(topRightCard, n1); + drawCard(bottomLeftCard, choices[ 0 ]); + drawCard(bottomMiddleCard, choices[ 1 ]); + drawCard(bottomRightCard, choices[ 2 ]); + + } + + //put the buttons on the cards + buttons[ 0 ] = { node: $('#bottomLeftPaper')[0], num: 0}; + buttons[ 1 ] = { node: $('#bottomMiddlePaper')[0], num: 1}; + buttons[ 2 ] = { node: $('#bottomRightPaper')[0], num: 2}; + + var addButtons = function(){ + buttons.forEach(function(button) { + var numButton = button.num; + button.node.addEventListener('click', function dispatchChoice(){ + var myButton = numButton; + chooseCard(myButton);}, false); + }); + }; + + + var removeButtons = function(){ + buttons.forEach(function(button) { + button.node.removeEventListener('click', dispatchChoice, false); + }); + }; + + var chooseCard = function(numButton) { + if ( choices[numButton] === totalCorrect){ + //If the player has completed all the levels + if (numCorrectAnswers === 4 && level === 5) { + congrats(); + } else { + computeScore(true, false); + resetTimer(); + animateTimer(); + drawCards(); + } + }else { + computeScore(false, false); + resetTimer(); + animateTimer(); + drawCards(); + } + }; + + + + var writeScore = function (newScore){ + $('#scoreBoxText')[0].innerHTML = newScore; + }; + + + var computeScore = function (correct, tooSlow) { + + if ( correct === false) { + //answer was incorrect or took too long + score = score - 1; + numCorrectAnswers = numCorrectAnswers - 1; + writeScore(score); + if (tooSlow === true) { + k.library.sounds.trigger.play(); + } else { + k.library.sounds.incorrect.play(); + } + //animate sad monkey + animateChimp(false); + + } else { + score = score + 1; + numCorrectAnswers = numCorrectAnswers + 1; + writeScore(score); + k.library.sounds.correct.play(); + animateChimp(true); + if (numCorrectAnswers == 5){ + level = level + 1; + timerSpeed = timerSpeed - 1000; + numCorrectAnswers = 0; + } + + } + + + }; + + + var startGame = function () { + score = 0; + writeScore(score); + addButtons(); + isTimerRunning = true; + + //move timer back to start in case it is + //already running + resetTimer(); + + //start timer + animateTimer(); + + drawCards(); + }; + + var stopGame = function () { + writeScore(' '); + removeButtons(); + //stop timer + isTimerRunning = false; + resetTimer(); + + //clear the cards + cards.forEach(function (card) { + card.set.remove(); + card.set = card.paper.set(); + }); + + }; + + var resetGame = function () { + score = 0; + writeScore(score); + isTimerRunning = true; + resetTimer(); + animateTimer(); + drawCards(); + + }; + + var resetTimer = function () { + timerRect.animate({y: START_TIMER_Y}, 0); + }; + + var animateTimer = function () { + timerRect.animate({y : END_TIMER_Y}, timerSpeed, function(){ + timerRect.attr("y", START_TIMER_Y); + if (isTimerRunning === true){ + computeScore(false, true); + animateTimer(); + drawCards(); + } + }); + }; + + + var animateChimp = function (answer) { + var timerChimp; + normalChimpImage.hide(); + if( answer === true){ + happyChimpImage.show(); + } else { + sadChimpImage.show(); + } + + + timerChip = setTimeout(function() { + happyChimpImage.hide(); + sadChimpImage.hide(); + normalChimpImage.show();}, 800); + + }; + + var congrats = function () { + var congratsText; + stopGame(); + + $('#overlay').css({"position": "absolute", "background": "white", "opacity": "0.7", + "width": 800, "height": 600, "z-index": 10}); + $('#overlayPaper').css({"position": "absolute", "z-index": "100", "opacity": 1}); + congratsChimp = overlayCard.paper.image( + k.library.images.happyChimp.src, 200, 100, 300, 400); + congratsChimp.attr({"fill-opacity": "1", "opacity": "1"}); + congratsText = overlayCard.paper.text(400, 550, "Great Job!"); + congratsText.attr({"font-size": 80}); + overlayCard.set.push(congratsChimp, congratsText); + + congratsChimp.node.addEventListener('click', function(){ + $('#overlay').css({"opacity": 0}); + overlayCard.set.remove(); + }, false); + + }; + + document.getElementById('start'). + addEventListener('click', startGame, false); + + + document.getElementById('stop'). + addEventListener('click', stopGame, true); + + document.getElementById('reset'). + addEventListener('click', resetGame, false); + + + //set up the timer + timerPaper = Raphael('timerPaper', 100, 150); + timerRect = timerPaper.rect(7, START_TIMER_Y, 85, 20, 3); + timerRect.attr('fill', "#fff"); + + //Set up the monkeys + chimpPaper = Raphael('chimpPaper', 120, 125); + normalChimpImage = chimpPaper.image(k.library.images.normalChimp.src, + 0, 20, 100, 100); + sadChimpImage = chimpPaper.image(k.library.images.sadChimp.src, + 0, 20, 100, 100); + happyChimpImage = chimpPaper.image(k.library.images.happyChimp.src, + 0, 20, 100, 100); + happyChimpImage.hide(); + sadChimpImage.hide(); + + + + +//end of Karma.main +}); + + + + +//end of ready +});
\ No newline at end of file diff --git a/examples/adding_up_to_10/po/en.po b/examples/adding_up_to_10_svg/po/en.po index 4d1444f..4d1444f 100755 --- a/examples/adding_up_to_10/po/en.po +++ b/examples/adding_up_to_10_svg/po/en.po diff --git a/examples/adding_up_to_10/po/es-MX.po b/examples/adding_up_to_10_svg/po/es-MX.po index ca1e61c..ca1e61c 100755 --- a/examples/adding_up_to_10/po/es-MX.po +++ b/examples/adding_up_to_10_svg/po/es-MX.po diff --git a/examples/adding_up_to_10/po/es.po b/examples/adding_up_to_10_svg/po/es.po index b665366..b665366 100755 --- a/examples/adding_up_to_10/po/es.po +++ b/examples/adding_up_to_10_svg/po/es.po diff --git a/examples/adding_up_to_10/po/he-IL.po b/examples/adding_up_to_10_svg/po/he-IL.po index f681aca..f681aca 100755 --- a/examples/adding_up_to_10/po/he-IL.po +++ b/examples/adding_up_to_10_svg/po/he-IL.po diff --git a/examples/adding_up_to_10/resources.html b/examples/adding_up_to_10_svg/resources.html index 0e93455..0e93455 100755 --- a/examples/adding_up_to_10/resources.html +++ b/examples/adding_up_to_10_svg/resources.html |