mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-15 19:22:21 +01:00
Add sections
This commit is contained in:
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<button class="inline-flex items-center p-2 ml-3 text-sm text-gray-500 md:hidden dark:text-gray-400"
|
<button class="inline-flex items-center p-2 ml-3 text-sm text-gray-500 md:hidden dark:text-gray-400"
|
||||||
data-collapse-toggle="navbar-main" type="button" aria-controls="navbar-main" aria-expanded="false">
|
data-collapse-toggle="navbar-main" type="button" aria-controls="navbar-main" aria-expanded="false">
|
||||||
<span class="sr-only">Apri menù navigazione</span>
|
<span class="sr-only">{{ t("open nav") }}</span>
|
||||||
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
||||||
</svg>
|
</svg>
|
||||||
@ -20,7 +20,11 @@
|
|||||||
<div class="flex items-center order-1">
|
<div class="flex items-center order-1">
|
||||||
<div class="hidden w-full md:block md:w-auto" id="navbar-main">
|
<div class="hidden w-full md:block md:w-auto" id="navbar-main">
|
||||||
<ul class="flex flex-col py-4 pr-4 mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium bg-transparent">
|
<ul class="flex flex-col py-4 pr-4 mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium bg-transparent">
|
||||||
<NavLink to="/" label="Home"/>
|
<NavLink to="/" :label="t('home')"/>
|
||||||
|
<NavLink to="/about" :label="t('about')"/>
|
||||||
|
<NavLink to="/projects" :label="t('projects')"/>
|
||||||
|
<NavLink to="/resume" :label="t('resume')"/>
|
||||||
|
<NavLink to="/contacts" :label="t('contacts')"/>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +36,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import NavLink from "./NavLink.vue";
|
import NavLink from "./NavLink.vue";
|
||||||
import ThemeSwitch from "../ThemeSwitch/ThemeSwitch.vue";
|
import ThemeSwitch from "../theme-switch/ThemeSwitch.vue";
|
||||||
import LanguageSelector from "../LanguageSelector/LanguageSelector.vue";
|
import LanguageSelector from "../language-selector/LanguageSelector.vue";
|
||||||
import { Dropdown } from "flowbite";
|
import { initDropdowns } from "flowbite";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import locale from "./locale.json";
|
||||||
|
import { onMounted } from "vue";
|
||||||
|
|
||||||
|
const { t } = useI18n({ messages: locale });
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
initDropdowns();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
18
src/components/Navbar/locale.json
Normal file
18
src/components/Navbar/locale.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"it": {
|
||||||
|
"open nav": "Apri menù di navigazione",
|
||||||
|
"home": "Home",
|
||||||
|
"projects": "Progetti",
|
||||||
|
"about": "Chi sono",
|
||||||
|
"resume": "CV",
|
||||||
|
"contacts": "Contatti"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"open nav": "Open navbar",
|
||||||
|
"home": "Home",
|
||||||
|
"projects": "Projects",
|
||||||
|
"about": "About",
|
||||||
|
"resume": "Resumé",
|
||||||
|
"contacts": "Contacts"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -28,8 +28,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Dropdown } from "flowbite";
|
import { initDropdowns } from "flowbite";
|
||||||
import { setLocale } from "@/utilities/locale_handler";
|
import { setLocale } from "@/utilities/locale_handler";
|
||||||
|
import { onMounted } from "vue";
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
initDropdowns();
|
||||||
|
})
|
||||||
|
|
||||||
function changeLocale(e:any) {
|
function changeLocale(e:any) {
|
||||||
setLocale(e.target.value);
|
setLocale(e.target.value);
|
||||||
@ -1,5 +1,9 @@
|
|||||||
import { createRouter, createWebHashHistory } from "vue-router"
|
import { createRouter, createWebHashHistory } from "vue-router"
|
||||||
import HomeView from "../views/HomeView.vue"
|
import Home from "../views/home/Home.vue"
|
||||||
|
import About from "../views/about/About.vue"
|
||||||
|
import Projects from "../views/projects/Projects.vue"
|
||||||
|
import Resume from "../views/resume/Resume.vue"
|
||||||
|
import Contacts from "../views/contacts/Contacts.vue"
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
@ -7,7 +11,27 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "home",
|
name: "home",
|
||||||
component: HomeView
|
component: Home
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/about",
|
||||||
|
name: "about",
|
||||||
|
component: About
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/projects",
|
||||||
|
name: "projects",
|
||||||
|
component: Projects
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/resume",
|
||||||
|
name: "resume",
|
||||||
|
component: Resume
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/contacts",
|
||||||
|
name: "contacts",
|
||||||
|
component: Contacts
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Navbar from "@/components/Navbar/Navbar.vue";
|
import Navbar from "@/components/navbar/Navbar.vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import locale from "./locale.json";
|
import locale from "./locale.json";
|
||||||
|
|
||||||
20
src/views/contacts/Contacts.vue
Normal file
20
src/views/contacts/Contacts.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<Navbar />
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<h1 class="text-5xl font-bold">
|
||||||
|
{{ t("hello") }}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Navbar from "@/components/navbar/Navbar.vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import locale from "./locale.json";
|
||||||
|
|
||||||
|
const { t } = useI18n({ messages: locale });
|
||||||
|
</script>
|
||||||
8
src/views/contacts/locale.json
Normal file
8
src/views/contacts/locale.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"hello": "Hello"
|
||||||
|
},
|
||||||
|
"it": {
|
||||||
|
"hello": "Ciao"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/views/home/Home.vue
Normal file
20
src/views/home/Home.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<Navbar />
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<h1 class="text-5xl font-bold">
|
||||||
|
{{ t("hello") }}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Navbar from "@/components/navbar/Navbar.vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import locale from "./locale.json";
|
||||||
|
|
||||||
|
const { t } = useI18n({ messages: locale });
|
||||||
|
</script>
|
||||||
8
src/views/home/locale.json
Normal file
8
src/views/home/locale.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"hello": "Hello"
|
||||||
|
},
|
||||||
|
"it": {
|
||||||
|
"hello": "Ciao"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/views/projects/Projects.vue
Normal file
20
src/views/projects/Projects.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<Navbar />
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<h1 class="text-5xl font-bold">
|
||||||
|
{{ t("hello") }}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Navbar from "@/components/navbar/Navbar.vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import locale from "./locale.json";
|
||||||
|
|
||||||
|
const { t } = useI18n({ messages: locale });
|
||||||
|
</script>
|
||||||
8
src/views/projects/locale.json
Normal file
8
src/views/projects/locale.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"hello": "Hello"
|
||||||
|
},
|
||||||
|
"it": {
|
||||||
|
"hello": "Ciao"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/views/resume/Resume.vue
Normal file
20
src/views/resume/Resume.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<Navbar />
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<h1 class="text-5xl font-bold">
|
||||||
|
{{ t("hello") }}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Navbar from "@/components/navbar/Navbar.vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import locale from "./locale.json";
|
||||||
|
|
||||||
|
const { t } = useI18n({ messages: locale });
|
||||||
|
</script>
|
||||||
8
src/views/resume/locale.json
Normal file
8
src/views/resume/locale.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"hello": "Hello"
|
||||||
|
},
|
||||||
|
"it": {
|
||||||
|
"hello": "Ciao"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ module.exports = {
|
|||||||
content: [
|
content: [
|
||||||
"./index.html",
|
"./index.html",
|
||||||
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
||||||
|
"./node_modules/flowbite/**/*.js"
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {},
|
||||||
|
|||||||
@ -5,11 +5,16 @@ import vue from '@vitejs/plugin-vue'
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: "/",
|
base: "/",
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
watch: {
|
||||||
|
usePolling: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user