diff --git a/proj/map/asset/css/style.css b/proj/map/asset/css/style.css index 1a74e04..c46d0a1 100644 --- a/proj/map/asset/css/style.css +++ b/proj/map/asset/css/style.css @@ -10,6 +10,7 @@ header { body { height: 100vh; + height: --webkit-fill-available; overflow: hidden; } @@ -170,8 +171,8 @@ div.sep { width: 100vw; margin-left: -8px; overflow-x: hidden; - - content: "jsdflkj" + + content: "jsdflkj" } section.card { @@ -243,7 +244,7 @@ div.leaflet-popup-tip { .leaflet-container div.leaflet-popup-content-wrapper { border-radius: 0px; - color: var(--b9h-color-bg); + color: var(--b9h-color-bg); background-color: var(--b9h-color-fg); font-family: Inter; font-weight: 400; @@ -313,9 +314,30 @@ section.restomenu h2 { margin-top: 30px; text-decoration: underline; text-underline-offset: 10px; - text-decoration-thickness: 5px; + text-decoration-thickness: 5px; } ::-webkit-scrollbar { display: none; -} \ No newline at end of file +} + +section#resto nav span.resto-tag { + margin-top: 0px; + margin-bottom: 20px; + width: auto; + display: inline-block; + cursor: pointer; +} + +section#resto nav span.resto-tag h3 { + border: 3px; + border-style: solid; + border-width: 5px; + width: auto; + padding: 10px; + margin: 10px; +} + +section#resto nav span.resto-tag.active h3 { + border-color: var(--b9h-color-accent); +} diff --git a/proj/map/asset/js/.main.js.swp b/proj/map/asset/js/.main.js.swp index 9a90836..8c47592 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/db.js b/proj/map/asset/js/db.js index 7bdfea6..1d7d750 100644 --- a/proj/map/asset/js/db.js +++ b/proj/map/asset/js/db.js @@ -34,29 +34,7 @@ var jdb = { sub : { SanTelmo, Salsamenteria, - italiens : { - id: "restoital", - isActive: false, - type : "list", - nameFR : "Italien", - nameEN : "Italian", - nameIT : "Italiano", - sub : { - SanTelmo, - Salsamenteria, - }, - }, - vege : { - id : "restovege", - isActive: false, - type : "list", - nameFR : "Végétarien", - nameEN : "Vegan", - nameIT : "Vegetariano", - sub : { - Novaa, - } - } + Novaa, } } } diff --git a/proj/map/asset/js/main.js b/proj/map/asset/js/main.js index c3f3df3..14bdb4e 100644 --- a/proj/map/asset/js/main.js +++ b/proj/map/asset/js/main.js @@ -192,7 +192,15 @@ Vue.component('Accordeon', {
@@ -201,6 +209,7 @@ Vue.component('Accordeon', {
`, props : { - list : Object + list : Object, + taglist : Object }, data () { return { + tl : this.taglist, isActive : false, displayCard : "block", cardTop : "110vh", @@ -317,6 +328,33 @@ Vue.component('Accordeon', { }, }, methods : { + toggleTag(t){ + t.isActive = !t.isActive + this.checkTagFunc() + }, + checkTagFunc() { + Object.keys(resto).forEach(r => { + + tagCount = 0 + + Object.keys(restoTagList).forEach(rtli => { + if (restoTagList[rtli].isActive) { + for (t in resto[r].tags) { + if (resto[r].tags[t] === restoTagList[rtli]) { + tagCount++ + } + } + } + }) + + if (tagCount >= 1) { + resto[r].isActive = true + } else { + resto[r].isActive = false + } + }) + + }, getMarkerId(i) { return this.cardid + this.getIndex(i).toString() }, diff --git a/proj/map/asset/js/resto.js b/proj/map/asset/js/resto.js index 0373c3d..9491c1b 100644 --- a/proj/map/asset/js/resto.js +++ b/proj/map/asset/js/resto.js @@ -1,10 +1,34 @@ - +let restoTagList = { + pizza : { + isActive: false, + fr: "Pizza", + en: "Pizza", + it: "Pizza", + }, + vege : { + isActive: false, + fr: "Végétarien", + en: "Vegie", + it: "Vigi", + }, + ital : { + isActive: false, + fr: "Italien", + en: "Italian", + it: "Italiano", + } +} let SanTelmo = { isActive: false, id: "santelmo", type : "item", + cat: "resto", name: "San Telmo", + tags : [ + restoTagList.pizza, + restoTagList.ital + ], xy: [-11.42,27.20], dirxy: [-12.98,35.95], dirzl: 4, @@ -60,6 +84,9 @@ let Novaa = { id: "novasocialfood", type : "item", name: "Noväa social food", + tags : [ + restoTagList.vege + ], xy: [-14.60,17.97], dirxy: [-18.48,35.68], dirzl: 3, @@ -103,6 +130,9 @@ let Salsamenteria = { dirxy: [-19.97,-7.73], dirzl: 3, minz: 3, + tags : [ + restoTagList.ital + ], type : "item", name: "Salsamenteria di Parma", img: "https://ed.brz9.dev/proj/map/asset/img/salsamentiera.jpg", diff --git a/proj/map/index.html b/proj/map/index.html index ea4fd25..33e1f80 100644 --- a/proj/map/index.html +++ b/proj/map/index.html @@ -30,7 +30,7 @@
- +