diff --git a/proj/map/.index.html.swp b/proj/map/.index.html.swp
index 1d8c4d6..c63f0c4 100644
Binary files a/proj/map/.index.html.swp and b/proj/map/.index.html.swp differ
diff --git a/proj/map/asset/css/style.css b/proj/map/asset/css/style.css
index a5c0135..e790cc6 100644
--- a/proj/map/asset/css/style.css
+++ b/proj/map/asset/css/style.css
@@ -4,7 +4,8 @@
@import url("./font.css");
header {
-
+ height: 100px;
+ width: 100vw;
}
body {
@@ -13,15 +14,28 @@ body {
}
section#logo {
- position: fixed;
+ position: relative;
left: 5px;
top: 5px;
}
section#lang {
- position: fixed;
- right: 5px;
- top: 5px;
+ position: relative;
+ text-align: right;
+ margin-top: -12px;
+}
+
+section#lang span.marker {
+ position: absolute;
+ height: 5px;
+ left: 0;
+ width: 0;
+ bottom: -8px;
+ transition: 0.5s;
+}
+
+section#lang span {
+ margin-right: 10px;
}
section#map-container {
@@ -40,6 +54,7 @@ main {
top: 340px;
bottom: 0px;
width: 100vw;
+ overflow-x: hidden;
}
div#list {
@@ -49,20 +64,13 @@ div#list {
padding-left: 10px;
padding-top: 10px
scrollbar-width: none;
+ overflow-x: hidden;
}
div#list::-webkit-scrollbar {
display: none;
}
-.marker {
- position: absolute;
- height: 5px;
- left: 0;
- width: 0;
- bottom: -10px;
- transition: 0.5s;
-}
.listchild {
height: 0%;
@@ -156,3 +164,73 @@ section.lastlistitem aside span.info {
background-color: var(--b9h-color-fg);
color: var(--b9h-color-bg);
}
+
+div.sep {
+ background-color: var(--b9h-color-fg);
+ height:5px;
+ width: 100vw;
+ margin-left: -8px;
+ overflow-x: hidden;
+
+ content: "jsdflkj"
+}
+
+section.card {
+ position: fixed;
+ top: 110vh;
+ left: 0px;
+ right: 0px;
+ bottom: 0px;
+ background-color: var(--b9h-color-bg);
+ z-index: 1000;
+ transition: top 0.5s;
+}
+
+section.card nav {
+ margin-top: 60px;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+}
+
+section.card nav span {
+ font-size: 30px;
+}
+
+section.card span.byl-icon-cross {
+ position: absolute;
+ right: 20px;
+ top: 20px;
+ font-size: 1.3rem;
+}
+
+section.tabroll {
+ margin-top: 20px;
+ height: 100vh;
+ display: flex;
+ flex-direction: row;
+}
+
+section.tabroll {
+ transform: translateX(-0vw);
+ transition: transform 0.5s;
+}
+
+section.tabroll section.singletab {
+ width: 100vw;
+ height: 100%;
+}
+
+nav.cardnav {
+ position: relative;
+}
+
+nav.cardnav span.marker {
+ position: absolute;
+ height: 5px;
+ left: 0px;
+ width: 0px;
+ background-color: var(--b9h-color-accent);
+ bottom: -20px;
+ transition: 0.5s;
+}
diff --git a/proj/map/asset/js/.main.js.swp b/proj/map/asset/js/.main.js.swp
index 9e230b5..c282201 100644
Binary files a/proj/map/asset/js/.main.js.swp and b/proj/map/asset/js/.main.js.swp differ
diff --git a/proj/map/asset/js/main.js b/proj/map/asset/js/main.js
index 25ef3bc..5d30359 100644
--- a/proj/map/asset/js/main.js
+++ b/proj/map/asset/js/main.js
@@ -2,12 +2,120 @@
//const dburl = "https://ed.brz9.dev/proj/map/asset/json/db.json"
const dburl = "https://ed.brz9.dev/proj/map/asset/json/endpoint/"
+Vue.component('Time', {
+ template : `
+
+
+ {{ this.days.mon.fr }}
+ {{ this.days.mon.en }}
+ {{ this.days.mon.it }}
+ {{ this.obj.mon }}
+
+
+
+ {{ this.days.tue.fr }}
+ {{ this.days.tue.en }}
+ {{ this.days.tue.it }}
+ {{ this.obj.tue }}
+
+
+
+ {{ this.days.wed.fr }}
+ {{ this.days.wed.en }}
+ {{ this.days.wed.it }}
+ {{ this.obj.wed }}
+
+
+
+ {{ this.days.thu.fr }}
+ {{ this.days.thu.en }}
+ {{ this.days.thu.it }}
+ {{ this.obj.thu }}
+
+
+
+ {{ this.days.fri.fr }}
+ {{ this.days.fri.en }}
+ {{ this.days.fri.it }}
+ {{ this.obj.fri }}
+
+
+
+ {{ this.days.sat.fr }}
+ {{ this.days.sat.en }}
+ {{ this.days.sat.it }}
+ {{ this.obj.sat }}
+
+
+
+ {{ this.days.sun.fr }}
+ {{ this.days.sun.en }}
+ {{ this.days.sun.it }}
+ {{ this.obj.sun }}
+
+
+
+ `,
+ props : {
+ obj : Object
+ },
+ data () {
+ return {
+ message : "hello from time",
+ days : {
+ mon : {
+ fr : "Lundi",
+ en : "Monday",
+ it : "Lunedì"
+ },
+ tue : {
+ fr : "Mardi",
+ en : "Tuesday",
+ it : "Martedì"
+ },
+ wed : {
+ fr : "Mercredi",
+ en : "Wednesday",
+ it : "Mercoledì"
+ },
+ thu : {
+ fr : "Jeudi",
+ en : "Thursday",
+ it : "Giovedì"
+ },
+ fri : {
+ fr : "Vendredi",
+ en : "Friday",
+ it : "Venerdì"
+ },
+ sat : {
+ fr : "Samedi",
+ en : "Saturday",
+ it : "Sabato"
+ },
+ sun : {
+ fr : "Dimanche",
+ en : "Sunday",
+ it : "Domenica"
+ },
+ }
+ }
+ },
+ methods : {
+ getTime () {
+ tabtype
+ }
+
+ }
+});
+
+
Vue.component('Accordeon', {
template : `
@@ -45,26 +198,110 @@ Vue.component('Accordeon', {
},
data () {
return {
- isActive : false
+ isActive : false,
+ displayCard : "block",
+ cardTop : "110vh",
+ tabrollxoff : 0,
+ tabind : 0,
+ markerL : 0,
+ markerW : 0,
}
},
computed: {
href: function () {
return "#" + this.list.id;
- }
+ },
+ cardid: function () {
+ return "card" + this.list.id;
+ },
+ tabcount: function () {
+ if ('card' in this.list){
+ console.log(this.list + " has a card")
+ var arr = Object.entries(this.list.card.tabs);
+ return arr.length
+ } else {
+ return 0;
+ }
+ },
+ tabrollw: function () {
+ return this.tabcount + "00vw";
+ },
+ tabrollTransX: function () {
+ return "translateX(-" + this.tabrollxoff + "00vw)";
+ },
+ markerLL : function () {
+ if ('card' in this.list){
+try {
+ return this.$refs.tabnavi[this.tabind].getBoundingClientRect().left + "px"
+}catch(err) {}
+ } else {
+ return 0;
+ }
+ },
+ markerWW : function () {
+ if ('card' in this.list){
+ try {
+ target = document.querySelector("#" + this.cardid +"0");
+ marker.style.left = target.offsetLeft + "px";
+ return target.offsetWidth + "px";
+ //return this.$refs.tabnavi[this.tabind].getBoundingClientRect().width + "px"
+ }catch(err) {
+ console.log(err.message)
+ }
+ } else {
+ return 0;
+ }
+ },
},
methods : {
+ getMarkerId(i) {
+ return this.cardid + this.getIndex(i).toString()
+ },
+ getIndex(obj) {
+ var arr = Object.entries(this.list.card.tabs);
+ let ind = arr.findIndex(e => e[0] === obj.tabtype);
+ return ind
+ },
+ setTab(ind) {
+ this.tabrollxoff = ind;
+ this.tabind = ind
+ t = document.getElementById(this.cardid + ind);
+ this.markerL = t.offsetLeft + "px"
+ this.markerW = t.offsetWidth + "px"
+ console.log(this.markerL)
+ },
+ getTabLogo(obj) {
+ switch(obj.tabtype) {
+ case "menu":
+ return "byl-icon-restaurant"
+ // code block
+ break;
+ case "time":
+ return "byl-icon-clock"
+ // code block
+ break;
+ default:
+ // code block
+ }
+ },
+ showCard() {
+ this.displayCard = "block";
+ this.setTab(0)
+ console.log("showing card")
+ this.cardTop = "0vh"
+ this.setTab(0)
+ this.setTab(0)
+ this.setTab(0)
+ },
+ hideCard() {
+ this.cardTop = "110vh"
+ },
donothing () {
},
toggleActive () {
this.isActive = !this.isActive
- document.getElementById(this.list.id).scrollIntoView(
- {
- behavior: "smooth",
- block: "end",
- inline: "nearest"}
- );
+ document.getElementById(this.list.id).scrollIntoView();
}
}
})
@@ -85,9 +322,22 @@ let vm = new Vue({
data: {
currentLang: 'fr',
fdata: {},
- db : {},
- db2 : {
- restaurants : {
+ db : {
+ parking : {
+ id : "parking",
+ type : "list",
+ nameFR : "Parking",
+ nameEN : "Car park",
+ nameIT : "Parcheggio",
+ sub : {
+ lamy : {
+ id: "lamy",
+ type: "item",
+ name: "Parking Lamy"
+ }
+ }
+ },
+ resto : {
id : "resto",
type : "list",
nameFR : "Restaurant",
@@ -112,6 +362,7 @@ let vm = new Vue({
card : {
tabs : {
menu : {
+ tabtype : "menu",
priceRange : "18-32€",
dishes : {
divola : {
@@ -123,9 +374,14 @@ let vm = new Vue({
}
},
time : {
- monAM : "11h30-14h00",
- monPM : "18h30-22h00",
-
+ tabtype : "time",
+ mon : "11h30-14h00 18h30-22h00",
+ tue : "11h30-14h00 18h30-22h00",
+ wed : "11h30-14h00 18h30-22h00",
+ thu : "11h30-14h00 18h30-22h00",
+ fri : "11h30-14h00 18h30-22h00",
+ sat : "11h30-14h00 18h30-22h00",
+ sun : "",
}
}
}
@@ -185,11 +441,6 @@ let vm = new Vue({
langElms[i].style.display = 'revert';
}
},
- async getJDB(){
- const res = await fetch(dburl);
- const data = await res.json();
- this.db = data;
- },
setlang: function (lang) {
target = document.querySelector("#"+"tab-"+lang);
marker = document.querySelector("#lang-marker");
@@ -199,13 +450,6 @@ let vm = new Vue({
},
},
created: function(){
- console.log("about to call getJDB")
-// this.getJDB();
- fetch(dburl)
- .then(res => res.json())
- .then(data => this.db = data)
- .catch(err => console.log(err.message))
- console.log("after getJDB call")
this.setlang('fr');
},
mounted: function() {
@@ -213,9 +457,15 @@ let vm = new Vue({
this.setlang('fr');
console.log("mounted");
this.setlang('fr');
+ this.setlang('fr');
+ this.setlang('fr');
+ this.setlang('fr');
},
updated: function() {
this.setlang('fr');
+ this.setlang('fr');
+ this.setlang('fr');
+ this.setlang('fr');
}
})
diff --git a/proj/map/asset/json/endpoint/.index.php.swp b/proj/map/asset/json/endpoint/.index.php.swp
deleted file mode 100644
index c7e9419..0000000
Binary files a/proj/map/asset/json/endpoint/.index.php.swp and /dev/null differ
diff --git a/proj/map/index.html b/proj/map/index.html
index 5405caa..94e0eef 100644
--- a/proj/map/index.html
+++ b/proj/map/index.html
@@ -28,7 +28,9 @@
@@ -40,6 +42,9 @@