From 22ba66bcf5348f07c27d572a217ca813ba6dfb66 Mon Sep 17 00:00:00 2001 From: Schnitzel Date: Fri, 4 Apr 2025 18:58:44 +0200 Subject: [PATCH 1/2] FE: add component MenuBar & ClassBar add view Student View Restrukture --- frontend/package.json | 1 + frontend/src/App.vue | 74 ++------------------------- frontend/src/assets/main.css | 4 +- frontend/src/components/ClassBar.vue | 68 +++++++++++++++++++++++++ frontend/src/components/MenuBar.vue | 75 ++++++++++++++++++++++++++++ frontend/src/main.ts | 1 + frontend/src/router/index.ts | 6 +++ frontend/src/views/HomeView.vue | 6 +-- frontend/src/views/StudentView.vue | 15 ++++++ frontend/vite.config.ts | 2 +- 10 files changed, 175 insertions(+), 77 deletions(-) create mode 100644 frontend/src/components/ClassBar.vue create mode 100644 frontend/src/components/MenuBar.vue create mode 100644 frontend/src/views/StudentView.vue diff --git a/frontend/package.json b/frontend/package.json index 9f3ed32..e3e16b5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,6 +16,7 @@ "dependencies": { "@primeuix/themes": "^1.0.1", "pinia": "^3.0.1", + "primeicons": "^7.0.0", "primevue": "^4.3.3", "vue": "^3.5.13", "vue-router": "^4.5.0" diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7905b05..039e7ea 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,85 +1,17 @@ diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 36fb845..d3cfe1f 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -1,4 +1,6 @@ @import './base.css'; +@import 'primeicons/primeicons.css'; + #app { max-width: 1280px; @@ -24,7 +26,7 @@ a, @media (min-width: 1024px) { body { display: flex; - place-items: center; + place-items: start; } #app { diff --git a/frontend/src/components/ClassBar.vue b/frontend/src/components/ClassBar.vue new file mode 100644 index 0000000..2e0f014 --- /dev/null +++ b/frontend/src/components/ClassBar.vue @@ -0,0 +1,68 @@ + + + + diff --git a/frontend/src/components/MenuBar.vue b/frontend/src/components/MenuBar.vue new file mode 100644 index 0000000..86b4c64 --- /dev/null +++ b/frontend/src/components/MenuBar.vue @@ -0,0 +1,75 @@ + + + diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 426cec8..a41a837 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1,5 +1,6 @@ import './assets/main.css' + import { createApp } from 'vue' import { createPinia } from 'pinia' import PrimeVue from 'primevue/config' diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 3e49915..2034ec4 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -17,6 +17,12 @@ 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'), + }, ], }) diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index d5c0217..fcdc55b 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -1,9 +1,7 @@ + diff --git a/frontend/src/views/StudentView.vue b/frontend/src/views/StudentView.vue new file mode 100644 index 0000000..a085113 --- /dev/null +++ b/frontend/src/views/StudentView.vue @@ -0,0 +1,15 @@ + + + diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 27b27e7..705b16e 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -13,4 +13,4 @@ export default defineConfig({ '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, -}) +}) \ No newline at end of file From d7e21c56204d71d445bc9a084d364adb3be5eb57 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 7 Apr 2025 11:04:01 +0200 Subject: [PATCH 2/2] Frontend: rm Primvue icons --- frontend/package.json | 1 - frontend/src/assets/main.css | 2 -- frontend/src/components/ClassBar.vue | 12 ++++++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index e3e16b5..9f3ed32 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,7 +16,6 @@ "dependencies": { "@primeuix/themes": "^1.0.1", "pinia": "^3.0.1", - "primeicons": "^7.0.0", "primevue": "^4.3.3", "vue": "^3.5.13", "vue-router": "^4.5.0" diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index d3cfe1f..ed04f51 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -1,6 +1,4 @@ @import './base.css'; -@import 'primeicons/primeicons.css'; - #app { max-width: 1280px; diff --git a/frontend/src/components/ClassBar.vue b/frontend/src/components/ClassBar.vue index 2e0f014..e77540e 100644 --- a/frontend/src/components/ClassBar.vue +++ b/frontend/src/components/ClassBar.vue @@ -10,24 +10,24 @@ const router = useRouter(); const items = ref([ { label: 'HomeViw', - icon: 'pi pi-home', + //icon: 'pi pi-home', route: '/' }, { label: 'Student', - icon: 'pi pi-graduation-cap', + //icon: 'pi pi-graduation-cap', route: '/Student' }, { label: 'Programmatic', - icon: 'pi pi-link', + //icon: 'pi pi-link' command: () => { router.push('/introduction'); } }, { label: 'External', - icon: 'pi pi-home', + //icon: 'pi pi-home', items: [ { label: 'Vue.js', @@ -51,11 +51,11 @@ const items = ref([ - {{ item.label }} + - + {{ item.label }}