Browse Source

yes master

master
nela 4 years ago
parent
commit
6dd587d06d
  1. 24
      package-lock.json
  2. 1
      package.json
  3. 1
      public/index.html
  4. 254
      src/App.vue
  5. 4997
      src/assets/css/bootstrap-grid.css
  6. 10717
      src/assets/css/bootstrap.css
  7. BIN
      src/assets/fly.jpg
  8. BIN
      src/assets/inside.jpg
  9. BIN
      src/assets/seat-b.png
  10. 26
      src/main.js

24
package-lock.json

@ -4001,6 +4001,16 @@
"assert-plus": "^1.0.0" "assert-plus": "^1.0.0"
} }
}, },
"date-fns": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.17.0.tgz",
"integrity": "sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA=="
},
"date-fns-tz": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-1.1.1.tgz",
"integrity": "sha512-5PR604TlyvpiNXtvn+PZCcCazsI8fI1am3/aimNFN8CMqHQ0KRl+6hB46y4mDbB7bk3+caEx3qHhS7Ewac/FIg=="
},
"de-indent": { "de-indent": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
@ -6924,8 +6934,7 @@
"lodash": { "lodash": {
"version": "4.17.20", "version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
}, },
"lodash.defaultsdeep": { "lodash.defaultsdeep": {
"version": "4.6.1", "version": "4.6.1",
@ -10798,6 +10807,17 @@
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true "dev": true
}, },
"v-calendar": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/v-calendar/-/v-calendar-2.2.3.tgz",
"integrity": "sha512-E4dByu3vDYtleIsZcciUJANpKn6zI0DCXzRsm6g3VsfV7Wpr49t+OQrrc6zVFtISardEUCabivzJOJ0NVdga/Q==",
"requires": {
"core-js": "^3.6.5",
"date-fns": "^2.8.1",
"date-fns-tz": "^1.0.12",
"lodash": "4.17.20"
}
},
"v8-compile-cache": { "v8-compile-cache": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",

1
package.json

@ -9,6 +9,7 @@
}, },
"dependencies": { "dependencies": {
"core-js": "^3.6.5", "core-js": "^3.6.5",
"v-calendar": "^2.2.3",
"vue": "^2.6.11" "vue": "^2.6.11"
}, },
"devDependencies": { "devDependencies": {

1
public/index.html

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>

254
src/App.vue

@ -1,86 +1,125 @@
<template> <template>
<div id="app"> <div id="app">
<h1>Letenka</h1>
<div class="wrapper">
<div class="col form">
<h2>Parametry letu</h2>
<form action="">
<p>
<select v-model="travelType">
<option value="" disabled>Vyberte jednu možnost</option>
<option v-for="(option, index) in travelTypes" :key="index" :value="option">
{{ option.text }}
</option>
</select>
</p>
<!-- volba destinace -->
<!-- datum odletu -->
<input type="date">
<!-- datum příletu pokud zpáteční -->
<p>
<label for="inputPersonCount">Počet cestujících</label><br>
<input v-on:change="personCountChange()" v-model="personCount" type="number" id="inputPersonCount" min="1" max="10">
</p>
<!-- volba třídy E, B -->
<p>
<label for="inputClassType">Volba třídy</label><br>
<select v-model="classType" id="inputClassType">
<option value="" disabled>Vyberte jednu možnost</option>
<option v-for="(option, index) in classTypes" :key="index" :value="option">
{{ option.text }}
</option>
</select>
</p>
<div class="seatWrap">
<div class="seat" v-for="(seat, index) in seats" :key="index">
<div v-if="chosenSeats.indexOf(seat) >= 0" v-on:click="chosenSeats.splice(chosenSeats.indexOf(seat), 1)" class="chosen">
{{ seat }}
</div>
<div v-else v-on:click="addSeatClick(seat)">
{{ seat }}
</div>
<nav style="background-color: #5B66FA" class="navbar navbar-expand-lg ">
<h1>Letenky</h1>
</nav>
<div class="container-fluid">
<div class="row">
<div class="fotka">
<div class="wrapper">
<div class="col form">
<h2>Parametry letu</h2>
<div>
<div class="okno">
<form action="">
<p>Cesta<br>
<select v-model="travelType">
<option value="" disabled>Vyberte jednu možnost</option>
<option v-for="(option, index) in travelTypes" :key="index" :value="option">
{{ option.text }}
</option>
</select>
</p>
Označte datum odletu a příletu <br>
<!-- volba destinace -->
<!-- datum odletu -->
<!-- datum příletu pokud zpáteční -->
</div>
<p>
<label for="inputPersonCount">Počet cestujících</label><br>
<input v-on:change="personCountChange()" v-model="personCount" type="number" id="inputPersonCount" min="1" max="10">
</p>
<!-- volba třídy E, B -->
<p>
<label for="inputClassType">Volba třídy</label><br>
<select v-model="classType" id="inputClassType">
<option value="" disabled>Vyberte jednu možnost</option>
<option v-for="(option, index) in classTypes" :key="index" :value="option">
{{ option.text }}
</option>
</select>
</p>
<div class="seatWrap">
<p>Zvolte si místa k sezení</p>
<div style="width: 20%; border: 0" class="seat" v-for="(seat, index) in seats" :key="index">
<img style="width: 50%" class="sedacka" src="@/assets/seat-b.png" alt="sedacka">
<div v-if="chosenSeats.indexOf(seat) >= 0" v-on:click="chosenSeats.splice(chosenSeats.indexOf(seat), 1)" class="chosen">
{{ seat }}
</div>
<div v-else v-on:click="addSeatClick(seat)">
{{ seat }}
</div>
</div>
</div>
<button v-on:click="chosenSeats=[]">Odebrat všechna sedadla</button>
</form>
</div>
</div> </div>
<button v-on:click="chosenSeats=[]">Odebrat všechna sedadla</button>
</form>
</div>
<div class="col order">
<h2>Objednávka</h2>
<p v-if="travelType">
Typ cesty:
<span style="text-transform: lowercase">
{{ travelType.text }}
</span>
</p>
<p>
Počet cestujích: {{ personCount}}
</p>
<p v-if="classType">
Třída:
<span style="text-transform: lowercase">
{{ classType.text }}
</span>
</p>
<div v-if="chosenSeats.length">
Vybraná místa:
<div class="seat" v-for="seat in chosenSeats" :key="seat">
{{ seat }}
</div>
</div>
</div>
<div class="barva">
<div class="col orde">
<h2 style="color: black">Objednávka</h2>
<p style="padding-left: 15px" v-if="travelType">
Typ cesty:
<span style="text-transform: lowercase">
{{ travelType.text }}
</span>
</p>
<p style="padding-left: 15px">
Počet cestujích: {{ personCount}}
</p>
<p style="padding-left: 15px" v-if="classType">
Třída:
<span style="text-transform: lowercase">
{{ classType.text }}
</span>
</p>
<div style="padding-left: 15px" v-if="chosenSeats.length">
Vybraná místa:
<div class="seat" v-for="seat in chosenSeats" :key="seat">
{{ seat }}
</div>
</div>
</div>
<img class="inside" src="@/assets/inside.jpg" alt="obrazek">
</div> </div>
</div>
</div>
</div>
</div>
</div>
<footer style="color: white; padding: 50px; background-color: #5B66FA" class=" text-lg-start">
<p>© by Work-In-Progress design, 2021</p>
<a style="color: white; padding-bottom: 50px" href="#">Privacy policy</a><br>
<a style="color: white" href="#">Contact us</a>
</footer>
</div> </div>
</template> </template>
<script src='https://unpkg.com/vue/dist/vue.js'></script>
<script src='https://unpkg.com/v-calendar'></script>
<script> <script>
export default { export default {
@ -125,9 +164,32 @@
} }
} }
} }
</script> </script>
<style> <style>
@import './assets/css/bootstrap.css';
@import './assets/css/bootstrap-grid.css';
.container {
width: 80%;
height: 200px;
background: aqua;
margin: auto;
padding: 10px;
}
select{
border-radius: 8px;
}
.wrapper { .wrapper {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@ -150,4 +212,48 @@
background-color: lightgreen; background-color: lightgreen;
} }
h1{
color: white;
padding-left: 30px;
font-size: 30px;
}
.fotka{
background-image: url("assets/fly.jpg");
float: left;
width: 50%;
height: 750px;
}
.barva{
background-color: gainsboro;
float: right;
width: 50%;
height: 750px;
}
.okno{
background-color: white;
padding-left: 40px;
width: 100%;
padding-bottom: 40px;
}
h2{
color: white;
font-size: 25px;
padding: 15px;
}
.inside{
width: 60%;
padding-right: 3%;
padding-bottom: 10%;
float: right;
}
</style> </style>

4997
src/assets/css/bootstrap-grid.css

File diff suppressed because it is too large

10717
src/assets/css/bootstrap.css

File diff suppressed because it is too large

BIN
src/assets/fly.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

BIN
src/assets/inside.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
src/assets/seat-b.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

26
src/main.js

@ -1,8 +1,34 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import VCalendar from 'v-calendar'
import Calendar from 'v-calendar/lib/components/calendar.umd'
import DatePicker from 'v-calendar/lib/components/date-picker.umd';
import { setupCalendar} from 'v-calendar'
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
}).$mount('#app') }).$mount('#app')
Vue.use(VCalendar, {
componentPrefix: 'vc',
});
Vue.component('calendar', Calendar)
Vue.component('date-picker', DatePicker)
export default {
components: {
Calendar,
DatePicker
}
}
setupCalendar({
componentPrefix: 'vc',
});

Loading…
Cancel
Save