Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit d54948d

Browse files
committed
Style tweaks
- Removing HelloWorld - we don't use it. - Make the menu nicer with v-navigation-drawer and v-toolbar
1 parent 320c39f commit d54948d

File tree

3 files changed

+62
-163
lines changed

3 files changed

+62
-163
lines changed

src/App.vue

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,71 @@
11
<template>
22
<div id="app">
3-
<div id="nav">
4-
<router-link to="/">Home</router-link> |
5-
<router-link to="/about">About</router-link> |
6-
<router-link to="/signUp">Sign Up</router-link> |
7-
<router-link to="/signUpConfirm">Confirm</router-link> |
8-
<router-link to="/signIn">Sign In</router-link>
9-
</div>
10-
<router-view/>
3+
<v-navigation-drawer v-model="sideNav" app right>
4+
<v-list>
5+
<v-list-tile v-for="(item, itemIdx) in menuItems" :key="itemIdx" :to="item.link">
6+
<v-list-tile-content>
7+
<v-list-tile-title>{{ item.label }}</v-list-tile-title>
8+
</v-list-tile-content>
9+
</v-list-tile>
10+
</v-list>
11+
</v-navigation-drawer>
12+
<v-toolbar scroll-off-screen fixed>
13+
<v-toolbar-side-icon class="hidden-md-and-up" @click.stop="sideNav = !sideNav"></v-toolbar-side-icon>
14+
<v-toolbar-title>My App</v-toolbar-title>
15+
<v-spacer></v-spacer>
16+
<v-toolbar-items class="hidden-sm-and-down">
17+
<v-btn flat v-for="(item, itemIdx) in menuItems" :key="itemIdx" :to="item.link">{{ item.label }}</v-btn>
18+
</v-toolbar-items>
19+
</v-toolbar>
20+
<v-content>
21+
<v-container fluid fill-height>
22+
<v-layout justify-center align-center>
23+
<router-view style="margin-top:70px"/>
24+
</v-layout>
25+
</v-container>
26+
</v-content>
1127
</div>
1228
</template>
13-
29+
<script>
30+
export default {
31+
data() {
32+
return {
33+
sideNav: false,
34+
}
35+
},
36+
computed: {
37+
menuItems() {
38+
return [
39+
{
40+
label: "Home",
41+
link: "/",
42+
},
43+
{
44+
label: "About",
45+
link: "/about",
46+
},
47+
{
48+
label: "Sign Up",
49+
link: "/signUp",
50+
},
51+
{
52+
label: "Confirm",
53+
link: "/signUpConfirm",
54+
},
55+
{
56+
label: "Sign In",
57+
link: "/signIn",
58+
},
59+
]
60+
}
61+
}
62+
}
63+
</script>
1464
<style>
1565
#app {
1666
font-family: 'Avenir', Helvetica, Arial, sans-serif;
1767
-webkit-font-smoothing: antialiased;
1868
-moz-osx-font-smoothing: grayscale;
1969
color: #2c3e50;
20-
margin-top: 60px;
2170
}
2271
</style>

src/components/HelloWorld.vue

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/views/Home.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<template>
22
<div class="home">
3+
<div>
4+
<img alt="Vue logo" src="../assets/logo.png">
5+
</div>
36
<v-btn @click="signOut">Sign Out</v-btn>
4-
<img alt="Vue logo" src="../assets/logo.png">
5-
<HelloWorld msg="Welcome to Your Vue.js App"/>
67
</div>
78
</template>
89

910
<script>
1011
// @ is an alias to /src
11-
import HelloWorld from '@/components/HelloWorld.vue'
1212
import {signOut} from '@/utils/auth.js'
1313
export default {
1414
name: 'home',
15-
components: {
16-
HelloWorld
17-
},
1815
methods: {
1916
signOut() {
2017
signOut().then((data) => console.log('DONE', data)).catch((err) => console.log('SIGN OUT ERR', err));

0 commit comments

Comments
 (0)