-
Notifications
You must be signed in to change notification settings - Fork 709
/
AccessibleChannelCard.vue
87 lines (76 loc) · 1.76 KB
/
AccessibleChannelCard.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
79
80
81
82
83
84
85
86
87
<template>
<KCard
:to="to"
:orientation="windowBreakpoint === 0 ? 'vertical' : 'horizontal'"
thumbnailDisplay="small"
thumbnailAlign="right"
:thumbnailSrc="contentNode.thumbnail"
:title="contentNode.name"
:headingLevel="headingLevel"
>
<template #thumbnailPlaceholder>
<div>
<ContentIcon
kind="channel"
class="type-icon"
:color="$themeTokens.annotation"
/>
</div>
</template>
<template #belowTitle>
<div>
<p style="margin-top: 0">
<KTextTruncator
:text="coachString('numberOfResources', { value: contentNode.total_resource_count })"
:maxLines="1"
/>
</p>
<p>
<KTextTruncator
:text="contentNode.description"
:maxLines="3"
/>
</p>
</div>
</template>
</KCard>
</template>
<script>
import ContentIcon from 'kolibri-common/components/labels/ContentIcon';
import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';
import commonCoach from './../../../../kolibri/plugins/coach/assets/src/views/common';
export default {
name: 'AccessibleChannelCard',
components: {
ContentIcon,
},
mixins: [commonCoach],
setup() {
const { windowBreakpoint } = useKResponsiveWindow();
return {
windowBreakpoint,
};
},
props: {
to: {
type: Object,
required: true,
},
headingLevel: {
type: Number,
required: false,
default: 2,
},
contentNode: {
type: Object,
required: true,
},
},
};
</script>
<style scoped>
.type-icon {
right: 10px;
font-size: 3em;
}
</style>