Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 64b36e5

Browse files
authored
Merge pull request #28 from chiubaca/component-reorganise
Organised view components and pages
2 parents f9e0d4a + 20f7aac commit 64b36e5

File tree

11 files changed

+18
-17
lines changed

11 files changed

+18
-17
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![Netlify Status](https://api.netlify.com/api/v1/badges/4ae54114-0254-4a6d-8c69-50babf908578/deploy-status)](https://app.netlify.com/sites/vue-netlify-fauna/deploys)
12
![](https://user-images.githubusercontent.com/18376481/78156268-78aed080-7436-11ea-9da7-57d83ec5ec8a.png)
23
# Vue - Netlify - Fauna
34
## A serverless stack with authentication ready to go!

src/components/AppLayout.vue renamed to src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</template>
1010

1111
<script>
12-
import SideBar from "./SideBar.vue";
13-
import Footer from "./Footer.vue";
12+
import SideBar from "./components/SideBar.vue";
13+
import Footer from "./components/Footer.vue";
1414
1515
export default {
1616
components: {
@@ -22,5 +22,5 @@ export default {
2222

2323
<!-- Add "scoped" attribute to limit CSS to this component only -->
2424
<style lang="scss">
25-
@import "..//assets/styles/main.scss";
25+
@import "./assets/styles/main.scss";
2626
</style>

src/assets/styles/main.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ input[type=password] {
5353
}
5454

5555
.eye-open {
56-
background-image: url("../assets/icons/eye.svg");
56+
background-image: url("./assets/icons/eye.svg");
5757
background-repeat: no-repeat;
5858
width: 1.5rem;
5959
height: 1.5rem;
6060

6161
}
6262
.eye-closed {
63-
background-image: url("../assets/icons/eye-off.svg");
63+
background-image: url("./assets/icons/eye-off.svg");
6464
background-repeat: no-repeat;
6565
width: 1.5rem;
6666
height: 1.5rem;

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import Vue from "vue";
2-
import AppLayout from "./components/AppLayout.vue";
2+
import App from "./App.vue";
33
import router from "./router";
44
import store from "./store";
55
import attemptToAuthoriseTokens from "./helpers/authorise-tokens";
66

77
new Vue({
88
el: "#app",
9-
render: h => h(AppLayout),
9+
render: h => h(App),
1010
router,
1111
store
1212
});

src/components/AllJournals.vue renamed to src/pages/AllJournals.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
deleteJournal,
4242
updateJournalTitle
4343
} from "../models/JournalsModel";
44-
import JournalCard from "./JournalCard.vue";
44+
import JournalCard from "../components/JournalCard.vue";
4545
4646
export default {
4747
components: {

src/components/AllPosts.vue renamed to src/pages/AllPosts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
deletePost,
3838
updatePost
3939
} from "../models/PostsModel";
40-
import PostCard from "./PostCard.vue";
40+
import PostCard from "../components/PostCard.vue";
4141
4242
export default {
4343
components: {
File renamed without changes.

src/components/Home.vue renamed to src/pages/Home.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939

4040
<script>
4141
import { mapGetters } from "vuex";
42-
import Login from "./Login.vue";
43-
import GithubCorner from "./GithubCorner.vue";
42+
import Login from "../components/Login.vue";
43+
import GithubCorner from "../components/GithubCorner.vue";
4444
4545
export default {
4646
name: "Home",

src/components/Profile.vue renamed to src/pages/Profile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<script>
5454
import { mapGetters, mapActions } from "vuex";
55-
import Modal from "./Modal.vue";
55+
import Modal from "../components/Modal.vue";
5656
5757
export default {
5858
name: "Profile",
File renamed without changes.

src/router.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ const routes = [
99
{
1010
path: "/home",
1111
name: "home",
12-
component: () => import("./components/Home.vue")
12+
component: () => import("./pages/Home.vue")
1313
},
1414
{
1515
path: "/journals",
1616
name: "journals",
17-
component: () => import("./components/AllJournals.vue"),
17+
component: () => import("./pages/AllJournals.vue"),
1818
meta: { authRequired: true }
1919
},
2020
{
2121
path: "/journals/:id/posts",
2222
name: "posts",
23-
component: () => import("./components/AllPosts.vue"),
23+
component: () => import("./pages/AllPosts.vue"),
2424
meta: { authRequired: true }
2525
},
2626
{
2727
path: "/profile",
2828
name: "profile",
29-
component: () => import("./components/Profile.vue"),
29+
component: () => import("./pages/Profile.vue"),
3030
meta: { authRequired: true }
3131
},
3232
{
3333
path: "/recover",
3434
name: "recover",
35-
component: () => import("./components/RecoverAccount.vue")
35+
component: () => import("./pages/RecoverAccount.vue")
3636
}
3737
];
3838

0 commit comments

Comments
 (0)