init project

This commit is contained in:
2025-05-22 16:12:20 +02:00
commit b4191ca43a
17 changed files with 11563 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist
# Node dependencies
node_modules
# Logs
logs
*.log
# Misc
.DS_Store
.fleet
.idea
# Local env files
.env
.env.*
!.env.example

75
README.md Normal file
View File

@ -0,0 +1,75 @@
# Nuxt Minimal Starter
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
## Setup
Make sure to install dependencies:
```bash
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
```
## Development Server
Start the development server on `http://localhost:3000`:
```bash
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
```
## Production
Build the application for production:
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
```
Locally preview production build:
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

11
app.vue Normal file
View File

@ -0,0 +1,11 @@
<template>
<div class="bg-bg-light text-text-light dark:text-text-dark dark:bg-bg-dark">
<UApp>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UApp>
</div>
</template>
<script setup lang="ts">
</script>

View File

@ -0,0 +1,81 @@
<template>
<div class="container mx-auto h-[120px] border-b border-border">
<div class="w-full h-full flex items-center justify-between">
<ul class="flex items-center gap-20 whitespace-nowrap">
<li
class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all"
>
01 <br />
Investice
</li>
<li
class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all"
>
02 <br />
O zlotě
</li>
<li
class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all"
>
03 <br />
Podnikání
</li>
<li
class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all"
>
04 <br />
O Nás
</li>
<li
class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all"
>
05 <br />
Kontakt
</li>
</ul>
<img src="./../public/Frame 1321315773.png" alt="Frame" />
<div class="flex items-center gap-7">
<UIcon class="w-8 h-8 cursor-pointer" name="i-heroicons-user" />
<UIcon
class="w-8 h-8 cursor-pointer"
name="i-heroicons-shopping-cart"
/>
</div>
<ThemeSwitcher />
<button
class="cursor-pointer hover:bg-brown/80 transition-all bg-brown py-3 px-6 font-medium text-white rounded-xl"
>
E-shop
</button>
</div>
</div>
</template>
<script lang="ts" setup>
// function nested object
const menu = {
items: [
{
active: true,
created: "2025-04-29 14:21:16.980Z",
id: "l10y982y139ep7u",
id_lang: "en",
id_page: "",
id_parent: "",
is_default: false,
is_root: true,
link_rewrite: "",
link_title: "",
meta_description: "",
meta_title: "",
name: "top",
page_name: "",
position_id: 0,
updated: "2025-05-09 08:34:06.650Z",
},
],
page: 1,
perPage: 50,
totalItems: 14,
totalPages: 1,
};
</script>

View File

@ -0,0 +1,28 @@
<script setup>
const colorMode = useColorMode();
const isDark = computed({
get() {
return colorMode.value === "dark";
},
set(_isDark) {
colorMode.preference = _isDark ? "dark" : "light";
},
});
</script>
<template>
<ClientOnly v-if="!colorMode?.forced">
<div class="w-8 h-8 flex items-center justify-center cursor-pointer">
<UIcon
class="w-8 h-8"
:name="isDark ? 'i-lucide-moon' : 'i-lucide-sun'"
@click="isDark = !isDark"
/>
</div>
<template #fallback>
<div class="size-20" />
</template>
</ClientOnly>
</template>

6
eslint.config.mjs Normal file
View File

@ -0,0 +1,6 @@
// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'
export default withNuxt(
// Your custom configs here
)

19
layouts/default.vue Normal file
View File

@ -0,0 +1,19 @@
<template>
<div
class="bg-bg-light dark:bg-bg-dark font-inter overflow-hidden min-h-screen flex flex-col"
>
<HeaderBlock />
<div class="flex-1">
<slot />
</div>
<!-- <footer-block /> -->
</div>
</template>
<script setup lang="ts">
import HeaderBlock from "~/components/HeaderBlock.vue";
useHead({
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.png" }],
});
</script>

18
main.css Normal file
View File

@ -0,0 +1,18 @@
@import "tailwindcss";
@import "@nuxt/ui";
@theme {
/* fonts */
--font-inter: "Inter", sans-serif;
/* colors */
--color-bg-light: #FFFEFB;
--color-bg-dark: #1A1A1A;
--color-border: #D3E0DE;
--color-text-light: #1A1A1A;
--color-text-dark: #FFFEFB;
--color-brown: #9A7F62
}

59
nuxt.config.ts Normal file
View File

@ -0,0 +1,59 @@
import tailwindcss from "@tailwindcss/vite";
export default defineNuxtConfig({
compatibilityDate: "2024-11-01",
devtools: { enabled: false },
// app: {
// pageTransition: { name: "page", mode: "out-in" },
// },
// nitro: {
// routeRules: {
// "/api/**": {
// proxy: {
// to: `${process.env.POCKETBASE_URL || "http://127.0.0.1:8090"}/api/**`,
// },
// },
// },
// },
modules: ["@pinia/nuxt", "@nuxt/eslint", "@nuxt/ui"],
// @nuxtjs/i18n"
// i18n: {
// locales: [
// { code: "pl", name: "Polski", icon: "emojione:flag-for-poland" },
// { code: "en", name: "English", icon: "emojione:flag-for-united-kingdom" },
// ],
// lazy: true,
// defaultLocale: "en",
// strategy: "prefix",
// bundle: {
// optimizeTranslationDirective: false,
// },
// },
css: ["~/main.css"],
vite: {
plugins: [tailwindcss()],
build: {
sourcemap: false,
},
server: {
allowedHosts: ["arina.ma-al.pl", "marek.ma-al.pl"],
watch: {
ignored: ["**/backend/pb_data/**"],
},
},
},
typescript: {
tsConfig: {
compilerOptions: {
typeRoots: ["./ts", "./node_modules/@types"],
},
include: ["./ts"],
},
},
ui: {},
icon: {
localApiEndpoint: "/___nuxt_icon",
},
});

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/eslint": "^1.4.1",
"@nuxt/ui": "^3.1.2",
"@pinia/nuxt": "^0.11.0",
"@tailwindcss/vite": "^4.1.7",
"nuxt": "^3.17.4",
"tailwindcss": "^4.1.7",
"vue": "^3.5.14",
"vue-router": "^4.5.1"
},
"devDependencies": {
"@nuxtjs/tailwindcss": "^6.14.0"
}
}

11090
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

BIN
public/Frame 1321315773.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

2
public/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-Agent: *
Disallow:

3
server/tsconfig.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}

118
taskfile.yml Normal file
View File

@ -0,0 +1,118 @@
version: '3'
vars:
REGISTRY: registry.ma-al.com
Version: '0.0.6'
BuildDate: $(date +"%Y-%m-%d %H:%M")
Company: Maal sp. z o.o.
CompanyUrl: "https://www.ma-al.com"
CompileStr: go build -ldflags "-s -w -X 'pocketbase/custom/version.Version={{.Version}}' -X 'pocketbase/custom/version.BuildDate={{.BuildDate}}' -X 'pocketbase/custom/version.Company={{.Company}}' -X 'pocketbase/custom/version.CompanyUrl={{.CompanyUrl}}'" -o ../.pocketbase/pocketbase .
tasks:
default:
cmds:
- task --list
silent: true
# compile_musl:
# aliases: [cm]
# desc: "compiles pocketbase for musl"
# env:
# CGO_ENABLED: "0"
# GOOS: "linux"
# GOARCH: "amd64"
# CC: "x86_64-linux-musl-gcc"
# cmds:
# - |
# mkdir -p ./.output
# cd ./backend
# {{.CompileStr}}
# compile_gnu:
# aliases: [cg]
# desc: "compiles pocketbase for gnu"
# env:
# CGO_ENABLED: "0"
# GOOS: "linux"
# GOARCH: "amd64"
# cmds:
# - |
# mkdir -p ./.output
# cd ./backend
# {{.CompileStr}}
# build_run_gnu:
# aliases: [br]
# desc: "compiles pocketbase for gnu"
# env:
# CGO_ENABLED: "0"
# GOOS: "linux"
# GOARCH: "amd64"
# cmds:
# - |
# mkdir -p ./.output
# cd ./backend
# go build -ldflags "-s -w" -o ../.pocketbase/pocketbase .
# cd ..
# ./.pocketbase/pocketbase serve --dir=./backend/pb_data
# watch_backend:
# aliases: [wb]
# desc: "watch backend and compile"
# cmds:
# - |
# cd ./backend
# pwd
# air -build.args_bin='serve --dir=./pb_data' -build.exclude_dir=pb_data,backups -build.include_ext=go
watch_front:
aliases: [wf]
desc: "build and watch frontend in dev mode"
cmds:
- |
pnpm run dev
preview_front:
aliases: [pf]
desc: "build and preview frontend"
cmds:
- |
pnpm run build && pnpm run preview
rebuild_front:
aliases: [rf]
desc: "remove all and install all packages"
cmds:
- |
rm -rf ./node_modules ./pnpm-lock.yaml ./.nuxt ./.output
pnpm install
# build_docker_image:
# aliases: [bdi]
# desc: "build docker image"
# cmds:
# - |
# pnpm run build
# task compile_gnu
# cat <<EOF > temp.Dockerfile
# FROM node:slim
# COPY ./.output /nuxt
# COPY ./.pocketbase/pocketbase /bin/
# RUN mkdir /data
# # ENTRYPOINT ["ash"]
# CMD ["pocketbase", "serve", "--dir=/data", "--proxy=http://localhost:3000", "--subcommand=node /nuxt/server/index.mjs", "--http=0.0.0.0:8090"]
# EOF
# docker build -t {{.REGISTRY}}/abrasive/abrasive:{{.Version}} -t {{.REGISTRY}}/abrasive/abrasive:latest -f temp.Dockerfile .
# rm temp.Dockerfile
# push_docker_image:
# aliases: [pdi]
# desc: "push docker image to registry server"
# cmds:
# - |
# docker push {{.REGISTRY}}/abrasive/abrasive:{{.Version}}
# docker push {{.REGISTRY}}/abrasive/abrasive:latest

4
tsconfig.json Normal file
View File

@ -0,0 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}