file: initialize files

This commit is contained in:
Leon Xu committed 2022-02-22 12:57:54 -08:00
1 parent 1ac21aadb0
commit ca8d7e55d5
55 files changed
+20560

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<template>
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view/>
</template>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+5
View File
@@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
createApp(App).use(router).mount('#app')
+23
View File
@@ -0,0 +1,23 @@
import { createRouter, createWebHistory } from "vue-router";
import AddCity from "../views/AddCity.vue";
import Weather from "../views/WeatherView.vue";
const routes = [
{
path: "/weather/:city",
name: "Weather",
component: Weather,
},
{
path: "/",
name: "AddCity",
component: AddCity,
},
];
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes,
});
export default router;
+10
View File
@@ -0,0 +1,10 @@
<template></template>
<script>
export default {
name: "AddCity",
};
</script>
<style>
</style>
+14
View File
@@ -0,0 +1,14 @@
<template>
<div class="home">
</div>
</template>
<script>
// @ is an alias to /src
export default {
name: 'WeatherView',
components: {
}
}
</script>