Skip to content

Commit

Permalink
chore: insert html lang
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Sep 21, 2021
1 parent 0470d5d commit 2c7d3be
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@headlessui/vue": "^1.4.1",
"@vueuse/core": "^6.4.1",
"autoprefixer": "^10.3.4",
"date-fns": "^2.24.0",
"popmotion": "^9.4.0",
"postcss": "^8.3.6",
"tailwindcss": "^2.2.15",
Expand Down
4 changes: 4 additions & 0 deletions src/components/editor/aside/AsideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,9 @@
localStorage.setItem('lang', _lang ? 'en' : 'br')
_lang ? (locale.value = 'en') : (locale.value = 'br')
_lang
? ((document.querySelector('html') as HTMLElement).lang = 'en-US')
: ((document.querySelector('html') as HTMLElement).lang = 'pt-BR')
})
</script>
4 changes: 4 additions & 0 deletions src/use/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const langSet = (store: any) => {
const lang = localStorage.getItem('lang')

lang === 'br' ? (locale.value = 'br') : (locale.value = 'en')

lang === 'br'
? ((document.querySelector('html') as HTMLElement).lang = 'pt-BR')
: ((document.querySelector('html') as HTMLElement).lang = 'en-US')
}

export const useStart = () => {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,11 @@ csstype@^2.6.8:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.18.tgz#980a8b53085f34af313410af064f2bd241784218"
integrity sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==

date-fns@^2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.24.0.tgz#7d86dc0d93c87b76b63d213b4413337cfd1c105d"
integrity sha512-6ujwvwgPID6zbI0o7UbURi2vlLDR9uP26+tW6Lg+Ji3w7dd0i3DOcjcClLjLPranT60SSEFBwdSyYwn/ZkPIuw==

debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
Expand Down

0 comments on commit 2c7d3be

Please sign in to comment.