1
1
<template >
2
- <div class =" LoginPage" >
3
- <v-flex >
4
- <div class =" Logo" >
5
- <Logo style =" height : 80vw ; max-height : 350px ; width : 100% ;" />
6
- </div >
7
- {{ errorMessages }}
8
- <div class =" LoginForm" >
9
- <v-form ref =" form" v-model =" valid" >
10
- <v-text-field
11
- v-model =" classId"
12
- :counter =" 6"
13
- label =" クラスID"
14
- :rules =" nameRules"
15
- outlined
16
- dark
17
- required
18
- />
2
+ <v-layout justify-center =" true" align-center =" true" >
3
+ <v-flex style =" max-width : 630px !important ;" >
4
+ <v-row justify =" center" class =" mb-3" >
5
+ <v-icon color =" white" size =" 60px" >mdi-library</v-icon >
6
+ </v-row >
7
+ <v-row justify =" center" >
8
+ <span class =" description mb-3" >授業をうける生徒・児童の方</span >
9
+ </v-row >
10
+ <v-row
11
+ justify =" center"
12
+ style =" margin-left : auto !important ; margin-right : auto !important ;"
13
+ >
14
+ <input-field
15
+ v-model =" classId"
16
+ class =" classIdField"
17
+ type =" classId"
18
+ label =" クラスID"
19
+ />
20
+ <v-btn
21
+ class =" classLoginButton ml-3"
22
+ color =" #FFDB6C"
23
+ width =" 56px"
24
+ height =" 56px"
25
+ :disabled =" !/^[あ-ん]{6}$/.test(classId)"
26
+ :loading =" loading"
27
+ @click =" loginToClass"
28
+ >
29
+ <v-icon color =" black" >mdi-arrow-right-bold</v-icon >
30
+ </v-btn >
31
+ </v-row >
32
+ <v-flex fill-width justify =" center" class =" forTeachers" >
33
+ <v-row class =" mt-10 mb-3" justify =" center" >
34
+ <v-icon color =" white" size =" 60px" >mdi-account-circle</v-icon >
35
+ </v-row >
36
+ <v-row justify =" center" >
37
+ <span class =" description mb-3" >時間割をつくる先生方</span >
38
+ </v-row >
39
+ <div style =" margin : 0 10px ;" >
19
40
<v-btn
41
+ color =" #FFDB6C"
42
+ height =" 60px"
43
+ style =" font-size : 16px ; font-weight : bold ;"
20
44
block
21
- outlined
45
+ rounded
46
+ >
47
+ ユーザー登録する
48
+ </v-btn >
49
+
50
+ <v-btn
22
51
color =" white"
23
- height =" 40px "
24
- :loading = " loading "
25
- :disabled = " loading || !valid "
26
- @click = " loginToClass "
52
+ height =" 50px "
53
+ style = " font-size : 16 px ; font-weight : bold ; margin-top : 10 px ; "
54
+ block
55
+ rounded
27
56
>
28
- LOGIN
57
+ ログインする
29
58
</v-btn >
30
- </v-form >
31
- </div >
59
+ <v-footer padless color =" #004170" style =" margin-top : 15px ;" >
60
+ <v-row justify =" center" no-gutters >
61
+ <v-col
62
+ class =" white--text text-center md-16"
63
+ cols =" 12"
64
+ style =" margin-top : 15px ; font-size : 12px ;"
65
+ >
66
+ <a class =" white--text" > - おうちで時間割について </a >
67
+ </v-col >
68
+ <v-col
69
+ class =" white--text text-center"
70
+ cols =" 12"
71
+ style =" margin-top : 15px ; font-size : 12px ;"
72
+ >
73
+ <a class =" white--text" > - お問い合わせ </a >
74
+ </v-col >
75
+ <v-col
76
+ class =" white--text text-center"
77
+ cols =" 12"
78
+ style =" margin-top : 15px ; font-size : 12px ;"
79
+ >
80
+ <a class =" white--text" > - サイトポリシー </a >
81
+ </v-col >
82
+ </v-row >
83
+ </v-footer >
84
+ </div >
85
+ </v-flex >
32
86
</v-flex >
33
- </div >
87
+ </v-layout >
34
88
</template >
35
89
36
90
<script lang="ts">
37
91
import Vue from ' vue'
38
92
import { vxm } from ' @/store'
39
- import Logo from ' @/assets/svgs/logo.svg '
93
+ import InputField from ' @/components/InputField.vue '
40
94
41
95
type DataType = {
42
96
classId: string
43
97
loading: boolean
44
98
error: boolean
45
99
errorMessages: string
46
100
valid: boolean
47
- nameRules: ((v : string ) => boolean | string )[]
48
101
}
49
102
50
103
export default Vue .extend ({
51
- components: { Logo },
104
+ components: {
105
+ InputField
106
+ },
52
107
data(): DataType {
53
108
return {
54
109
classId: ' ' ,
55
110
loading: false ,
56
111
error: false ,
57
112
errorMessages: ' ' ,
58
- valid: true ,
59
- nameRules: [
60
- v => !! v || ' クラスIDは必須です' ,
61
- v => (v && v .length === 6 ) || ' クラスIDは6文字のひらがなです'
62
- ]
113
+ valid: true
63
114
}
64
115
},
65
116
methods: {
@@ -81,15 +132,19 @@ export default Vue.extend({
81
132
</script >
82
133
83
134
<style lang="scss" scoped>
84
- .MainPage {
85
- .Logo {
86
- text-align : center ;
87
- }
88
- .DataBlock {
89
- margin : 0 -12px ;
90
- .studycard {
91
- margin-bottom : 20px ;
92
- }
93
- }
135
+ .classLoginButton {
136
+ border-radius : 14px ;
137
+ min-width : 48px !important ;
138
+ }
139
+ .description {
140
+ color : white ;
141
+ font-weight : bold ;
142
+ font-family : ' Noto Sans JP' , sans-serif ;
143
+ }
144
+ .forTeachers {
145
+ background-color : $color-base-color-07 ;
146
+ border-radius : 24px 24px 24px 24px ;
147
+ padding-top : 4px ;
148
+ padding-bottom : 24px ;
94
149
}
95
150
</style >
0 commit comments