Browse Source

big commit

master
Jakub Škrabánek 2 years ago
parent
commit
a9e91e17c7
  1. 24
      clock/README.md
  2. 5
      clock/babel.config.js
  3. 19
      clock/jsconfig.json
  4. 19267
      clock/package-lock.json
  5. 43
      clock/package.json
  6. BIN
      clock/public/favicon.ico
  7. 17
      clock/public/index.html
  8. 26
      clock/src/App.vue
  9. BIN
      clock/src/assets/logo.png
  10. 55
      clock/src/components/DigitalClock.vue
  11. 58
      clock/src/components/HelloWorld.vue
  12. 4
      clock/src/main.js
  13. 4
      clock/vue.config.js
  14. 24
      comp/README.md
  15. 5
      comp/babel.config.js
  16. 19
      comp/jsconfig.json
  17. 19267
      comp/package-lock.json
  18. 43
      comp/package.json
  19. BIN
      comp/public/favicon.ico
  20. 17
      comp/public/index.html
  21. 26
      comp/src/App.vue
  22. BIN
      comp/src/assets/logo.png
  23. 59
      comp/src/components/CompBook.vue
  24. 58
      comp/src/components/HelloWorld.vue
  25. 4
      comp/src/main.js
  26. 4
      comp/vue.config.js
  27. 24
      counter/README.md
  28. 5
      counter/babel.config.js
  29. 19
      counter/jsconfig.json
  30. 19265
      counter/package-lock.json
  31. 43
      counter/package.json
  32. BIN
      counter/public/favicon.ico
  33. 17
      counter/public/index.html
  34. 26
      counter/src/App.vue
  35. BIN
      counter/src/assets/logo.png
  36. 45
      counter/src/components/HelloWorld.vue
  37. 4
      counter/src/main.js
  38. 4
      counter/vue.config.js
  39. 24
      kalkulacka/README.md
  40. 5
      kalkulacka/babel.config.js
  41. 19
      kalkulacka/jsconfig.json
  42. 19265
      kalkulacka/package-lock.json
  43. 43
      kalkulacka/package.json
  44. BIN
      kalkulacka/public/favicon.ico
  45. 17
      kalkulacka/public/index.html
  46. 25
      kalkulacka/src/App.vue
  47. BIN
      kalkulacka/src/assets/logo.png
  48. 119
      kalkulacka/src/components/CalcComp.vue
  49. 4
      kalkulacka/src/main.js
  50. 4
      kalkulacka/vue.config.js
  51. 24
      list/README.md
  52. 5
      list/babel.config.js
  53. 19
      list/jsconfig.json
  54. 19267
      list/package-lock.json
  55. 43
      list/package.json
  56. BIN
      list/public/favicon.ico
  57. 17
      list/public/index.html
  58. 26
      list/src/App.vue
  59. BIN
      list/src/assets/logo.png
  60. 70
      list/src/components/HelloWorld.vue
  61. 4
      list/src/main.js
  62. 4
      list/vue.config.js
  63. 24
      obrazky/README.md
  64. 5
      obrazky/babel.config.js
  65. 19
      obrazky/jsconfig.json
  66. 19298
      obrazky/package-lock.json
  67. 45
      obrazky/package.json
  68. BIN
      obrazky/public/favicon.ico
  69. 17
      obrazky/public/index.html
  70. 30
      obrazky/src/App.vue
  71. BIN
      obrazky/src/assets/logo.png
  72. 59
      obrazky/src/components/HelloWorld.vue
  73. 5
      obrazky/src/main.js
  74. 31
      obrazky/src/router/index.js
  75. 5
      obrazky/src/views/AboutView.vue
  76. 39
      obrazky/src/views/DetailView.vue
  77. 39
      obrazky/src/views/HomeView.vue
  78. 4
      obrazky/vue.config.js
  79. 4
      produkty/.browserslistrc
  80. 17
      produkty/.eslintrc.js
  81. 24
      produkty/README.md
  82. 5
      produkty/babel.config.js
  83. 19
      produkty/jsconfig.json
  84. 19298
      produkty/package-lock.json
  85. 25
      produkty/package.json
  86. BIN
      produkty/public/favicon.ico
  87. 17
      produkty/public/index.html
  88. 30
      produkty/src/App.vue
  89. BIN
      produkty/src/assets/logo.png
  90. 59
      produkty/src/components/HelloWorld.vue
  91. 5
      produkty/src/main.js
  92. 29
      produkty/src/router/index.js
  93. 44
      produkty/src/views/BlogView.vue
  94. 38
      produkty/src/views/DetailsView.vue
  95. 18
      produkty/src/views/HomeView.vue
  96. 4
      produkty/vue.config.js
  97. 4
      routervue/.browserslistrc
  98. 17
      routervue/.eslintrc.js
  99. 24
      routervue/README.md
  100. 5
      routervue/babel.config.js

