Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lots of restyling going on. Also adding a page to add/edit/delete cus…

…tom lists.
  • Loading branch information...
commit 349f4efb9fbbd3e70c546832086f3a94d94ca685 1 parent 187539a
Brandon Nicholls authored
32 addEdit.css
View
@@ -0,0 +1,32 @@
+.problemSet {
+ width: 250px;
+ padding: 4px;
+}
+
+.questions {
+ display: table;
+ width: 500px;
+}
+
+.header, .question {
+ display: table-row;
+ text-align: center;
+}
+
+.key, .value, .columnHeading {
+ display: inline-block;
+ width: 48%;
+ margin: 5px;
+}
+
+.key, .value {
+ padding: 4px;
+}
+
+#save {
+
+}
+
+.buttons {
+ width: 500px;
+}
74 addEdit.js
View
@@ -0,0 +1,74 @@
+function getListNameFromQueryString() {
+ return decodeURI(document.location.search).replace('?list=', '');
+}
+
+var listToEdit = getListNameFromQueryString();
+if (listToEdit.length > 0) {
+ $('.problemSet').val(listToEdit);
+ var loadedList = localStorage.getItem(listToEdit);
+ if (loadedList) {
+ var loadedListAsObject = JSON.parse(loadedList);
+ var nodesToAdd = Handlebars.templates['question.html'](loadedListAsObject);
+ $('.header').after(nodesToAdd);
+ }
+}
+
+$('#save').click(function() {
+ var problemSetName = $('.problemSet').val();
+ localStorage.setItem(problemSetName, serializeQuestions());
+ var problemSetList = localStorage.getItem('problemSets');
+ if (problemSetList) {
+ problemSetList = JSON.parse(problemSetList);
+ }
+ else {
+ problemSetList = [];
+ }
+
+ // See if this list already existed
+ var alreadyExists = problemSetList.some(function(list) {
+ return list === problemSetName;
+ });
+
+ // Only add it if it didn't exist
+ if (!alreadyExists) {
+ problemSetList.push(problemSetName);
+ problemSetList = JSON.stringify(problemSetList);
+ localStorage.setItem('problemSets', problemSetList);
+ }
+
+ document.location = 'index.html';
+});
+
+$('.key, .value').focus(checkForNewRowNeeded);
+
+function checkForNewRowNeeded() {
+ // is there an empty row still?
+ var lastQuestion = $('.question:last');
+ if (lastQuestion.find('.key').val().length > 0 || lastQuestion.find('.value').val().length > 0) {
+ // add one
+ var newRow = Handlebars.templates['question.html']([{
+ key: '',
+ value: ''
+ }
+ ]);
+ $('.questions').append(newRow);
+ $('.question:last > .key, .question:last > .value').focus(checkForNewRowNeeded);
+ }
+}
+
+function serializeQuestions() {
+ var questionSet = [];
+ $('.question').each(function(index, question) {
+ var questionNode = $(question);
+ var key = questionNode.find('.key').val();
+ var value = questionNode.find('.value').val();
+ if (key && value && key.trim().length > 0 && value.trim().length > 0) {
+ questionSet.push({
+ key: key,
+ value: value
+ });
+ }
+ });
+
+ return JSON.stringify(questionSet);
+}
37 addEditList.html
View
@@ -7,27 +7,30 @@
</head>
<body>
Name
- <input type="text" id="name" />
+ <input class="problemSet" type="text" id="name" placeholder="The name of this set of questions" />
- key value pairs
- <div class="header">
- <div class="columnHeading"></div>
- <div class="columnHeading"></div>
- </div>
- <div class="entry">
- <div class="key"></div>
- <div class="value"></div>
- </div>
- <div class="entry">
- <div class="key"></div>
- <div class="value"></div>
- </div>
- <div>
- <button id="add">Add</button>
+ <div class="questions">
+ <div class="header">
+ <span class="columnHeading">Question</span>
+ <span class="columnHeading">Answer</span>
+ </div>
+ <div class="question">
+ <input type="text" class="key" placeholder="4+4" />
+ <input type="text" class="value" placeholder="8" />
+ </div>
+<!-- <div class="question">
+ <input type="text" class="key" />
+ <input type="text" class="value" />
+ </div> -->
</div>
- <button id="save">Save</button>
+ <div class="buttons">
+ <button id="save">Save</button>
+ </div>
+ <script src="handlebars-runtime.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+ <script src="question.js"></script>
<script src="addEdit.js"></script>
</body>
</html>
64 index.html
View
@@ -6,44 +6,54 @@
<link href="main.css" rel="stylesheet" />
</head>
<body>
- <div class="instructions">Please use a better browser</div>
+ <div class="warnings">Please use a better browser</div>
<div class="content">
- <span class="scores">
- <div class="currentScore">
- Current Score: <span id="currentScoreValue"></span>
- </div>
+ <span class="navigation">
+ <div class="component">
+ <ul class="problemSetList">
+ </ul>
- <div class="problemSetHeader">
- <span class="problemSetName">Name</span>
- <span class="highScore">High Score</span>
+ <div class="addMoreSection">
+ <a href="addEditList.html">Add more...</a>
+ </div>
+ </div>
+ <div class="component">
+ <canvas id="cnvTimer" width="150" height="150"></canvas>
+ <div class="timeRemaining">1:00</div>
+ <div class="controls"><button class="startButton">Start</button></div>
</div>
-
- <ul class="problemSets">
- </ul>
</span>
<span class="problemArea">
- <div class="card">
- <div class="problem"></div>
- </div>
- <div class="iHeard hidden">
- <span class="iHeardLabel">I heard you say:</span> <span id="iHeardText"></span>
+ <div class="component instructions">
+ You have 60 seconds. Click "Start" and the browser will ask you for permission to use the microphone. Once cards start appearing say the answer out loud. You can choose from the default categories on the left or create your own list by clicking "Add more..."
</div>
- <div class="skipHint">
- You can say "skip" if you get stuck...
+ <div class="component scores hidden">
+ <span class="currentScore">
+ Score: <span id="currentScoreValue"></span>
+ </span>
+ <span class="highScore">
+ High Score: <span id="highScoreValue"></span>
+ </span>
</div>
- <div class="footer">
- <div>Created by Brandon Nicholls</div>
- <a href="https://github.com/iambrandonn/FlashCards">Github Project</a>
- <a href="http://tripleequals.blogspot.com/2012/09/webcam-swiper.html">Blo!!!!!!!!g Post</a>
+ <div class="card component hidden">
+ <div class="problem"></div>
+ </div>
+ <div class="iHeard component hidden">
+ <span class="iHeardLabel">I think I heard you say:</span> <span id="iHeardText"></span>
+ <div class="skipHint">
+ If you get stuck, say "skip"...
+ </div>
</div>
</span>
- <span class="timer">
- <canvas id="cnvTimer" width="150" height="150"></canvas>
- <div class="timeRemaining">1:00</div>
- <div class="controls"><button class="startButton">Start</button></div>
- </span>
+ </div>
+
+ <div class="footer">
+ <div>Created by Brandon Nicholls</div>
+ <a href="https://github.com/iambrandonn/FlashCards">Github Project</a>
+ <a href="http://tripleequals.blogspot.com/2012/09/webcam-swiper.html">Blo!!!!!!!!g Post</a>
+ <a href="https://twitter.com/NichollsBrandon">@NichollsBrandon</a>
</div>
<script src="handlebars-runtime.js"></script>
147 main.css
View
@@ -2,48 +2,66 @@ body {
color: rgb(0, 44, 46);
margin: 0;
font-family: Arial, Arial, Helvetica, sans-serif;
+ background-color: rgb(227, 235, 238);
}
div, span {
box-sizing: border-box;
}
+a {
+ text-decoration: none;
+ color: rgb(0, 99, 179);
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+.hidden {
+ display: none;
+}
+
.content {
- display: table;
width: 100%;
- height: 100%;
+ white-space: nowrap;
+ display: table;
}
-.timer, .scores {
- width: 15%;
- display: table-cell;
+.component {
vertical-align: top;
- padding-top: 30px;
- background-color: rgb(60, 90, 100);
- margin: 0;
+ padding: 13px;
+ background-color: white;
+ margin: 10px;
+ border: 1px solid rgb(53, 95, 109);
}
-.problemArea {
- display: table-cell;
+.navigation, .problemArea {
vertical-align: top;
+ display: table-cell;
+}
+
+.navigation {
+ width: 290px;
+ white-space: normal;
+}
+.problemArea {
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 130px;
text-align: center;
- padding: 50px 0;
- background-color: rgb(223, 230, 233);
- margin: 0;
+ margin: 10px 10px;
}
.problem {
- padding-top: 20px;
+ white-space: normal;
+ min-height: 154;
}
.timeRemaining {
font-size: 50px;
text-align: center;
font-family: sans-serif;
- color: rgb(238, 239, 240);
}
.expired {
@@ -51,19 +69,27 @@ div, span {
}
#cnvTimer {
- margin: 0 auto;
+ margin: 30px auto;
display: block;
}
+.instructions {
+ font-size: 18px;
+ font-weight: normal;
+ white-space: normal;
+ text-align: left;
+ padding: 50px;
+ margin-left: 0;
+ max-width: 834px;
+}
+
.iHeard {
font-family: sans-serif;
font-size: 25px;
- background-color: rgb(225, 245, 225);
- width: 600px;
- margin: 63px auto;
+ background-color: white;
+ margin-left: 0;
padding: 20px 0;
- border: 2px solid rgb(210, 219, 210);
- border-radius: 24px;
+ border: 1px solid rgb(53, 95, 109);
}
.iHeardLabel {
@@ -78,23 +104,20 @@ div, span {
text-align: left;
font-style: italic;
padding-left: 20px;
-}
-
-.hidden {
- display: none;
+ color: rgb(99, 104, 111);
+ font-weight: normal;
+ font-size: 22px;
}
.card {
- height: 205px;
- margin: 0 auto;
- border-radius: 20px;
- background-color: rgb(252, 250, 245);
- box-shadow: 3px 3px 3px rgb(0, 32, 58);
- min-width: 540px;
- width: 1000px;
+ background-color: white;
+ margin: 10px 10px 0 0;
+ border: 1px solid rgb(53, 95, 109);
}
-.instructions {
+.warnings {
+ border-bottom: 3px solid rgb(134, 150, 155);
+ border-top: 2px solid rgb(38, 126, 155);
width: 100%;
text-align: center;
font-family: Arial, Arial, Helvetica, sans-serif;
@@ -128,50 +151,55 @@ div, span {
}
.startButton {
- -webkit-appearance: none;
- background-color: #fcfaf5;
- border: 1px solid rgb(61, 61, 95);
+ border: 2px solid rgb(0, 30, 41);
border-radius: 9px;
font-size: 27px;
padding: 10px;
- box-shadow: 2px 2px 2px rgb(0, 32, 58);
cursor: pointer;
-}
-
-.scores {
color: white;
+ text-shadow: 2px 2px 2px rgb(3, 70, 0);
+ background: rgb(0, 99, 136);
}
-.scores > ul {
+.problemSetList {
list-style-type: none;
- padding-left: 10px;
+ padding: 13px 13px 13px 7px;
margin-top: 4px;
}
-.scores .alternate {
- background-color: rgb(72, 105, 116);
+.problemSet {
+ padding: 7px 10px 7px 10px;
}
-.highScore {
- float: right;
- margin-right: 10px;
+.problemSet:hover {
+ background-color: rgb(221, 221, 221);
+ cursor: pointer;
+ outline: 1px solid rgb(115, 126, 129);
+}
+
+.selected {
+ font-weight: bold;
+ color: black;
+}
+
+.scores {
+ margin-left: 0;
+ background-color: inherit;
+ border: 0;
}
-.currentScore {
- margin: 0 10px;
+.currentScore, .highScore {
+ margin: 0 92px;
font-weight: bold;
font-size: 25px;
}
-.problemSetName {
- padding-left: 34px;
+.highlight {
+ color: #00BE00;
}
-.problemSetHeader {
- background-color: rgb(43, 66, 73);
- color: white;
- margin-top: 30px;
- padding: 5px 0;
+.highScore {
+ text-align: right;
}
.skipHint {
@@ -181,6 +209,9 @@ div, span {
font-weight: normal;
font-style: italic;
width: 100%;
- margin-top: 25px;
- margin-bottom: 25px;
+ margin-top: 20px;
+}
+
+.addMoreSection {
+ padding-left: 17px;
}
192 main.js
View
@@ -3,6 +3,7 @@ var currentTime = 60;
var timer;
var currentProblem;
var currentScore = 0;
+var highScore = 0;
var timerCtx = document.getElementById('cnvTimer').getContext('2d');
var timerCanvasHeight = document.getElementById('cnvTimer').height;
var beginTime;
@@ -202,19 +203,14 @@ var spanishWords = [
{key:'maestro', value:'teacher'}
];
-function generateSpanishQuestion() {
- var index = getRandomInteger(spanishWords.length) - 1;
- return spanishWords[index];
+function getQuestionFromList(theList) {
+ var index = getRandomInteger(theList.length) - 1;
+ return theList[index];
}
-function generateCapitalsQuestion() {
- var index = getRandomInteger(capitals.length) - 1;
- return capitals[index];
-}
-
-function generateChemicalSymbolQuestion() {
- var index = getRandomInteger(chemSymbols.length) - 1;
- return chemSymbols[index];
+function generateCustomQuestion() {
+ var problems = JSON.parse(localStorage.getItem(selectedProblemSet));
+ return getQuestionFromList(problems);
}
function generateAdditionProblem() {
@@ -283,15 +279,19 @@ function showNextProblem() {
problemText = currentProblem.firstNumber + ' / ' + currentProblem.secondNumber;
break;
case 'builtin-capitals':
- currentProblem = generateCapitalsQuestion();
+ currentProblem = getQuestionFromList(capitals);
problemText = currentProblem.key;
break;
case 'builtin-chemSymbols':
- currentProblem = generateChemicalSymbolQuestion();
+ currentProblem = getQuestionFromList(chemSymbols);
problemText = currentProblem.key;
break;
case 'builtin-spanish':
- currentProblem = generateSpanishQuestion();
+ currentProblem = getQuestionFromList(spanishWords);
+ problemText = currentProblem.key;
+ break;
+ default:
+ currentProblem = generateCustomQuestion();
problemText = currentProblem.key;
break;
}
@@ -330,8 +330,6 @@ function startSpeechRecognition() {
timeRemaining.textContent = timeToShow;
}, 1000);
- showIHeard();
-
// Show the first question
showNextProblem();
};
@@ -351,6 +349,12 @@ function startSpeechRecognition() {
if (previousHigh < currentScore) {
setHighScoreFor(selectedProblemSet, currentScore);
renderProblemSets();
+ document.getElementById('highScoreValue').innerHTML = currentScore;
+ }
+
+ var highlighted = document.getElementsByClassName('highlight');
+ for (var i = 0; i < highlighted.length; i++) {
+ highlighted[i].classList.remove('highlight');
}
};
@@ -379,13 +383,19 @@ function checkAnswer(guess) {
answer = answer.toLowerCase();
}
- if (answer == trimmedGuess || trimmedGuess === 'skip') {
+
+ if (trimmedGuess.indexOf('skip') >= 0 || trimmedGuess.indexOf(answer) >= 0) {
showNextProblem();
}
- if (answer == trimmedGuess) {
+ if (trimmedGuess.indexOf(answer) >= 0) {
currentScore++;
- document.getElementById('currentScoreValue').textContent = currentScore;
+ var scoreElement = document.getElementById('currentScoreValue');
+ scoreElement.textContent = currentScore;
+
+ if (currentScore > highScore) {
+ scoreElement.classList.add('highlight');
+ }
}
}
@@ -393,14 +403,6 @@ function setIHeardText(textToDisplay) {
document.getElementById('iHeardText').textContent = textToDisplay;
}
-function hideIHeard() {
- document.getElementsByClassName('iHeard')[0].classList.add('hidden');
-}
-
-function showIHeard() {
- document.getElementsByClassName('iHeard')[0].classList.remove('hidden');
-}
-
function paintTimer(percent) {
timerCtx.clearRect(0, 0, 1000, 1000);
var radiusToUse = (timerCanvasHeight / 2) - 5;
@@ -435,7 +437,7 @@ function updateTimer() {
function getHighScoreFor(problemSet) {
if (localStorage) {
var score = localStorage.getItem(problemSet + 'HighScore');
- if (score >= 0) {
+ if (score > 0) {
return score;
}
else {
@@ -453,66 +455,90 @@ function setHighScoreFor(problemSet, score) {
}
function renderProblemSets() {
+ var problemSets = [
+ {
+ name: 'builtin-addition',
+ displayName: 'Addition',
+ highScore: getHighScoreFor('builtin-addition'),
+ checked: selectedProblemSet === 'builtin-addition'
+ },
+ {
+ name: 'builtin-subtraction',
+ displayName: 'Subtraction',
+ highScore: getHighScoreFor('builtin-subtraction'),
+ checked: selectedProblemSet === 'builtin-subtraction'
+ },
+ {
+ name: 'builtin-multiplication',
+ displayName: 'Multiplication',
+ highScore: getHighScoreFor('builtin-multiplication'),
+ checked: selectedProblemSet === 'builtin-multiplication'
+ },
+ {
+ name: 'builtin-division',
+ displayName: 'Division',
+ highScore: getHighScoreFor('builtin-division'),
+ checked: selectedProblemSet === 'builtin-division'
+ },
+ {
+ name: 'builtin-capitals',
+ displayName: 'US State Capitals',
+ highScore: getHighScoreFor('builtin-capitals'),
+ checked: selectedProblemSet === 'builtin-capitals'
+ },
+ {
+ name: 'builtin-chemSymbols',
+ displayName: 'Chemical Symbols',
+ highScore: getHighScoreFor('builtin-chemSymbols'),
+ checked: selectedProblemSet === 'builtin-chemSymbols'
+ },
+ {
+ name: 'builtin-spanish',
+ displayName: 'Spanish Vocabulary',
+ highScore: getHighScoreFor('builtin-spanish'),
+ checked: selectedProblemSet === 'builtin-spanish'
+ }
+ ];
+
+ addCustomProblemSets(problemSets);
var problemSetsHtml = Handlebars.templates['problemSets.html']({
- problemSets: [
- {
- name: 'builtin-addition',
- displayName: 'Addition',
- highScore: getHighScoreFor('builtin-addition'),
- checked: selectedProblemSet === 'builtin-addition'
- },
- {
- name: 'builtin-subtraction',
- displayName: 'Subtraction',
- highScore: getHighScoreFor('builtin-subtraction'),
- checked: selectedProblemSet === 'builtin-subtraction',
- alternate: true
- },
- {
- name: 'builtin-multiplication',
- displayName: 'Multiplication',
- highScore: getHighScoreFor('builtin-multiplication'),
- checked: selectedProblemSet === 'builtin-multiplication'
- },
- {
- name: 'builtin-division',
- displayName: 'Division',
- highScore: getHighScoreFor('builtin-division'),
- checked: selectedProblemSet === 'builtin-division',
- alternate: true
- },
- {
- name: 'builtin-capitals',
- displayName: 'US State Capitals',
- highScore: getHighScoreFor('builtin-capitals'),
- checked: selectedProblemSet === 'builtin-capitals'
- },
- {
- name: 'builtin-chemSymbols',
- displayName: 'Chemical Symbols',
- highScore: getHighScoreFor('builtin-chemSymbols'),
- checked: selectedProblemSet === 'builtin-chemSymbols',
- alternate: true
- },
- {
- name: 'builtin-spanish',
- displayName: 'Spanish Vocabulary',
- highScore: getHighScoreFor('builtin-spanish'),
- checked: selectedProblemSet === 'builtin-spanish'
- }
- ]
+ problemSets: problemSets
});
- document.getElementsByClassName('problemSets')[0].innerHTML = problemSetsHtml;
+ document.getElementsByClassName('problemSetList')[0].innerHTML = problemSetsHtml;
+
+ var problemSetElements = document.getElementsByClassName('problemSet');
+ for (var i = 0; i < problemSetElements.length; i++) {
+ problemSetElements[i].addEventListener('click', problemSetChanged);
+ }
+}
- var problemSetRadios = document.getElementsByName('problemSet');
- for (var i = 0; i < problemSetRadios.length; i++) {
- problemSetRadios[i].addEventListener('click', problemSetChanged);
+function addCustomProblemSets(arrayToAddTo) {
+ var problemsAsString = localStorage.getItem('problemSets');
+ if (problemsAsString) {
+ var problemSetArray = JSON.parse(problemsAsString);
+ problemSetArray.forEach(function(problemSetName) {
+ arrayToAddTo.push({
+ name: problemSetName,
+ displayName: problemSetName,
+ highScore: getHighScoreFor(problemSetName),
+ checked: selectedProblemSet === problemSetName
+ });
+ });
}
}
function problemSetChanged() {
- selectedProblemSet = this.value;
+ var previouslySelected = document.getElementsByClassName('selected');
+ for (var i = 0; i < previouslySelected.length; i++) {
+ previouslySelected[i].classList.remove('selected');
+ }
+ this.classList.add('selected');
+
+ selectedProblemSet = this.attributes['name'].value;
+
+ highScore = getHighScoreFor(selectedProblemSet);
+ document.getElementById('highScoreValue').innerHTML = highScore;
}
renderProblemSets();
@@ -521,6 +547,12 @@ paintTimer(0.99999);
var startButton = document.getElementsByClassName('startButton')[0];
startButton.addEventListener('click', function() {
startSpeechRecognition();
+
+ document.getElementsByClassName('scores')[0].classList.remove('hidden');
+ document.getElementsByClassName('card')[0].classList.remove('hidden');
+ document.getElementsByClassName('iHeard')[0].classList.remove('hidden');
+
+ document.getElementsByClassName('instructions')[0].classList.add('hidden');
});
var doneSound = new Audio('done.mp3');
4 problemSets.html
View
@@ -1,7 +1,5 @@
{{#each problemSets}}
- <li {{#if alternate}}class="alternate"{{/if}}>
- <input name="problemSet" type="radio" value="{{name}}" {{#if checked}}checked{{/if}} />
+ <li class="problemSet" name="{{name}}">
{{displayName}}
- <span class="highScore">{{highScore}}</span>
</li>
{{/each}}
2  problemSets.js
View
@@ -1 +1 @@
-(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b["problemSets.html"]=a(function(a,b,c,d,e){function k(a,b){var d="",e,f,g;d+="\r\n <li ",e=a.alternate,f={},e=c["if"].call(a,e,{hash:f,inverse:h.noop,fn:h.program(2,l,b),data:b});if(e||e===0)d+=e;d+='>\r\n <input name="problemSet" type="radio" value="',g=c.name,g?e=g.call(a,{hash:{},data:b}):(e=a.name,e=typeof e===i?e.apply(a):e),d+=j(e)+'" ',e=a.checked,f={},e=c["if"].call(a,e,{hash:f,inverse:h.noop,fn:h.program(4,m,b),data:b});if(e||e===0)d+=e;return d+=" />\r\n ",g=c.displayName,g?e=g.call(a,{hash:{},data:b}):(e=a.displayName,e=typeof e===i?e.apply(a):e),d+=j(e)+'\r\n <span class="highScore">',g=c.highScore,g?e=g.call(a,{hash:{},data:b}):(e=a.highScore,e=typeof e===i?e.apply(a):e),d+=j(e)+"</span>\r\n </li>\r\n",d}function l(a,b){return'class="alternate"'}function m(a,b){return"checked"}c=c||a.helpers,e=e||{};var f,g,h=this,i="function",j=this.escapeExpression;return f=b.problemSets,g={},f=c.each.call(b,f,{hash:g,inverse:h.noop,fn:h.program(1,k,e),data:e}),f||f===0?f:""})})()
+(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b["problemSets.html"]=a(function(a,b,c,d,e){function k(a,b){var d="",e,f;return d+='\r\n <li class="problemSet" name="',f=c.name,f?e=f.call(a,{hash:{},data:b}):(e=a.name,e=typeof e===h?e.apply(a):e),d+=i(e)+'">\r\n ',f=c.displayName,f?e=f.call(a,{hash:{},data:b}):(e=a.displayName,e=typeof e===h?e.apply(a):e),d+=i(e)+"\r\n </li>\r\n",d}c=c||a.helpers,e=e||{};var f,g,h="function",i=this.escapeExpression,j=this;return f=b.problemSets,g={},f=c.each.call(b,f,{hash:g,inverse:j.noop,fn:j.program(1,k,e),data:e}),f||f===0?f:""})})()
6 question.html
View
@@ -0,0 +1,6 @@
+{{#each this}}
+ <div class="question">
+ <input type="text" class="key" value="{{key}}" />
+ <input type="text" class="value" value="{{value}}" />
+ </div>
+{{/each}}
1  question.js
View
@@ -0,0 +1 @@
+(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b["question.html"]=a(function(a,b,c,d,e){function j(a,b){var d="",e,f;return d+='\r\n <div class="question">\r\n <input type="text" class="key" value="',f=c.key,f?e=f.call(a,{hash:{},data:b}):(e=a.key,e=typeof e===g?e.apply(a):e),d+=h(e)+'" />\r\n <input type="text" class="value" value="',f=c.value,f?e=f.call(a,{hash:{},data:b}):(e=a.value,e=typeof e===g?e.apply(a):e),d+=h(e)+'" />\r\n </div>\r\n',d}c=c||a.helpers,e=e||{};var f,g="function",h=this.escapeExpression,i=this;return f={},f=c.each.call(b,b,{hash:f,inverse:i.noop,fn:i.program(1,j,e),data:e}),f||f===0?f:""})})()
Please sign in to comment.
Something went wrong with that request. Please try again.