generated from Phil/vue3template
Added first Project
This commit is contained in:
parent
ec11599e0a
commit
3bd7b1b9ca
6 changed files with 51 additions and 25 deletions
|
@ -8,6 +8,7 @@
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"axios": "^1.7.7",
|
||||||
"daisyui": "^3.7.3",
|
"daisyui": "^3.7.3",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-router": "^4.2.4"
|
"vue-router": "^4.2.4"
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<footer class="footer footer-center p-4 bg-base-300 text-base-content fixed inset-x-0 bottom-0">
|
<footer class="footer footer-center p-4 bg-base-300 text-base-content fixed inset-x-0 bottom-0">
|
||||||
<aside>
|
<aside>
|
||||||
<p>Copyright © 2023 - All right reserved by hackmi.ch / hTemplate</p>
|
<p>Copyright © 2024 - All right reserved by hackmi.ch</p>
|
||||||
|
<p>
|
||||||
|
<a href="https://git.hackmi.ch/Phil/about/src/branch/main/imprint.md">Imprint / Impressum</a> |
|
||||||
|
<a href="https://git.hackmi.ch/Phil/about/src/branch/main/PrivacyPolicy.md">Privacy Policy</a>
|
||||||
|
</p>
|
||||||
</aside>
|
</aside>
|
||||||
</footer>
|
</footer>
|
||||||
</template>
|
</template>
|
|
@ -13,22 +13,16 @@ import { RouterLink } from 'vue-router'
|
||||||
</label>
|
</label>
|
||||||
<ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
|
<ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
|
||||||
<li>
|
<li>
|
||||||
<RouterLink active-class="bg-base-100" to="/">Home</RouterLink>
|
<RouterLink active-class="bg-base-100" to="/">Startpage</RouterLink>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<RouterLink active-class="bg-base-100" to="/about">About</RouterLink>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn btn-ghost normal-case text-xl">hTemplate</a>
|
<a class="btn btn-ghost normal-case text-xl">start.hackmi.ch</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center hidden lg:flex">
|
<div class="navbar-center hidden lg:flex">
|
||||||
<ul class="menu menu-horizontal px-1">
|
<ul class="menu menu-horizontal px-1">
|
||||||
<li>
|
<li>
|
||||||
<RouterLink active-class="bg-base-100" to="/">Home</RouterLink>
|
<RouterLink active-class="bg-base-100" to="/">Startpage</RouterLink>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<RouterLink active-class="bg-base-100" to="/about">About</RouterLink>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { createRouter, createWebHistory } from "vue-router";
|
import { createRouter, createWebHistory } from "vue-router";
|
||||||
|
|
||||||
import HomeView from "../views/HomeView.vue"
|
import HomeView from "../views/HomeView.vue"
|
||||||
import AboutView from "../views/AboutView.vue"
|
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
|
@ -10,11 +9,6 @@ const router = createRouter({
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "home",
|
name: "home",
|
||||||
component: HomeView
|
component: HomeView
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/about",
|
|
||||||
name: "about",
|
|
||||||
component: AboutView
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h1>About View</h1>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
|
@ -1,5 +1,43 @@
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<center>
|
||||||
<h1>Home View</h1>
|
<br><br><br><br>
|
||||||
</div>
|
<div class="items-center gap-2">
|
||||||
</template>
|
<form action="https://google.de/search" method="get">
|
||||||
|
<input type="text" class="w-1/2 grow input input-bordered w-half half-w-ws" name="q" id="q"
|
||||||
|
placeholder="Search google">
|
||||||
|
<input class="btn ml-6" type="submit" name="Submit">
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
{{info}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</center>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from 'axios'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
axios
|
||||||
|
.get('http://fastdl.hackmi.ch/ts3users/users.info')
|
||||||
|
.then(response => {
|
||||||
|
this.info = response.data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
this.errored = true
|
||||||
|
})
|
||||||
|
.finally(() => this.loading = false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in a new issue