1
1
<script setup lang="ts">
2
2
import { computed } from ' vue' ;
3
3
import { useStore } from ' vuex' ;
4
+ import LoginView from ' ./auth/LoginView.vue' ;
4
5
const store = useStore ();
5
6
const authReady = computed (() => {
6
7
return store .state .isAuthReady ;
@@ -11,25 +12,42 @@ const authReady = computed(() => {
11
12
<template >
12
13
<div class =" container mx-auto mb-24 mt-6 lg:my-14" >
13
14
<el-main >
14
- <h1 class =" text-4xl mb-8" >Welcome to Amar Progress!</h1 >
15
-
16
- <p class =" text-xl" >
17
- This is a progress tracking app for students. Simply select the chapters you want to complete and this will show
18
- you how much you completed in each subject. Made for HSC 2022-23 Science Students.
19
- </p >
20
-
21
-
22
- <template v-if =authReady >
23
- <p class =" text-xl mt-4" v-if =" store.state.user == null" >
24
- You will need to sign up in order to use this site.
25
- </p >
26
- <router-link v-if =" store.state.user != null" :to =" { name: 'dashboard' }" class =" btn btn-primary mt-8" >
27
- Visit Dashboard
28
- </router-link >
29
- <router-link v-else :to =" { name: 'login' }" class =" btn btn-primary mt-8" >
30
- Get Started
31
- </router-link >
32
- </template >
15
+ <div class =" flex flex-col md:grid md:grid-cols-5 gap-2 grid-flow-col items-center" >
16
+ <div class =" md:col-span-2 col-span-1" >
17
+ <h1 class =" text-4xl mb-8" >Welcome to Amar Progress!</h1 >
18
+
19
+ <p class =" text-xl" >
20
+ This is a progress tracking app for students. Simply select the chapters you want to complete and this will
21
+ show
22
+ you how much you completed in each subject. Made for HSC 2022-23 Science Students.
23
+ </p >
24
+
25
+
26
+ <template v-if =authReady >
27
+ <p class =" text-xl mt-4" v-if =" store.state.user == null" >
28
+ You will need to sign up in order to use this site.
29
+ </p >
30
+ <router-link v-if =" store.state.user != null" :to =" { name: 'dashboard' }" class =" btn btn-primary mt-8 btn-block md:btn-wide" >
31
+ Visit Dashboard
32
+ </router-link >
33
+ <router-link v-else :to =" { name: 'login' }" class =" btn btn-primary mt-8 btn-block md:btn-wide" >
34
+ Get Started
35
+ </router-link >
36
+ </template >
37
+ </div >
38
+ <div class =" md:col-span-3 col-span-1 mt-3 md:mt-1" >
39
+ <template v-if =" authReady && store .state .user == null " >
40
+ <login-view />
41
+ </template >
42
+ <template v-else >
43
+ <div class =" flex justify-center items-center" >
44
+ <img src =" /home.svg" class =" md:w-[28vw] w-96" alt =" " >
45
+ </div >
46
+ </template >
47
+
48
+ </div >
49
+ </div >
50
+
33
51
34
52
</el-main >
35
53
0 commit comments