Skip to content

Commit

Permalink
ページへのルーティングを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
ZOI-dayo committed Oct 4, 2024
1 parent bb35001 commit d3cd808
Show file tree
Hide file tree
Showing 26 changed files with 339 additions and 1 deletion.
109 changes: 108 additions & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,115 @@
import { createRouter, createWebHistory } from 'vue-router'
import TopView from '@/views/TopView.vue'

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: []
routes: [
{
path: '/',
component: TopView
},
{
path: '/signup',
component: () => import('@/views/SignupView.vue'),
children: [
{
path: '',
component: () => import('@/views/signup/SignupHomeView.vue')
},
{
path: 'register',
component: () => import('@/views/signup/SignupRegisterView.vue')
},
{
path: 'after-mail',
component: () => import('@/views/signup/SignupAfterMailView.vue')
}
]
},
{ path: '/login', component: () => import('@/views/LoginView.vue') },
{
path: '/reset-password',
component: () => import('@/views/ResetPasswordView.vue'),
children: [
{
path: '',
component: () => import('@/views/reset-password/ResetPasswordHomeView.vue')
},
{
path: 'form',
component: () => import('@/views/reset-password/ResetPasswordFormView.vue')
},
{
path: 'after-mail',
component: () => import('@/views/reset-password/ResetPasswordAfterMailView.vue')
}
]
},
{
path: '/users/:id',
component: () => import('@/views/UserView.vue'),
children: [
{
path: '',
component: () => import('@/views/user/UserHomeView.vue')
},
{
path: 'submissions',
component: () => import('@/views/user/UserSubmissionsView.vue')
},
{ path: 'problems', component: () => import('@/views/user/UserProblemsView.vue') }
]
},
{
path: '/problems',
component: () => import('@/views/ProblemsView.vue')
},
{
path: '/problems/:id',
component: () => import('@/views/ProblemView.vue'),
children: [
{
path: '',
component: () => import('@/views/problem/ProblemHomeView.vue')
},
{
path: 'submit',
component: () => import('@/views/problem/ProblemSubmitView.vue')
},
{
path: 'submissions',
component: () => import('@/views/problem/ProblemSubmissionsView.vue')
},
{
path: 'submissions/:submissionId',
component: () => import('@/views/problem/ProblemSubmissionView.vue')
},
{
path: 'editorial',
component: () => import('@/views/problem/ProblemEditorialView.vue')
},
{
path: 'edit',
component: () => import('@/views/problem/ProblemEditView.vue')
}
]
},
{
path: '/settings',
component: () => import('@/views/SettingsView.vue'),
children: [
{ path: '', redirect: '/settings/account' },
{
path: 'account',
component: () => import('@/views/settings/SettingsAccountView.vue')
},
{
path: 'profile',
component: () => import('@/views/settings/SettingsProfileView.vue')
}
]
}
]
})

export default router
9 changes: 9 additions & 0 deletions src/views/LoginView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Login</h1>
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/ProblemView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Problem View</h1>
<RouterView />
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/ProblemsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Problems</h1>
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/ResetPasswordView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Reset Password</h1>
<RouterView />
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/SettingsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Settings</h1>
<RouterView />
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/SignupView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Signup</h1>
<RouterView />
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/TopView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>Top</h1>
<RouterView />
</div>
</template>

<style scoped></style>
10 changes: 10 additions & 0 deletions src/views/UserView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts"></script>

<template>
<div>
<h1>User</h1>
<RouterView />
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemEditView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Edit</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemEditorialView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Editorial</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemHomeView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Home</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemSubmissionView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Submission</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemSubmissionsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Submissions</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/problem/ProblemSubmitView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Problem Submit</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/reset-password/ResetPasswordAfterMailView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Reset Password After Mail</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/reset-password/ResetPasswordFormView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Reset Password Form</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/reset-password/ResetPasswordHomeView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Reset Password Home</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/settings/SettingsAccountView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Settings Account</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/settings/SettingsProfileView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Settings Profile</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/signup/SignupAfterMailView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Signup After Mail</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/signup/SignupHomeView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Signup Home</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/signup/SignupRegisterView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>Signup Register</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/user/UserHomeView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>User Home</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/user/UserProblemsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>User Problems</h2>
</div>
</template>

<style scoped></style>
9 changes: 9 additions & 0 deletions src/views/user/UserSubmissionsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts"></script>

<template>
<div>
<h2>User Submissions</h2>
</div>
</template>

<style scoped></style>

0 comments on commit d3cd808

Please sign in to comment.