add header and lang switcher

This commit is contained in:
Amir Mohamadi
2020-06-04 13:12:48 +04:30
parent 75f8971cb3
commit 471e982b18
9 changed files with 216 additions and 52 deletions
+7 -2
View File
@@ -1,6 +1,5 @@
<template>
<div>
<langBar/>
<site-header/>
<nuxt/>
</div>
@@ -8,6 +7,7 @@
<script>
export default {
beforeCreate() {
if (this.$route.params.lang === 'fa') {
@@ -15,6 +15,11 @@
} else if (this.$route.params.lang === 'en') {
$('html').attr({lang: 'en'})
}
}
},
head(){
return {
}
}
}
</script>