Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yoeriboven committed Oct 18, 2024
1 parent bd3e4af commit c02dac2
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"home.blog.description" : "Each time I learn something new I try to teach others using my blog. Here are some of my latest articles.",
"home.blog.description" : "When I learn something new I like to teach others using my blog. Here are some of my latest articles.",
"home.os.title" : "My code",
"home.os.description" : "Below you find the code of websites I've built, pull request to open source packages and packages I published on my own.",
"home.cta_footer.title" : "Want to work together?",
Expand Down
33 changes: 17 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@inertiajs/progress": "^0.2.7",
"@inertiajs/vue3": "^1.2.0",
"@vitejs/plugin-vue": "^5.1.4",
"axios": "^1.7.7",
"dayjs": "^1.11.13",
"inter-ui": "^3.19.3",
"laravel-vue-i18n": "^1.4.4",
Expand Down
25 changes: 18 additions & 7 deletions resources/js/Shared/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
<script setup>
import { onMounted, ref, inject } from "vue";
import { getActiveLanguage, loadLanguageAsync } from "laravel-vue-i18n";
import { Link } from '@inertiajs/vue3'
import { Link, router } from '@inertiajs/vue3'
import axios from 'axios';
defineProps({
showHome: {
Expand Down Expand Up @@ -80,16 +81,26 @@ function changeLanguage(lang) {
return;
}
// axios.post(route('language-change', lang))
// .then(function(response) {
// router.post(route('language-change', lang), {}, {
// onSuccess: () => {
// loadLanguageAsync(lang);
//
// emitter.emit('changedLanguage', {lang: lang});
//
// if (response.status === 204) {
// orderLanguages(lang);
// }
// });
// orderLanguages(lang);
// }
// })
axios.post(route('language-change', lang))
.then(function(response) {
loadLanguageAsync(lang);
emitter.emit('changedLanguage', {lang: lang});
if (response.status === 204) {
orderLanguages(lang);
}
});
}
</script>
1 change: 1 addition & 0 deletions resources/views/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<x-meta_tags :article="$page['props']['article'] ?? null"/>

@production
Expand Down

0 comments on commit c02dac2

Please sign in to comment.