|
| 1 | +<template> |
| 2 | + <div class="ContentCard-Outer"> |
| 3 | + <v-card class="ContentCard elevation-4"> |
| 4 | + <v-card-actions class="ContentCard-Actions"> |
| 5 | + <subject-tag |
| 6 | + v-for="(item, idx) in subjects" |
| 7 | + :key="idx" |
| 8 | + class="ContentCard-SubjectTag" |
| 9 | + :name="item.name || '教科名'" |
| 10 | + :icon="item.icon || ''" |
| 11 | + :icon-color="item.iconColor || 'white'" |
| 12 | + :background-color="item.backgroundColor || '#A5D8FF'" |
| 13 | + /> |
| 14 | + <subject-tag |
| 15 | + class="ContentCard-SubjectTag" |
| 16 | + :name="'動画'" |
| 17 | + :icon="'mdi-video'" |
| 18 | + :icon-color="'#424242'" |
| 19 | + :background-color="'#E0E0E0'" |
| 20 | + /> |
| 21 | + </v-card-actions> |
| 22 | + <v-card-title> |
| 23 | + <h2 class="ContentCard-Title">{{ title }}</h2> |
| 24 | + </v-card-title> |
| 25 | + <v-card-text> |
| 26 | + <p class="ContentCard-Description">{{ description }}</p> |
| 27 | + </v-card-text> |
| 28 | + </v-card> |
| 29 | + <div class="ContentCard-Button-Outer"> |
| 30 | + <content-card-editor-button |
| 31 | + class="ContentCard-Button" |
| 32 | + icon-name="mdi-eye-off" |
| 33 | + /> |
| 34 | + <content-card-editor-button |
| 35 | + class="ContentCard-Button" |
| 36 | + icon-name="mdi-pencil" |
| 37 | + /> |
| 38 | + <content-card-editor-button |
| 39 | + class="ContentCard-Button" |
| 40 | + icon-name="mdi-file-multiple" |
| 41 | + /> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | +</template> |
| 45 | + |
| 46 | +<script lang="ts"> |
| 47 | +import Vue from 'vue' |
| 48 | +import SubjectTag from '@/components/SubjectTag.vue' |
| 49 | +import ContentCardEditorButton from '@/components/ContentCardEditorButton.vue' |
| 50 | +
|
| 51 | +export default Vue.extend({ |
| 52 | + components: { |
| 53 | + SubjectTag, |
| 54 | + ContentCardEditorButton |
| 55 | + }, |
| 56 | + props: { |
| 57 | + subjects: { |
| 58 | + type: Array, |
| 59 | + default: () => [] |
| 60 | + }, |
| 61 | + title: { |
| 62 | + type: String, |
| 63 | + default: '' |
| 64 | + }, |
| 65 | + description: { |
| 66 | + type: String, |
| 67 | + default: '' |
| 68 | + } |
| 69 | + } |
| 70 | +}) |
| 71 | +</script> |
| 72 | + |
| 73 | +<style scoped lang="scss"> |
| 74 | +.ContentCard-Outer { |
| 75 | + display: flex; |
| 76 | +} |
| 77 | +.ContentCard-Button-Outer { |
| 78 | + display: flex; |
| 79 | + flex-direction: column; |
| 80 | + flex: 0 1 auto; |
| 81 | + margin-left: 12px; |
| 82 | + .ContentCard-Button { |
| 83 | + margin-bottom: 12px; |
| 84 | + } |
| 85 | +} |
| 86 | +.ContentCard { |
| 87 | + flex: 1 1 auto; |
| 88 | + color: $color-gray; |
| 89 | + border-radius: 14px !important; |
| 90 | + .ContentCard-Actions { |
| 91 | + padding: 16px 16px 0; |
| 92 | + } |
| 93 | + .ContentCard-SubjectTag { |
| 94 | + margin-right: 4px; |
| 95 | + } |
| 96 | + .ContentCard-Title { |
| 97 | + font-weight: bold; |
| 98 | + font-size: 14px; |
| 99 | + line-height: 1.75; |
| 100 | + } |
| 101 | + .ContentCard-Description { |
| 102 | + font-size: 12px; |
| 103 | + color: $color-gray; |
| 104 | + margin: 0; |
| 105 | + } |
| 106 | +} |
| 107 | +</style> |
0 commit comments