Can you provide code for a personal portfolio website using vuejs, vuetify and typescript?
- User
Can you provide code for a personal portfolio website using vuejs, vuetify and typescript?
- Assistant
Can you provide code for a personal portfolio website using vuejs, vuetify and typescript?
While it's difficult to provide an entire personal portfolio website code in a single response, I can give you a starting point with a simple structure that you can expand on. You can also check the Vue.js documentation for more details on how to use Vue.js.
npm install -g @vue/cli
vue create my-portfolio
Choose "Manually select features" and select "TypeScript" and "CSS Pre-processors" in the feature list. After the project creation, navigate to the my-portfolio folder:
cd my-portfolio
vue add vuetify
src/App.vue with the following code:<template>
<v-app>
<v-navigation-drawer app mini-variant>
<v-list dense>
<template v-for="(item, index) in menuItems">
<v-list-item :key="index" :to="item.link">
<v-list-item-icon>
<v-icon>{{ item.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item>
</template>
</v-list>
</v-navigation-drawer>
<v-app-bar app>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title>My Portfolio</v-toolbar-title>
<v-spacer></v-spacer>
</v-app-bar>
<v-main>
<v-container fluid>
<router-view></router-view>
</v-container>
</v-main>
</v-app>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component
export default class App extends Vue {
drawer = false;
menuItems = [
{ title: "Home", icon: "mdi-home", link: { name: "Home" } },
{ title: "Projects", icon: "mdi-briefcase", link: { name: "Projects" } },
{ title: "Contact", icon: "mdi-email", link: { name: "Contact" } },
];
}
</script>
<style>
html,
body,
#app {
height: 100%;
width: 100%;
margin: 0;
}
</style>
src/router/index.ts:import Home from "../views/Home.vue";
import Projects from "../views/Projects.vue";
import Contact from "../views/Contact.vue";
const routes: Array<RouteConfig> = [
{
path: "/",
name: "Home",
component: Home,
},
{
path: "/projects",
name: "Projects",
component: Projects,
},
{
path: "/contact",
name: "Contact",
component: Contact,
},
];
src/views/ folder for Home.vue, Projects.vue, and Contact.vue. Fill in your portfolio details:<!-- Home.vue -->
<template>
<div>
<h1>Welcome to My Portfolio</h1>
<p>I'm [Your Name], a [Your Profession]. Here's a brief introduction about myself and skills...</p>
</div>
</template>
<!-- Projects.vue -->
<template>
<div>
<h1>Projects</h1>
<p>Here are some projects I've worked on...</p>
</div>
</template>
<!-- Contact.vue -->
<template>
<div>
<h1>Contact Me</h1>
<p>Please feel free to reach out to me...</p>
</div>
</template>
npm run serve
You can now develop your personal portfolio website by adding your content and styling it to your liking. Don't forget to check the Vue.js and Vuetify documentation for more components and options.
Not yet included in a published release.