Skip to content

Commit f199f24

Browse files
authored
Merge pull request #161 from F88/feature/140-page-lesson
授業 (Lesson) の詳細画面と生徒用日別画面からの遷移の実装
2 parents e27c977 + 95ee8bb commit f199f24

File tree

3 files changed

+464
-1
lines changed

3 files changed

+464
-1
lines changed

src/components/ContentCard.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="ContentCard-Outer">
3-
<v-card class="ContentCard elevation-4">
3+
<v-card class="ContentCard elevation-4" @click="toLessonDetail">
44
<v-card-actions class="ContentCard-Actions">
55
<subject-tag
66
class="ContentCard-SubjectTag"
@@ -50,6 +50,7 @@ import Vue from 'vue'
5050
import SubjectTag from '@/components/SubjectTag.vue'
5151
import ContentCardEditorButton from '@/components/ContentCardEditorButton.vue'
5252
import { classData } from '~/types/store/classData'
53+
import LessonWithId = classData.LessonWithId
5354
5455
export default Vue.extend({
5556
components: {
@@ -65,6 +66,12 @@ export default Vue.extend({
6566
type: Boolean,
6667
default: false
6768
}
69+
},
70+
methods: {
71+
toLessonDetail() {
72+
const lesson = this.lesson as LessonWithId
73+
this.$router.push('/lesson/?lessonId=' + lesson.docId)
74+
}
6875
}
6976
})
7077
</script>
@@ -73,30 +80,37 @@ export default Vue.extend({
7380
.ContentCard-Outer {
7481
display: flex;
7582
}
83+
7684
.ContentCard-Button-Outer {
7785
display: flex;
7886
flex-direction: column;
7987
flex: 0 1 auto;
8088
margin-left: 12px;
89+
8190
.ContentCard-Button {
8291
margin-bottom: 12px;
8392
}
8493
}
94+
8595
.ContentCard {
8696
flex: 1 1 auto;
8797
color: $color-gray;
8898
border-radius: 14px !important;
99+
89100
.ContentCard-Actions {
90101
padding: 16px 16px 0;
91102
}
103+
92104
.ContentCard-SubjectTag {
93105
margin-right: 4px;
94106
}
107+
95108
.ContentCard-Title {
96109
font-weight: bold;
97110
font-size: 14px;
98111
line-height: 1.75;
99112
}
113+
100114
.ContentCard-Description {
101115
font-size: 12px;
102116
color: $color-gray;

src/layouts/lesson.vue

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<template>
2+
<v-app>
3+
<v-overlay :value="loading" color="#0071C2" opacity="1" z-index="9999">
4+
<div class="loader">
5+
Loading
6+
</div>
7+
</v-overlay>
8+
<v-app-bar fixed app class="bar" elevation="0">
9+
<HeaderLogo />
10+
<v-spacer />
11+
<v-btn outlined rounded color="#0071C2" @click="back">
12+
<v-icon>mdi-arrow-left</v-icon>
13+
もどる
14+
</v-btn>
15+
</v-app-bar>
16+
<v-content class="content">
17+
<!-- <v-container class="classes-container px-4 py-8">-->
18+
<v-container class="classes-container px-4 py-4">
19+
<nuxt />
20+
</v-container>
21+
</v-content>
22+
</v-app>
23+
</template>
24+
25+
<script lang="ts">
26+
import Vue from 'vue'
27+
import HeaderLogo from '@/assets/svgs/header_logo.svg'
28+
// import { vxm } from '@/store'
29+
30+
type LocalData = {
31+
loading: boolean
32+
date: Date
33+
}
34+
35+
export default Vue.extend({
36+
components: {
37+
HeaderLogo
38+
},
39+
data(): LocalData {
40+
return {
41+
loading: true,
42+
date: new Date()
43+
}
44+
},
45+
// watch: {
46+
// date(value) {
47+
// vxm.app.setDate(value)
48+
// }
49+
// },
50+
mounted(): void {
51+
this.loading = false
52+
},
53+
methods: {
54+
back() {
55+
this.$router.back()
56+
}
57+
}
58+
})
59+
</script>
60+
61+
<style scoped lang="scss">
62+
.v-btn {
63+
font-weight: bold;
64+
font-size: 12px;
65+
line-height: 16px;
66+
background-color: $color-white;
67+
}
68+
69+
.date-icon {
70+
margin-right: 15px;
71+
}
72+
73+
.date {
74+
position: absolute;
75+
top: 50%;
76+
left: 50%;
77+
transform: translate(-50%, -50%);
78+
}
79+
80+
.bar {
81+
background-color: $color-back-gray;
82+
text-align: center;
83+
}
84+
85+
.content {
86+
background-color: $color-base-color-01;
87+
}
88+
89+
.header-calender {
90+
margin: 0 auto;
91+
width: 100%;
92+
max-width: 640px;
93+
height: 40px;
94+
}
95+
96+
.classes-container {
97+
height: 100%;
98+
}
99+
</style>

0 commit comments

Comments
 (0)