added first layout
This commit is contained in:
10
resources/js/Layouts/BELayout.vue
Normal file
10
resources/js/Layouts/BELayout.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<main class="bg-slate-100 flex justify-center h-screen">
|
||||
<div class="m-auto bg-white p-4 border rounded space-y-4 drop-shadow">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
11
resources/js/pages/Events/List.vue
Normal file
11
resources/js/pages/Events/List.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import BELayout from '@/Layouts/BELayout.vue'
|
||||
|
||||
defineOptions({ layout: BELayout })
|
||||
|
||||
</script>
|
||||
@@ -1,15 +1,42 @@
|
||||
<template>
|
||||
<main class="bg-slate-50 h-screen flex justify-center">
|
||||
<div class="m-auto bg-white p-4 border rounded space-y-4 drop-shadow">
|
||||
<h1 class="text-center text-lg font-bold">Login</h1>
|
||||
<n-input>
|
||||
|
||||
</n-input>
|
||||
|
||||
<n-input>
|
||||
|
||||
</n-input>
|
||||
</div>
|
||||
</main>
|
||||
<h1 class="text-center text-lg font-bold">Login</h1>
|
||||
|
||||
</template>
|
||||
<n-form
|
||||
label-placement="top"
|
||||
:model="formValue"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
>
|
||||
<n-form-item label="Benutzername" path="user">
|
||||
<n-input v-model:value="formValue.user" placeholder="Benutzername" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Passwort" path="password">
|
||||
<n-input v-model:value="formValue.password" placeholder="Passwort"></n-input>
|
||||
</n-form-item>
|
||||
<div class="flex justify-center">
|
||||
<n-button class="bg-[#18A058]" type="success" @click="onClickLogin">Einloggen</n-button>
|
||||
</div>
|
||||
</n-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { router } from '@inertiajs/vue3'
|
||||
import BELayout from '@/Layouts/BELayout.vue'
|
||||
|
||||
defineOptions({ layout: BELayout })
|
||||
|
||||
const formRef = ref(null)
|
||||
const formValue = ref({
|
||||
user: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
const rules = ref(undefined)
|
||||
|
||||
function onClickLogin(){
|
||||
router.get(
|
||||
'/Events'
|
||||
)
|
||||
}
|
||||
</script>
|
||||
@@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>AdonisJS - A fully featured web framework for Node.js</title>
|
||||
@entryPointStyles('app')
|
||||
@entryPointScripts('app')
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<main>
|
||||
<div>
|
||||
<h1 class="title"> It Works! </h1>
|
||||
<p class="subtitle">
|
||||
Congratulations, you have just created your first AdonisJS app.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
The route for this page is defined inside <code>start/routes.ts</code> file
|
||||
</li>
|
||||
|
||||
<li>
|
||||
You can update this page by editing <code>resources/views/welcome.edge</code> file
|
||||
</li>
|
||||
|
||||
<li>
|
||||
If you run into problems, you can reach us on <a href="https://discord.gg/vDcEjq6?">Discord</a> or the <a href="https://forum.adonisjs.com/">Forum</a>.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user