Skip to content

Commit 72fcb15

Browse files
committed
indexページの作成
1 parent c7467d8 commit 72fcb15

File tree

2 files changed

+106
-44
lines changed

2 files changed

+106
-44
lines changed

src/layouts/default.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
Loading
66
</div>
77
</v-overlay>
8+
<v-app-bar fixed app class="bar" elevation="0">
9+
<HeaderLogo />
10+
</v-app-bar>
811
<v-content class="content">
912
<v-container class="px-4 py-8">
1013
<nuxt />
@@ -15,12 +18,16 @@
1518

1619
<script lang="ts">
1720
import Vue from 'vue'
21+
import HeaderLogo from '@/assets/svgs/header_logo.svg'
1822
1923
type LocalData = {
2024
loading: boolean
2125
}
2226
2327
export default Vue.extend({
28+
components: {
29+
HeaderLogo
30+
},
2431
data(): LocalData {
2532
return {
2633
loading: true

src/pages/index.vue

Lines changed: 99 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,116 @@
11
<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;">
1940
<v-btn
41+
color="#FFDB6C"
42+
height="60px"
43+
style="font-size: 16px; font-weight: bold;"
2044
block
21-
outlined
45+
rounded
46+
>
47+
ユーザー登録する
48+
</v-btn>
49+
50+
<v-btn
2251
color="white"
23-
height="40px"
24-
:loading="loading"
25-
:disabled="loading || !valid"
26-
@click="loginToClass"
52+
height="50px"
53+
style="font-size: 16px; font-weight: bold; margin-top: 10px;"
54+
block
55+
rounded
2756
>
28-
LOGIN
57+
ログインする
2958
</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>
3286
</v-flex>
33-
</div>
87+
</v-layout>
3488
</template>
3589

3690
<script lang="ts">
3791
import Vue from 'vue'
3892
import { vxm } from '@/store'
39-
import Logo from '@/assets/svgs/logo.svg'
93+
import InputField from '@/components/InputField.vue'
4094
4195
type DataType = {
4296
classId: string
4397
loading: boolean
4498
error: boolean
4599
errorMessages: string
46100
valid: boolean
47-
nameRules: ((v: string) => boolean | string)[]
48101
}
49102
50103
export default Vue.extend({
51-
components: { Logo },
104+
components: {
105+
InputField
106+
},
52107
data(): DataType {
53108
return {
54109
classId: '',
55110
loading: false,
56111
error: false,
57112
errorMessages: '',
58-
valid: true,
59-
nameRules: [
60-
v => !!v || 'クラスIDは必須です',
61-
v => (v && v.length === 6) || 'クラスIDは6文字のひらがなです'
62-
]
113+
valid: true
63114
}
64115
},
65116
methods: {
@@ -81,15 +132,19 @@ export default Vue.extend({
81132
</script>
82133

83134
<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;
94149
}
95150
</style>

0 commit comments

Comments
 (0)