24
clock/README.md

@ -0,0 +1,24 @@
# clock
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
clock/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
clock/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19267
clock/package-lock.json

File diff suppressed because it is too large

43
clock/package.json

@ -0,0 +1,43 @@
{
"name": "clock",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
clock/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
clock/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

26
clock/src/App.vue

@ -0,0 +1,26 @@
<template>
<img alt="Vue logo" src="./assets/logo.png">
<DigitalClock />
</template>
<script>
import DigitalClock from './components/DigitalClock.vue'
export default {
name: 'App',
components: {
DigitalClock
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
clock/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

55
clock/src/components/DigitalClock.vue

@ -0,0 +1,55 @@
<template lang="">
<div class="container">
<h1>{{title}}</h1>
<hr>
<div class="LCD">
<div class="hours">{{hours}}</div>
<div>:</div>
<div class="minutes">{{minutes}}</div>
<div>:</div>
<div class="seconds">{{seconds}}</div>
</div>
</div>
</template>
<script>
export default {
name: "DigitalClock",
data() {
return{
title:"Digitalni hodiny",
hours: 0,
minutes: 0,
seconds: 0
}
},
methods: {
setTime(){
var date = new Date();
let hours = date.getHours();
let minutes = date.getMinutes();
let seconds = date.getSeconds();
hours = hours <= 9 ? `${hours}`.padStart(2,0) : hours
minutes = minutes <= 9 ? `${minutes}`.padStart(2,0) : minutes
seconds = seconds <= 9 ? `${seconds}`.padStart(2,0) : seconds
this.hours = hours;
this.minutes = minutes;
this.seconds = seconds;
}
},
mounted() {
setInterval(() => {
this.setTime()
}, 1000)
}
}
</script>
<style scoped>
.LCD {
display: flex;
justify-content: center;
}
.LCD > div{
font-size: x-large;
}
</style>

58
clock/src/components/HelloWorld.vue

@ -0,0 +1,58 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

4
clock/src/main.js

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

4
clock/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

24
comp/README.md

@ -0,0 +1,24 @@
# comp
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
comp/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
comp/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19267
comp/package-lock.json

File diff suppressed because it is too large

43
comp/package.json

@ -0,0 +1,43 @@
{
"name": "comp",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
comp/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
comp/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

26
comp/src/App.vue

@ -0,0 +1,26 @@
<template>
<!-- <img alt="Vue logo" src="./assets/logo.png"> -->
<CompBook />
</template>
<script>
import CompBook from './components/CompBook.vue'
export default {
name: 'App',
components: {
CompBook
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
comp/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

59
comp/src/components/CompBook.vue

@ -0,0 +1,59 @@
<template>
<div>
<h1>{{title}}</h1>
<h2>Autor: {{author.name}}</h2>
<p>Vydal autor knižky: <span>{{publikaceKnih}}</span> </p>
<p>Seznam knih:</p>
<ul v-if="publikaceKnih">
<li v-for="(data,index) in author.books" :key="index">
{{data}}
</li>
</ul>
</div>
<hr>
<p>{{now}}</p>
<hr>
<div>
First: <input type="text" v-model="firstname"> <br>
Second: <input type="text" v-model="secondname"> <br>
<h2> jsem [{{firstname}}] [{{secondname}}]</h2>
<h3>vypočítane: [{{getfullname}}]</h3>
</div>
</template>
<script>
export default {
name: 'CompBook',
data() {
return{
title: "Autorovo info",
firstname: "",
secondname: "",
author: {
name: "John Bill",
books: [
"Story 1 - begin",
"Story 2 - mid",
"Story 3 - neverend"
]
}
}
},
computed:{
publikaceKnih() {
return this.author.books.length > 0 ? "Ano vydal":"Ne nepsal"
},
now(){
var d = Date(Date.now());
return d;
},
getfullname() {
return this.firstname + " " + this.secondname
}
}
}
</script>
<style scoped>
</style>

58
comp/src/components/HelloWorld.vue

@ -0,0 +1,58 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

4
comp/src/main.js

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

4
comp/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

24
counter/README.md

@ -0,0 +1,24 @@
# counter
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
counter/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
counter/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19265
counter/package-lock.json

File diff suppressed because it is too large

43
counter/package.json

@ -0,0 +1,43 @@
{
"name": "counter",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
counter/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
counter/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

26
counter/src/App.vue

@ -0,0 +1,26 @@
<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld msg="Hello Vue"/>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
counter/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

45
counter/src/components/HelloWorld.vue

@ -0,0 +1,45 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>Počet kliknutí: {{count}}</p>
<button @click="pridatHodnotu">Zvýšit hodnotu</button>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
},
data: function() {
return {
count: 0
}
},
methods: {
pridatHodnotu: function() {
this.count++;
console.log("Zvysena hodnota");
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

4
counter/src/main.js

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

4
counter/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

24
kalkulacka/README.md

@ -0,0 +1,24 @@
# kalkulacka
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
kalkulacka/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
kalkulacka/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19265
kalkulacka/package-lock.json

File diff suppressed because it is too large

43
kalkulacka/package.json

@ -0,0 +1,43 @@
{
"name": "kalkulacka",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
kalkulacka/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
kalkulacka/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

25
kalkulacka/src/App.vue

@ -0,0 +1,25 @@
<template>
<CalcComp />
</template>
<script>
import CalcComp from './components/CalcComp.vue'
export default {
name: 'App',
components: {
CalcComp
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
kalkulacka/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

119
kalkulacka/src/components/CalcComp.vue

@ -0,0 +1,119 @@
<template>
<div class="calculator">
<div class="display">{{current || '0'}}</div>
<div class="btn operator" @click="clear">C</div>
<div class="btn operator">+/-</div>
<div class="btn operator" @click="procent">%</div>
<div class="btn operator" @click="divide">/</div>
<div class="btn" @click="append(7)">7</div>
<div class="btn" @click="append(8)">8</div>
<div class="btn" @click="append(9)">9</div>
<div class="btn operator" @click="times">*</div>
<div class="btn" @click="append(4)">4</div>
<div class="btn" @click="append(5)">5</div>
<div class="btn" @click="append(6)">6</div>
<div class="btn operator" @click="minus">-</div>
<div class="btn" @click="append(1)">1</div>
<div class="btn" @click="append(2)">2</div>
<div class="btn" @click="append(3)">3</div>
<div class="btn operator" @click="add">+</div>
<div class="btn nula" @click="append(0)">0</div>
<div class="btn ">.</div>
<div class="btn operator" @click="equal">=</div>
</div>
</template>
<script>
export default{
data(){
return{
current: '',
previous: null,
operator: null,
operatorClicked: false
}
},
methods:{
// vedlejší metody
//vyčičtění
clear() {
this.current = "";
},
//přídaní čísla
append(number) {
if (this.operatorClicked)
{
this.current="";
this.operatorClicked= false;
}
this.current= `${this.current}${number}`;
},
//ošetření vstupu
setPrevious(){
this.previous = this.current;
this.operatorClicked = true;
},
//Jednotlive operace
//sčítání
add() {
this.operator = (a,b) => a + b;
this.setPrevious();
},
//Odčítání
minus(){
this.operator = (a,b) => a - b;
this.setPrevious();
},
//Dělení
divide(){
this.operator = (a,b) => a / b;
this.setPrevious();
},
//Násobení
times() {
this.operator = (a,b) => a * b;
this.setPrevious();
},
//Procento
procent() {
this.current = this.current / 100;
},
//VÝSLEDEK
equal() {
this.current = this.operator(parseFloat(this.previous),parseFloat(this.current));
this.previous = null;
}
}
}
</script>
<style scoped>
.calculator {
width: 400px;
margin: 0 auto;
font-size:40px;
display: grid;
grid-template-columns: repeat(4,1fr);
grid-auto-rows: minmax(50px,auto);
}
.display{
grid-column: 1/5;
background-color: lightblue;
}
.btn{
background-color: lightgray;
border: 1px solid gray;
}
.nula {
grid-column: 1/3;
}
.operator {
background-color: orange;
color: whitesmoke;
}
</style>

4
kalkulacka/src/main.js

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

4
kalkulacka/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

24
list/README.md

@ -0,0 +1,24 @@
# list
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
list/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
list/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19267
list/package-lock.json

File diff suppressed because it is too large

43
list/package.json

@ -0,0 +1,43 @@
{
"name": "list",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
list/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
list/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

26
list/src/App.vue

@ -0,0 +1,26 @@
<template>
<!-- <img alt="Vue logo" src="./assets/logo.png"> -->
<HelloWorld/>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

BIN
list/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

70
list/src/components/HelloWorld.vue

@ -0,0 +1,70 @@
<template>
<h1>{{nadpis}}</h1>
<div>
<input type="text" v-model="novinka" placeholder="INPUT">
<button @click="addNovinka" :disabled="novinka.length < 1">Přidat</button>
</div>
<div v-if="novinka.length > 0">
<h3>Novinka:</h3>
<p>{{novinka}}</p>
</div>
<ul>
<li v-for="polozka in seznam" :key="polozka.id">
{{polozka.id}}. {{polozka.nazev}} -
<span v-if="polozka.dokoncen">
SUPER
</span>
<span v-else>
DOKONČIT
</span>
</li>
</ul>
</template>
<script>
export default {
data() {
return{
nadpis: "List zobrazení",
novinka: "",
seznam: [
{id:1, nazev: "Nazev 1", dokoncen: false},
{id:2, nazev: "Nazev 2", dokoncen: true},
{id:3, nazev: "Nazev 3", dokoncen: true},
{id:4, nazev: "Nazev 4", dokoncen: false},
]
}
},
methods: {
addNovinka() {
this.seznam.push({
id: this.seznam.length + 1,
nazev: this.novinka,
dokoncen: false
});
this.novinka = "";
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
/* display: inline-block; */
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

4
list/src/main.js

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

4
list/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

24
obrazky/README.md

@ -0,0 +1,24 @@
# obrazky
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
obrazky/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
obrazky/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19298
obrazky/package-lock.json

File diff suppressed because it is too large

45
obrazky/package.json

@ -0,0 +1,45 @@
{
"name": "obrazky",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13",
"vue-router": "^4.0.3"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}

BIN
obrazky/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
obrazky/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

30
obrazky/src/App.vue

@ -0,0 +1,30 @@
<template>
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view/>
</template>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
}
nav a {
font-weight: bold;
color: #2c3e50;
}
nav a.router-link-exact-active {
color: #42b983;
}
</style>

BIN
obrazky/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

59
obrazky/src/components/HelloWorld.vue

@ -0,0 +1,59 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

5
obrazky/src/main.js

@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
createApp(App).use(router).mount('#app')

31
obrazky/src/router/index.js

@ -0,0 +1,31 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import DetailView from '../views/DetailView.vue'
const routes = [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: "/detail/:pid",
name: "detail",
component: DetailView
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
}
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})
export default router

5
obrazky/src/views/AboutView.vue

@ -0,0 +1,5 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>

39
obrazky/src/views/DetailView.vue

@ -0,0 +1,39 @@
<template>
<h1>{{title}}</h1>
<div
v-for="(produkt, index) in produkty"
:key="index">
<div v-if="pid == produkt.proId">
<h1>{{produkt.proTitle}}</h1>
<img :src="produkt.image" alt="Obrazek">
</div>
</div>
</template>
<script>
export default {
name: 'DetailView',
data(){
return{
pid: this.$route.params.pid,
title: "detaily",
produkty: [
{ //OBJEKT 1
proTitle:"Title Best",
image: require('../assets/logo.png'),
proId: 1
},
{ //OBJEKT 2
proTitle:"Title but Better",
image: require('../assets/logo.png'),
proId: 2
}
]
}
}
}
</script>
<style>
</style>

39
obrazky/src/views/HomeView.vue

@ -0,0 +1,39 @@
<template>
<div class="home">
<h1>{{title}}</h1>
<div class="row">
<div class="card"
v-for="(data,index) in produkty"
:key="index">
<img :src="data.image" alt="Obrazek">
<h3>{{data.proTitle}}</h3>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'HomeView',
data(){
return{
title:"Seznam",
produkty: [
{ //OBJEKT 1
proTitle:"Title Best",
image: require('../assets/logo.png'),
proId: 1
},
{ //OBJEKT 2
proTitle:"Title but Better",
image: require('../assets/logo.png'),
proId: 2
}
]
}
}
}
</script>

4
obrazky/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

4
produkty/.browserslistrc

@ -0,0 +1,4 @@
> 1%
last 2 versions
not dead
not ie 11

17
produkty/.eslintrc.js

@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended'
],
parserOptions: {
parser: '@babel/eslint-parser'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}

24
produkty/README.md

@ -0,0 +1,24 @@
# produkty
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
produkty/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
produkty/jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19298
produkty/package-lock.json

File diff suppressed because it is too large

25
produkty/package.json

@ -0,0 +1,25 @@
{
"name": "produkty",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^3.2.13",
"vue-router": "^4.0.3"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
}
}

BIN
produkty/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
produkty/public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

30
produkty/src/App.vue

@ -0,0 +1,30 @@
<template>
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/blog">Blog</router-link>
</nav>
<router-view/>
</template>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
}
nav a {
font-weight: bold;
color: #2c3e50;
}
nav a.router-link-exact-active {
color: #42b983;
}
</style>

BIN
produkty/src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

59
produkty/src/components/HelloWorld.vue

@ -0,0 +1,59 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

5
produkty/src/main.js

@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
createApp(App).use(router).mount('#app')

29
produkty/src/router/index.js

@ -0,0 +1,29 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import BlogView from "../views/BlogView.vue"
import DetailsView from "../views/DetailsView.vue"
const routes = [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/details/:Pid',
name: 'details',
component: DetailsView
},
{
path: "/blog",
name: "blog",
component: BlogView
}
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})
export default router

44
produkty/src/views/BlogView.vue

@ -0,0 +1,44 @@
<template>
<h1>{{title}}</h1>
<div class="row">
<div class="col-4" v-for="(data,index) in produkty" :key="index">
<img :src="data.image" :alt="data.productTitle">
<h3 @click="goDetail(data.productId)"> {{data.productTitle}}</h3>
</div>
</div>
</template>
<script>
export default {
name:"blogView",
data(){
return{
title:"Blog", // název stránky
produkty: [ //list produktu za pomocí [pole]-
{
productId: 1,
image: require("../assets/logo.png"),
productTitle: "First"
},
{
productId: 2,
image: require("../assets/logo.png"),
productTitle: "Second"
}
]
}
},
methods: {
goDetail(proId){
let prodId = proId
this.$router.push({name:"details",params:{Pid:prodId}})
}
}
}
</script>
<style>
</style>

38
produkty/src/views/DetailsView.vue

@ -0,0 +1,38 @@
<template>
<h1>{{title}}</h1>
<div class="row">
<div class="col" v-for="(data,index) in produkty" :key="index">
<div v-if="proId == data.productId">
<h1>{{data.productTitle}}</h1>
<img :src="data.image" :alt="data.productTitle">
</div>
</div>
</div>
</template>
<script>
export default {
name:"detailsView",
data(){
return{
proId: this.$route.params.Pid,
title: "details",
produkty: [
{
productId: 1,
image: require("../assets/logo.png"),
productTitle: "First item in produkty"
},
{
productId: 2,
image: require("../assets/logo.png"),
productTitle: "Second item in produkty"
}
]
}
}
}
</script>
<style>
</style>

18
produkty/src/views/HomeView.vue

@ -0,0 +1,18 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'HomeView',
components: {
HelloWorld
}
}
</script>

4
produkty/vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

4
routervue/.browserslistrc

@ -0,0 +1,4 @@
> 1%
last 2 versions
not dead
not ie 11

17
routervue/.eslintrc.js

@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended'
],
parserOptions: {
parser: '@babel/eslint-parser'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}

24
routervue/README.md

@ -0,0 +1,24 @@
# routervue
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
routervue/babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save