first commit

This commit is contained in:
k327 2025-12-26 21:51:53 +01:00
commit 5e871ca2bd
12 changed files with 3106 additions and 0 deletions

36
.gitignore vendored Normal file
View file

@ -0,0 +1,36 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tsbuildinfo
.eslintcache
# Cypress
/cypress/videos/
/cypress/screenshots/
# Vitest
__screenshots__/

3
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}

2
README.md Normal file
View file

@ -0,0 +1,2 @@
kariga kliker
https://u.k327.eu/karigakliker/

13
index.html Normal file
View file

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

8
jsconfig.json Normal file
View file

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

2949
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

24
package.json Normal file
View file

@ -0,0 +1,24 @@
{
"name": "kariga-clicker",
"version": "0.0.0",
"private": true,
"type": "module",
"engines": {
"node": "^20.19.0 || >=22.12.0"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.18",
"tailwindcss": "^4.1.18",
"vue": "^3.5.25"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.2",
"vite": "^7.2.4",
"vite-plugin-vue-devtools": "^8.0.5"
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

46
src/App.vue Normal file
View file

@ -0,0 +1,46 @@
<script setup>
import { ref } from "vue";
const liczba = ref(0);
const mnoznik = ref(1);
const przedmioty = ref([
{ i: 1, cena: 20, name: "kisiel malinowy", ilosc: 0 },
{ i: 5, cena: 100, name: "kisiel truskawkowy", ilosc: 0 },
{ i: 50, cena: 500, name: "kisiel poziomkowy", ilosc: 0 },
{ i: 1000, cena: 3000, name: "kisiel wiśniowy", ilosc: 0 },
{ i: 9999, cena: 125000, name: "karibooru", ilosc: 0 },
{ i: 99999999, cena: 9999999, name: "fabryka slodkiej chwili", ilosc: 0 }
])
function kup(idx) {
mnoznik.value += przedmioty.value[idx].i;
przedmioty.value[idx].ilosc++;
liczba.value -= przedmioty.value[idx].cena;
}
</script>
<template>
<main style="background-color: #d5c2e5; height: 100vh; width: 100vw">
<h1>kariga kliker</h1>
<p>{{ liczba }}</p>
<p>liczby per klik {{ mnoznik }}</p>
<button @click="liczba+=mnoznik">kilkaj mnie</button>
<div>
<button
v-for="p, idx of przedmioty"
@click="liczba >= p.cena ? kup(idx) : {}"
>{{ p.name }} cena {{ p.cena }} ty masz {{ p.ilosc }}</button>
</div>
</main>
</template>
<style>
body, main {
padding:0;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
}
</style>

0
src/assets/main.css Normal file
View file

6
src/main.js Normal file
View file

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

19
vite.config.js Normal file
View file

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