feat: FRO-2 Implement Login Component wip

This commit is contained in:
2025-12-03 21:58:39 +01:00
committed by Janis
parent 4e6cb4a350
commit e8e3a08b7c
5 changed files with 176 additions and 7 deletions

View File

@@ -19,7 +19,10 @@
"@quasar/extras": "^1.17.0",
"quasar": "^2.18.6",
"vue": "^3.5.25",
"vue-router": "^4.6.3"
"vue-router": "^4.6.3",
"tsparticles": "~3.9.1",
"@tsparticles/vue3": "~3.0.1",
"bootstrap-vue-next": "~0.40.9"
},
"devDependencies": {
"@quasar/vite-plugin": "^1.10.0",

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import LoginView from "@/views/LoginView.vue";
</script>
<template>
@@ -8,16 +9,18 @@ import HelloWorld from './components/HelloWorld.vue'
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<!-- <HelloWorld msg="You did it!" />-->
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
<!-- <nav>-->
<!-- <RouterLink to="/">Home</RouterLink>-->
<!-- <RouterLink to="/about">About</RouterLink>-->
<!-- <RouterLink to="/login">Login</RouterLink>-->
<!-- </nav>-->
<LoginView/>
</div>
</header>
<RouterView />
<!-- <RouterView />-->
</template>
<style scoped>

View File

@@ -3,9 +3,16 @@ import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Particles from "@tsparticles/vue3";
import { loadFull } from "tsparticles";
const app = createApp(App)
app.use(router)
app.use(Particles, {
init: async engine => {
await loadFull(engine);
},
})
app.mount('#app')

View File

@@ -1,5 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -9,6 +10,11 @@ const router = createRouter({
name: 'home',
component: HomeView,
},
{
path: '/login',
name: 'login',
component: LoginView,
},
{
path: '/about',
name: 'about',

150
src/views/LoginView.vue Normal file
View File

@@ -0,0 +1,150 @@
<script lang="ts" setup>
const options = {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"area": 800
}
},
"color": {
"value": "#ffffff"
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"sides": 5
},
"image": {
"src": "img/github.svg",
"width": 100,
"height": 100
}
},
"opacity": {
"value": 0.5,
"random": false,
"animation": {
"enable": false,
"speed": 1,
"minimumValue": 0.1,
"sync": false
}
},
"size": {
"value": 3,
"random": true,
"animation": {
"enable": false,
"speed": 40,
"minimumValue": 0.1,
"sync": false
}
},
"links": {
"enable": true,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
"width": 1
},
"move": {
"enable": true,
"speed": 1,
"direction": "none",
"random": false,
"straight": false,
"outModes": {
"default": "out"
},
"attract": {
"enable": false,
"rotate": {
"x": 600,
"y": 1200
}
}
}
},
"interactivity": {
"detectsOn": "canvas",
"events": {
"onHover": {
"enable": false,
"mode": "repulse"
},
"onClick": {
"enable": false,
"mode": "push"
},
"resize": true
},
"modes": {
"grab": {
"distance": 400,
"links": {
"opacity": 1
}
},
"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3
},
"repulse": {
"distance": 200,
"duration": 0.4
},
"push": {
"quantity": 4
},
"remove": {
"quantity": 2
}
}
},
"detectRetina": true
};
</script>
<template>
<div class="login-box">
</div>
<vue-particles
id="particles-js"
:options='options'
/>
</template>
<style scoped>
.login-box {
position: fixed;
align-items: center;
justify-content: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
width: 100%;
max-width: 420px;
padding: 1rem;
z-index: 2;
}
#loginParticles {
background-color: rgb(11, 8, 8);
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%;
}
</style>