Compare commits
No commits in common. "cb458f34f28f5f59ac8e1996a00ebe1fcfa5054f" and "72bb162b525b258ec245f1e9e111926e80593a68" have entirely different histories.
cb458f34f2
...
72bb162b52
9 changed files with 77 additions and 172 deletions
|
@ -1,17 +1,85 @@
|
|||
<script setup lang="ts">
|
||||
import MenuBar from './components/MenuBar.vue';
|
||||
import { RouterLink, RouterView } from 'vue-router';
|
||||
import { RouterLink, RouterView } from 'vue-router'
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header>
|
||||
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
|
||||
|
||||
<div class="wrapper">
|
||||
<HelloWorld msg="You did it!" />
|
||||
|
||||
<nav>
|
||||
<RouterLink to="/">Home</RouterLink>
|
||||
<RouterLink to="/about">About</RouterLink>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<MenuBar/>
|
||||
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
header {
|
||||
line-height: 1.5;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 0 auto 2rem;
|
||||
}
|
||||
|
||||
nav {
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
nav a {
|
||||
display: inline-block;
|
||||
padding: 0 1rem;
|
||||
border-left: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
nav a:first-of-type {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
header {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
padding-right: calc(var(--section-gap) / 2);
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin: 0 2rem 0 0;
|
||||
}
|
||||
|
||||
header .wrapper {
|
||||
display: flex;
|
||||
place-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
nav {
|
||||
text-align: left;
|
||||
margin-left: -1rem;
|
||||
font-size: 1rem;
|
||||
|
||||
padding: 1rem 0;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -24,7 +24,7 @@ a,
|
|||
@media (min-width: 1024px) {
|
||||
body {
|
||||
display: flex;
|
||||
place-items: start;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
#app {
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import TieredMenu from 'primevue/tieredmenu';
|
||||
|
||||
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
label: 'HomeViw',
|
||||
//icon: 'pi pi-home',
|
||||
route: '/'
|
||||
},
|
||||
{
|
||||
label: 'Student',
|
||||
//icon: 'pi pi-graduation-cap',
|
||||
route: '/Student'
|
||||
},
|
||||
{
|
||||
label: 'Programmatic',
|
||||
//icon: 'pi pi-link'
|
||||
command: () => {
|
||||
router.push('/introduction');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'External',
|
||||
//icon: 'pi pi-home',
|
||||
items: [
|
||||
{
|
||||
label: 'Vue.js',
|
||||
url: 'https://vuejs.org/'
|
||||
},
|
||||
{
|
||||
label: 'Vite.js',
|
||||
url: 'https://vuejs.org/'
|
||||
}
|
||||
]
|
||||
}
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<div class="card flex justify-center">
|
||||
<TieredMenu :model="items">
|
||||
<template #item="{ item, props, hasSubmenu }">
|
||||
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
|
||||
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
|
||||
<span :class="item.icon" />
|
||||
<!--span class="ml-2">{{ item.label }}</span-->
|
||||
</a>
|
||||
</router-link>
|
||||
<a v-else v-ripple :href="item.url" :target="item.target" v-bind="props.action">
|
||||
<!--span :class="item.icon" /-->
|
||||
<span class="ml-2">{{ item.label }}</span>
|
||||
<span v-if="hasSubmenu" class="pi pi-angle-right ml-auto" />
|
||||
</a>
|
||||
</template>
|
||||
</TieredMenu>
|
||||
</div>
|
||||
|
||||
|
||||
</main>
|
||||
</template>
|
|
@ -1,75 +0,0 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<Menubar :model="items">
|
||||
<template #item="{ item, props, hasSubmenu }">
|
||||
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
|
||||
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
|
||||
<span :class="item.icon" />
|
||||
<span>{{ item.label }}</span>
|
||||
</a>
|
||||
</router-link>
|
||||
<a v-else v-ripple :href="item.url" :target="item.target" v-bind="props.action">
|
||||
<span :class="item.icon" />
|
||||
<span> n/A {{ item.label }}</span>
|
||||
<span v-if="hasSubmenu" class="pi pi-fw pi-angle-down" />
|
||||
</a>
|
||||
</template>
|
||||
</Menubar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Menubar from 'primevue/menubar';
|
||||
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
label: 'Home',
|
||||
icon: 'pi pi-home',
|
||||
route: '/'
|
||||
},
|
||||
{
|
||||
label: 'Student',
|
||||
icon: 'pi pi-graduation-cap',
|
||||
route: '/Student'
|
||||
},
|
||||
{
|
||||
label: 'Projects',
|
||||
icon: 'pi pi-search',
|
||||
items: [
|
||||
{
|
||||
label: 'Components',
|
||||
icon: 'pi pi-bolt'
|
||||
},
|
||||
{
|
||||
label: 'Blocks',
|
||||
icon: 'pi pi-server'
|
||||
},
|
||||
{
|
||||
label: 'UI Kit',
|
||||
icon: 'pi pi-pencil'
|
||||
},
|
||||
{
|
||||
label: 'Templates',
|
||||
icon: 'pi pi-palette',
|
||||
items: [
|
||||
{
|
||||
label: 'Apollo',
|
||||
icon: 'pi pi-palette'
|
||||
},
|
||||
{
|
||||
label: 'Ultima',
|
||||
icon: 'pi pi-palette'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Contact',
|
||||
icon: 'pi pi-envelope'
|
||||
}
|
||||
]);
|
||||
</script>
|
|
@ -1,6 +1,5 @@
|
|||
import './assets/main.css'
|
||||
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import PrimeVue from 'primevue/config'
|
||||
|
|
|
@ -17,12 +17,6 @@ const router = createRouter({
|
|||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/AboutView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/Student',
|
||||
name: 'Student',
|
||||
|
||||
component: () => import('../views/StudentView.vue'),
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import TheWelcome from '../components/TheWelcome.vue'
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<h1>Home View</h1>
|
||||
<main>
|
||||
<TheWelcome />
|
||||
</main>
|
||||
</template>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<template>
|
||||
<div class="Student">
|
||||
<h1>This is an Student page</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@media (min-width: 1024px) {
|
||||
.about {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -13,4 +13,4 @@ export default defineConfig({
|
|||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue