Initial commit
This commit is contained in:
commit
cae6b5c9ec
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
tab_width = 4
|
||||||
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
/cypress/videos/
|
||||||
|
/cypress/screenshots/
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
*.tsbuildinfo
|
||||||
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"editorconfig.editorconfig",
|
||||||
|
"vue.volar"
|
||||||
|
]
|
||||||
|
}
|
||||||
29
README.md
Normal file
29
README.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# bikelist
|
||||||
|
|
||||||
|
This template should help get you started developing with Vue 3 in Vite.
|
||||||
|
|
||||||
|
## Recommended IDE Setup
|
||||||
|
|
||||||
|
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||||
|
|
||||||
|
## Customize configuration
|
||||||
|
|
||||||
|
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||||
|
|
||||||
|
## Project Setup
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Hot-Reload for Development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Minify for Production
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
17
index.html
Normal file
17
index.html
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<!--meta name="color-scheme" content="dark light"-->
|
||||||
|
<link rel="stylesheet" href="/public/styles.css">
|
||||||
|
<title>Bike list</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
8
jsconfig.json
Normal file
8
jsconfig.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exclude": ["node_modules", "dist"]
|
||||||
|
}
|
||||||
1033
package-lock.json
generated
Normal file
1033
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
19
package.json
Normal file
19
package.json
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "bikelist",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"devnet": "vite --host",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^3.4.21"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
|
"vite": "^5.2.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
72
public/styles.css
Normal file
72
public/styles.css
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
:root {
|
||||||
|
--white-neutral: #f4f4f9;
|
||||||
|
--white-hover: #ececff;
|
||||||
|
--black-neutral: #1a1a1c;
|
||||||
|
--black-hover: #282833;
|
||||||
|
--accent: #7a7a99;
|
||||||
|
|
||||||
|
--primary: var(--black-neutral);
|
||||||
|
--background: var(--white-neutral);
|
||||||
|
--hover-background: var(--white-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: var(--primary);
|
||||||
|
background-color: var(--background);
|
||||||
|
padding: 3ch;
|
||||||
|
max-width: 80ch;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: system-ui;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style-type: "-";
|
||||||
|
padding-left: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
padding-left: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
line-height: 1.4;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin: 1.2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
line-height: 1.2;
|
||||||
|
font-size: 1.44rem;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 1.44rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
line-height: 1.0;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 1.73rem;
|
||||||
|
margin: 1.73rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
--primary: var(--black-neutral);
|
||||||
|
--background: var(--white-neutral);
|
||||||
|
--hover-background: var(--white-hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--primary: var(--white-neutral);
|
||||||
|
--background: var(--black-neutral);
|
||||||
|
--hover-background: var(--black-hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
111
src/App.vue
Normal file
111
src/App.vue
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
const allTasks = () => [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
task: "Helm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
task: "Handschuhe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
task: "Wasserflasche"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
task: "Lichter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
task: "Luftdruck"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
task: "Handy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
task: "Sonnenbrille"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
task: "Windbrille"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
|
task: "Schloss-Schlüssel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 9,
|
||||||
|
task: "Schloss"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 10,
|
||||||
|
task: "Ventil Adapter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 11,
|
||||||
|
task: "Reflektor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 12,
|
||||||
|
task: "Licht Ladekabel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 13,
|
||||||
|
task: "SP-Connect Teil"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const tasks = ref(allTasks())
|
||||||
|
|
||||||
|
const taskDone = (task) => {
|
||||||
|
task.done = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const reset = () => {
|
||||||
|
tasks.value = allTasks()
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<h1>Fahrrad Liste</h1>
|
||||||
|
<ul class="unselectable">
|
||||||
|
<li v-for="task in tasks" :class="{done: task.done}">
|
||||||
|
<span v-on:click="taskDone(task)">{{ task.task }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<button type="button" @click="reset">Reset</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.done {
|
||||||
|
opacity: 0.5;
|
||||||
|
text-decoration: line-through;
|
||||||
|
font-weight: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unselectable {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
5
src/main.js
Normal file
5
src/main.js
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// import './assets/main.css'
|
||||||
|
import { createApp } from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
|
||||||
|
createApp(App).mount('#app')
|
||||||
17
vite.config.js
Normal file
17
vite.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
base: '',
|
||||||
|
plugins: [
|
||||||
|
vue(),
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
Loading…
Reference in a new issue