-
Notifications
You must be signed in to change notification settings - Fork 630
/
ContentArea.vue
78 lines (65 loc) · 1.49 KB
/
ContentArea.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
<section :style="{backgroundColor: isExercise ? $coreBgLight : ''}">
<h2 v-if="isExercise" class="header">
{{ header }}
</h2>
<ContentRenderer
:id="content.id"
:class="{ hof: isExercise}"
:showCorrectAnswer="true"
:itemId="selectedQuestion"
:allowHints="false"
:kind="content.kind"
:files="content.files"
:contentId="content.content_id"
:channelId="content.channel_id"
:available="content.available"
:extraFields="content.extra_fields"
:interactive="false"
/>
</section>
</template>
<script>
import themeMixin from 'kolibri.coreVue.mixins.themeMixin';
import ContentRenderer from 'kolibri.coreVue.components.ContentRenderer';
export default {
name: 'ContentArea',
components: {
ContentRenderer,
},
mixins: [themeMixin],
props: {
content: {
type: Object,
required: true,
},
// Exercise-specific
selectedQuestion: {
type: String,
required: false,
},
isExercise: {
type: Boolean,
required: false,
default: false,
},
header: {
type: String,
required: false,
default: '',
},
},
};
</script>
<style lang="scss" scoped>
.content-area-exercise {
padding: 16px;
}
.hof {
overflow-x: hidden; // .solutionarea's negative margin oversteps
}
.header {
margin: 0;
font-size: 16px; // same as question-list
}
</style>