Initial version
This commit is contained in:
parent
43333c537c
commit
916c5bad01
9 changed files with 11547 additions and 0 deletions
24
res/js/app.js
Normal file
24
res/js/app.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 2018 (c) Marcel Kapfer
|
||||
// MIT License
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
snacks: [],
|
||||
search: "",
|
||||
count: "Die Snacks werden geladen..."
|
||||
},
|
||||
methods: {
|
||||
matches (snack) {
|
||||
let searchStr = this.search.replace(/ /gi, '.*');
|
||||
return snack.name.toLowerCase().search(searchStr.toLowerCase()) !== -1;
|
||||
}
|
||||
},
|
||||
created () {
|
||||
fetch('prices.json')
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
this.snacks = json;
|
||||
});
|
||||
},
|
||||
});
|
10947
res/js/vue.js
Normal file
10947
res/js/vue.js
Normal file
File diff suppressed because it is too large
Load diff
6
res/js/vue.min.js
vendored
Normal file
6
res/js/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in a new issue