[FRONTEND] Added boilerplate with daisyui / tailwijndcss
All checks were successful
ci/woodpecker/pr/0-pre Pipeline was successful
ci/woodpecker/pr/1-build-check Pipeline was successful

This commit is contained in:
Phil 2025-04-09 20:32:39 +02:00
parent 8fcb946379
commit f8c2300b19
Signed by: Phil
GPG key ID: 350C8B7C4EF5DED4
13 changed files with 134 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 100
}

13
frontend/index.html Normal file
View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Goshorly</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

8
frontend/jsconfig.json Normal file
View file

@ -0,0 +1,8 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules", "dist"]
}

25
frontend/package.json Normal file
View file

@ -0,0 +1,25 @@
{
"name": "frontend",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"format": "prettier --write src/"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.3",
"tailwindcss": "^4.1.3",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.3",
"daisyui": "^5.0.17",
"prettier": "3.5.3",
"vite": "^6.2.4",
"vite-plugin-vue-devtools": "^7.7.2"
}
}

BIN
frontend/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

14
frontend/src/App.vue Normal file
View file

@ -0,0 +1,14 @@
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/Navbar.vue'
</script>
<template>
<header>
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</header>
<RouterView />
</template>

View file

@ -0,0 +1,2 @@
@import "tailwindcss";
@plugin "daisyui";

View file

@ -0,0 +1,3 @@
<template>
Component Navbar
</template>

11
frontend/src/main.js Normal file
View file

@ -0,0 +1,11 @@
import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.use(router)
app.mount('#app')

View file

@ -0,0 +1,20 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView,
},
{
path: '/about',
name: 'about',
component: () => import('../views/AboutView.vue'),
},
],
})
export default router

View file

@ -0,0 +1,3 @@
<template>
<h1>This is an about page</h1>
</template>

View file

@ -0,0 +1,9 @@
<script setup>
import Navbar from '../components/Navbar.vue'
</script>
<template>
<main>
<Navbar />
</main>
</template>

20
frontend/vite.config.js Normal file
View file

@ -0,0 +1,20 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import tailwindcss from "@tailwindcss/vite";
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
plugins: [
tailwindcss(),
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
})