Commit f3a32305 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

add layouts

parent eb3870a2
<template> <template>
<v-footer
dark
padless
>
<v-card
flat
tile
class="indigo lighten-1 white--text text-center"
>
<v-card-text>
<v-btn
v-for="icon in icons"
:key="icon"
class="mx-4 white--text"
icon
>
<v-icon size="24px">
{{ icon }}
</v-icon>
</v-btn>
</v-card-text>
<footer id="container"> <v-card-text class="white--text pt-0">
<div id="contacts"> Phasellus feugiat arcu sapien, et iaculis ipsum elementum sit amet. Mauris cursus commodo interdum. Praesent ut risus eget metus luctus accumsan id ultrices nunc. Sed at orci sed massa consectetur dignissim a sit amet dui. Duis commodo vitae velit et faucibus. Morbi vehicula lacinia malesuada. Nulla placerat augue vel ipsum ultrices, cursus iaculis dui sollicitudin. Vestibulum eu ipsum vel diam elementum tempor vel ut orci. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<div id="contacts--contact"> </v-card-text>
<p> xavier.seignard+drangies@gmail.com </p>
<p>+84965615899</p>
</div>
<div id="contacts--social">
<div></div>
<div></div>
<div></div>
</div>
</div>
<div id="mentions">
<p> 2018 | mentions légales</p>
</div>
</footer>
</template>
<script>
export default {
name: "footer",
};
</script>
<style> <v-divider></v-divider>
#container{
min-height: calc(100vh - 40px); <v-card-text class="white--text">
padding-top:20px; {{ new Date().getFullYear() }}<strong>Vuetify</strong>
margin-top:20px; </v-card-text>
width:100vw; </v-card>
color:white; </v-footer>
background-color:#17a2b8; </template>
display:flex;
flex-direction:column; <script>
align-items:center; export default {
} data: () => ({
#contacts{ icons: [
display:flex; 'mdi-facebook',
justify-content:space-around; 'mdi-twitter',
align-items:center; 'mdi-linkedin',
width:100%; 'mdi-instagram',
} ],
#contacts--contact{ }),
text-align:right; }
} </script>
#contacts--social{ \ No newline at end of file
width:20%;
display : flex;
justify-content : space-between;
}
#contacts--social div{
height:30px;
width:30px;
background-color:white;
border-radius:50%;
}
#mentions p {
font-size:0.5em;
}
</style>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
variant="info" variant="info"
style="background-color: #6f2ca6 !important" style="background-color: #6f2ca6 !important"
> >
<sidebar /> <SideBar />
<b-navbar-toggle target="nav-collapse"></b-navbar-toggle> <b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
}; };
</script> </script>
<script> <script>
import sidebar from "@/components/sidebar"; import sidebar from "@/components/SideBar";
import vuex from import vuex from
export default { export default {
......
<template>
<div>
<Nav />
<nuxt />
</div>
</template>
<script>
import Nav from "@/components/Nav";
export default {
components: { Nav },
};
</script>
<template>
<div>
<Nav />
<nuxt />
<Footer />
</div>
</template>
<script>
import Nav from "@/components/Nav";
import Footer from "@/components/Footer";
export default {
components: { Nav },
components: { Footer },
};
</script>
<template>
<nuxt />
</template>
\ No newline at end of file
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"core-js": "^3.25.3", "core-js": "^3.25.3",
"jquery": "^3.6.3", "jquery": "^3.6.3",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",
"moment-jalaali": "^0.9.6",
"nuxt": "^2.15.8", "nuxt": "^2.15.8",
"prism-themes": "^1.9.0", "prism-themes": "^1.9.0",
"vue": "^2.7.10", "vue": "^2.7.10",
...@@ -7428,6 +7429,11 @@ ...@@ -7428,6 +7429,11 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/jalaali-js": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/jalaali-js/-/jalaali-js-1.2.6.tgz",
"integrity": "sha512-io974va+Qyu+UfuVX3UIAgJlxLhAMx9Y8VMfh+IG00Js7hXQo1qNQuwSiSa0xxco0SVgx5HWNkaiCcV+aZ8WPw=="
},
"node_modules/jest-worker": { "node_modules/jest-worker": {
"version": "26.6.2", "version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
...@@ -8059,6 +8065,50 @@ ...@@ -8059,6 +8065,50 @@
"mkdirp": "bin/cmd.js" "mkdirp": "bin/cmd.js"
} }
}, },
"node_modules/moment": {
"version": "2.29.4",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
"engines": {
"node": "*"
}
},
"node_modules/moment-jalaali": {
"version": "0.9.6",
"resolved": "https://registry.npmjs.org/moment-jalaali/-/moment-jalaali-0.9.6.tgz",
"integrity": "sha512-v8wXjQplvk5ez+sUqgsWIrafwIf1BEXXvzTYwsg1wHcqh27nSgKPCJ6FnZRrCz03MoNyB9N31L0oms+vE8Rq7g==",
"dependencies": {
"jalaali-js": "^1.1.0",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"rimraf": "^3.0.2"
}
},
"node_modules/moment-jalaali/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/moment-timezone": {
"version": "0.5.40",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.40.tgz",
"integrity": "sha512-tWfmNkRYmBkPJz5mr9GVDn9vRlVZOTe6yqY92rFxiOdWXbjaR0+9LwQnZGGuNR63X456NqmEkbskte8tWL5ePg==",
"dependencies": {
"moment": ">= 2.9.0"
},
"engines": {
"node": "*"
}
},
"node_modules/move-concurrently": { "node_modules/move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"core-js": "^3.25.3", "core-js": "^3.25.3",
"jquery": "^3.6.3", "jquery": "^3.6.3",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",
"moment-jalaali": "^0.9.6",
"nuxt": "^2.15.8", "nuxt": "^2.15.8",
"prism-themes": "^1.9.0", "prism-themes": "^1.9.0",
"vue": "^2.7.10", "vue": "^2.7.10",
......
<template>
<div>
<div>
<h1 style="text-align: center">ABOUT</h1>
</div>
</div>
</template>
\ No newline at end of file
<template> <template>
<div> <div>
<div> <div>
<Nav />
<h1 style="text-align: center">HOME</h1> <h1 style="text-align: center">HOME</h1>
</div> </div>
...@@ -17,11 +17,11 @@ import axios from "axios"; ...@@ -17,11 +17,11 @@ import axios from "axios";
import VueAxios from "vue-axios"; import VueAxios from "vue-axios";
import Nav from "@/components/Nav"; import Nav from "@/components/Nav";
import Footer from "@/components/Footer";
export default { export default {
layout: "admin",
components: { Nav }, components: { Nav },
components: { Footer },
middleware: ['web'], middleware: ['web'],
}; };
......
<template> <template>
<div> <div>
<div> <div>
<Nav />
</div> </div>
<b-breadcrumb> <b-breadcrumb>
<b-breadcrumb-item href="/home"> <b-breadcrumb-item href="/home">
...@@ -206,6 +205,7 @@ import Toasted from 'vue-toasted'; ...@@ -206,6 +205,7 @@ import Toasted from 'vue-toasted';
import { ModalPlugin } from 'bootstrap-vue'; import { ModalPlugin } from 'bootstrap-vue';
export default { export default {
layout: "admin",
components: { Nav }, components: { Nav },
components: { Navigation }, components: { Navigation },
components: { notification }, components: { notification },
...@@ -274,6 +274,7 @@ export default { ...@@ -274,6 +274,7 @@ export default {
}, },
created() { created() {
this.initialize(); this.initialize();
this.getUsers();
}, },
methods: { methods: {
initialize() { initialize() {
...@@ -391,9 +392,7 @@ export default { ...@@ -391,9 +392,7 @@ export default {
} }
} }
},
created() {
this.getUsers();
}, },
}; };
</script> </script>
...@@ -60,9 +60,10 @@ ...@@ -60,9 +60,10 @@
<script> <script>
import Nav from "@/components/Nav"; import Nav from "@/components/Nav";
import notification from "@/components/notification"; import notification from "@/components/notification";
import Toasted from 'vue-toasted'; import Toasted from "vue-toasted";
export default { export default {
layout: "none",
components: { Nav }, components: { Nav },
components: { notification }, components: { notification },
components: { NuxtLogo }, components: { NuxtLogo },
...@@ -72,6 +73,7 @@ export default { ...@@ -72,6 +73,7 @@ export default {
import { reactive } from "vue"; import { reactive } from "vue";
import axios from "axios"; import axios from "axios";
export default { export default {
layout: "none",
data: () => { data: () => {
return { return {
email: "", email: "",
...@@ -102,33 +104,20 @@ export default { ...@@ -102,33 +104,20 @@ export default {
this.$auth.$storage.setUniversal("userName", resp.data.name); this.$auth.$storage.setUniversal("userName", resp.data.name);
this.$auth.$storage.setUniversal("loggedIn", "true"); this.$auth.$storage.setUniversal("loggedIn", "true");
if (resp.status == "success") { if (resp.status == "success") {
this.$toast.success('Successfully authenticated',{ this.$toast.success("Successfully authenticated", {
duration: 2000 duration: 2000,
}); });
this.$router.push("home"); this.$router.push("home");
} }
} catch (e) { } catch (e) {
// this.error = "Username or Password not valid"; // this.error = "Username or Password not valid";
this.$toast.error('Username or Password not valid',{ this.$toast.error("Username or Password not valid", {
duration: 2000 duration: 2000,
}); });
this.$router.push("/"); this.$router.push("/");
} }
// async login() {
// try {
// const response = await this.$axios.post('http://127.0.0.1:8000/api/login', {
// email: this.email,
// password: this.password
// });
// await this.$auth.setToken('local', "Bearer " + response.data.access);
// await this.$auth.setRefreshToken('local', response.data.refresh);
// await this.$auth.setUserToken(response.data.access);
// } catch (e) {
// this.error = 'Username or Password not valid'
// }
}, },
checkForm: function (e) { checkForm: function (e) {
if (this.name && this.age) { if (this.name && this.age) {
return true; return true;
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
import { reactive } from "vue"; import { reactive } from "vue";
export default { export default {
layout: "none",
data: () => { data: () => {
return { return {
name: "", name: "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment