Added first Project

This commit is contained in:
Phil 2024-10-21 17:35:32 +02:00
parent ec11599e0a
commit 3bd7b1b9ca
Signed by: Phil
GPG key ID: 350C8B7C4EF5DED4
6 changed files with 51 additions and 25 deletions

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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
} }
] ]
}) })

View file

@ -1,5 +0,0 @@
<template>
<div>
<h1>About View</h1>
</div>
</template>

View file

@ -1,5 +1,43 @@
import axios from 'axios'
<template> <template>
<center>
<br><br><br><br>
<div class="items-center gap-2">
<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> <div>
<h1>Home View</h1> {{info}}
</div> </div>
</div>
</center>
</template> </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>