Migrate to pug

This commit is contained in:
soraefir
2023-06-25 12:26:17 +02:00
parent 0693d47939
commit 681975a44b
54 changed files with 688 additions and 22868 deletions

File diff suppressed because one or more lines are too long

View File

@ -58,12 +58,13 @@ const is_attraction_type = e => (["tourism", "leisure", "place", "amenity", "hig
const icon_type = (item)=>{
let t = item.type
let c = item.category
const arr = ["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"];
if(arr.indexOf(t)!=-1){
return 'utensils';
}else if(t=='hotel' || t=='hostel'){
return 'bed';
}else if(t=='museum'){
}else if(t=='museum' || c=='historic' || t=='place_of_worship'){
return 'landmark';
}else if(t=='peak' || t=='viewpoint'){
return 'mountain';
@ -79,11 +80,11 @@ const icon_type = (item)=>{
return 'landmark';
}else if(t=='bridge'){
return 'archway';
}else if(t=='woodland'|| t=='shieling' || t=='national_park' || t=='zoo' || t=='park'){
}else if(t=='woodland'|| t=='shieling' || t=='national_park' || t=='zoo' || t=='park' || t=='garden' || 0){
return 'tree';
}else if(t=='water_park', t=='theme_park'){
return 'dice-five';
}else if(t=='?'){
}else if(t=='?' || t=='neighbourhood' || t=='quarter' || c=='highway'){
return '';
}else{
console.log(item.display_name, item.category, item.type);
@ -112,7 +113,6 @@ const app = new Vue({
main:[],
step_title:[],
},
vtp: ['view','short'].indexOf(window.location.pathname.split('/')[1]),
query:{hotel:[],flight:[],nominatim:[]},
querying:{hotel:false,flight:false,place:false,food:false},
impexp:"",
@ -264,7 +264,6 @@ const app = new Vue({
save_data: function(){
this.impexp = toEncoded(JSON.stringify(this.journey_data));
console.log(this.journey_data)
axios.post('/api/'+this.journey_id, this.journey_data).then(response => {
console.log("Saved...")
}).catch(error => {
@ -291,7 +290,6 @@ const app = new Vue({
},
created: function () {
axios.get('/api/'+this.journey_id).then(response =>{
console.log(response)
if(response.data=='') throw "Invalid Journey Data Received";
app.journey_data = response.data;