Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post practice session report #48

Closed
wants to merge 10 commits into from
12 changes: 11 additions & 1 deletion packages/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@

<script lang="ts">
export default {
name: 'App'
name: 'App',
created() {
document.addEventListener("keyup", e => {
if (e.key == "d") {
[].forEach.call(document.querySelectorAll("*"), function(a) {
a.style.outline =
"1px solid #" + (~~(Math.random() * (1 << 24))).toString(16);
});
}
});
}
}
</script>

Expand Down
44 changes: 44 additions & 0 deletions packages/app/src/assets/img/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions packages/app/src/assets/img/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions packages/app/src/assets/img/tick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions packages/app/src/components/AnswerDescription.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<template>
<div class="row container q-mb-md">
<div class="col-5 question-container">
<div class="question-text">{{ question.question }}</div>
<div class="answer-text">
Given Answer: {{ question.answer }}
<br />
Correct Answer: {{ question.correctAnswer }}
</div>
</div>
<div class="col correctness-display">
<div class="column items-end content-around">
<img v-if="question.skipped" src="../assets/img/loading.svg" class="img-container" />
<div v-else>
<img v-if="question.correct" src="../assets/img/tick.svg" class="img-container" />
<img v-if="!question.correct" src="../assets/img/close.svg" class="img-container" />
</div>
<div class="answer-text">Took {{ question.duration }} seconds to answer</div>
</div>
</div>
</div>
</template>

<script>
import { QuestionReport } from "../store/practice/models";

export default {
props: {
question: {
type: QuestionReport,
required: true,
},
},
// computed: {
// questionType() {
// if (this.question.challengeType === Expression) {
// return this.question.operators.join(', ')
// } else return this.question.challengeType
// }
// },
};
</script>

<style scoped>
.container {
width: 100%;
height: 98px;
border-radius: 10px;
box-shadow: -9px 0 #FDC97C, 0 2px 3px 2px #767676;
background: #ffffff;
}
.question-text {
font-family: Varela Round;
font-style: normal;
font-weight: normal;
font-size: 18px;
line-height: 32px;
/* identical to box height, or 178% */
color: #767676;
margin: 0 0 25px;
}
.answer-text {
font-family: Montserrat;
font-style: normal;
font-weight: 500;
font-size: 10px;
line-height: 18px;
/* or 180% */
color: #767676;
bottom: -10px;
}
.img-container {
height: 50px;
width: 50px;
}
.question-container {
margin-left: 20px;
}
.correctness-display {
margin-top: 15px;
margin-right: 20px;
}
@media screen and (max-width: 350px) {
.correctness-display {
margin: 15px;
margin-right: 10px;
}
.img-container {
height: 40px;
width: 40px;
margin-right: 35px;
}
}
</style>
5 changes: 3 additions & 2 deletions packages/app/src/components/ClassicChallenge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import ChallengeStreak from "./ChallengeStreak.vue";
import ChallengeHeader from "./ChallengeHeader.vue";
import {
PracticeActions,
PracticeGetters,
PracticeOptions
PracticeGetters
} from "../store/practice/practice";
import { PracticeOptions } from "../store/practice/models"
import { Operator } from "../engine/math_questions/expression/models";
import { ChallengeType } from "../engine/models/math_question";
import { mapActions, mapGetters } from "vuex";
import Vue from "vue";
// import { import } from "mathjs";

export default Vue.extend({
components: {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
};
</script>

<style>
<style scoped>
.config-header {
width: 140%;
height: 384px;
Expand Down
Loading