From 6a98b26adf1dda1aedb61631fab239d3f723bc2f Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 1 Jun 2022 16:52:48 +0200 Subject: [PATCH] price added --- proj/map/asset/css/style.css | 33 ++++++++++- proj/map/asset/js/main.js | 90 ++++++++++++++++++++++++++++++ proj/map/asset/js/parking.js | 66 +++++++++++++++++++++- proj/map/asset/js/resto.js | 4 ++ proj/map/asset/leaflet/leaflet.css | 1 + 5 files changed, 192 insertions(+), 2 deletions(-) diff --git a/proj/map/asset/css/style.css b/proj/map/asset/css/style.css index efdd84e..c847392 100644 --- a/proj/map/asset/css/style.css +++ b/proj/map/asset/css/style.css @@ -382,4 +382,35 @@ a.leaflet-popup-close-button { div.leaflet-popup.leaflet-zoom-animated { bottom: -15px !important; -} \ No newline at end of file +} + + +div.tabprixcontent section.prixtexttop { + padding: 5px; + text-align: center; +} + +div.tabprixcontent section.prixtexttop p { + font-style: italic +} + +div.tabprixcontent section.pricelist { + padding-left: 20px; + padding-right: 20px; +} + +div.tabprixcontent section.pricelist p { + margin-bottom: 25px; +} + +div.tabprixcontent section.pricelist p span.price { + float: right; +} + +section.prixindicatif p { + text-align: center; + font-style: italic; + padding-bottom: 20px; +} + + diff --git a/proj/map/asset/js/main.js b/proj/map/asset/js/main.js index bc62ee7..22ac748 100644 --- a/proj/map/asset/js/main.js +++ b/proj/map/asset/js/main.js @@ -1,3 +1,88 @@ +Vue.component('Prototab',{ + template : ` +
+ +
+ `, + props : { + obj : Object + }, + data () { + return { + siteoff : { + fr : "Site officiel", + en : "Official website", + it : "Sito ufficiale", + }, + } + }, + methods : { + capitalize(s){ + return s.charAt(0).toUpperCase() + s.slice(1) + }, + } +}) + +Vue.component('Prix',{ + template : ` +
+
+

{{ this.obj.txt.fr }}

+

{{ this.obj.txt.en }}

+

{{ this.obj.txt.it }}

+
+ +
+

+ + {{ l.nameFR }} + {{ l.nameEN }} + {{ l.nameIT }} + + + {{ checkPrice(l.price,free.fr) }} + {{ checkPrice(l.price,free.en) }} + {{ checkPrice(l.price,free.it) }} + +

+
+
+

{{ indicatif.fr }}

+

{{ indicatif.en }}

+

{{ indicatif.it }}

+
+ +
+ `, + props : { + obj : Object + }, + data () { + return { + indicatif : { + fr : "Prix fournis à titre indicatif.", + en : "Prices provided as an indication.", + it : "Prezzi puramente indicativi.", + }, + free : { + fr : "Gratuit", + en : "Free", + it : "Gratuito", + } + } + }, + methods : { + checkPrice(p,f){ + if (p == "") { + return f + } else { + return p + } + }, + + } +}) + Vue.component('Info',{ template : `
@@ -359,6 +444,7 @@ Vue.component('Accordeon', { +
@@ -487,6 +573,10 @@ Vue.component('Accordeon', { break; case "info": return "byl-icon-info" + break; + case "prix": + return "byl-icon-euro_symbol" + break; default: // code block } diff --git a/proj/map/asset/js/parking.js b/proj/map/asset/js/parking.js index 01918d6..928e265 100644 --- a/proj/map/asset/js/parking.js +++ b/proj/map/asset/js/parking.js @@ -22,6 +22,70 @@ let ParkingLamy = { address: "121 rue d'Antibes - 06400 Cannes", tel: "+33 4 89 82 23 23", email: "cannesparking@ville-cannes.fr", + }, + prix : { + tabtype: "prix", + txt : { + fr: "Pour les forfaits, demander à l'accueil du parking à l'arrivée. Sonner à l'interphone si besoin.", + en: "For packages, ask at the parking lot reception upon arrival. Ring the intercom if necessary.", + it: "Per i pacchetti, chiedere alla reception del parcheggio all'arrivo. Se necessario, suonare il citofono.", + }, + list : { + h1 : { + nameFR: "1h", + nameEN: "1h", + nameIT: "1h", + price: "", + }, + h24 : { + nameFR: "24h", + nameEN: "24h", + nameIT: "24h", + price: "16,40 €", + }, + j4 : { + nameFR: "Forfait 4 jours", + nameEN: "4-day package", + nameIT: "Pacchetto 4 giorni", + price: "54,50 €", + }, + j5 : { + nameFR: "Forfait 5 jours", + nameEN: "5-day package", + nameIT: "Pacchetto 5 giorni", + price: "60,60 €", + }, + j6 : { + nameFR: "Forfait 6 jours", + nameEN: "6-day package", + nameIT: "Pacchetto 6 giorni", + price: "66,70 €", + }, + j7 : { + nameFR: "Forfait 7 jours", + nameEN: "7-day package", + nameIT: "Pacchetto 7 giorni", + price: "72,70 €", + }, + j8 : { + nameFR: "Forfait 8 jours", + nameEN: "8-day package", + nameIT: "Pacchetto 8 giorni", + price: "78,80 €", + }, + j10 : { + nameFR: "Forfait 10 jours", + nameEN: "10-day package", + nameIT: "Pacchetto 10 giorni", + price: "84,80 €", + }, + j15 : { + nameFR: "Forfait 15 jours", + nameEN: "15-day package", + nameIT: "Pacchetto 15 giorni", + price: "103 €", + } + } } } } @@ -30,7 +94,7 @@ let ParkingLamy = { let ParkingStephanie = { id: "parkingstephanie", isActive: true, - xy: [-26.55,48.95], + xy: [-27.06,48.20], dirxy: [-22.99,48.76], dirzl: 5, minz: 4, diff --git a/proj/map/asset/js/resto.js b/proj/map/asset/js/resto.js index 8fd916b..00f4d6f 100644 --- a/proj/map/asset/js/resto.js +++ b/proj/map/asset/js/resto.js @@ -74,6 +74,10 @@ let SanTelmo = { sat : "11h30-14h00 18h30-22h00", sun : "", } + }, + info : { + tabtype: "info", + tel: "05 04 32 23 23", } } } diff --git a/proj/map/asset/leaflet/leaflet.css b/proj/map/asset/leaflet/leaflet.css index c87adc3..37b3520 100644 --- a/proj/map/asset/leaflet/leaflet.css +++ b/proj/map/asset/leaflet/leaflet.css @@ -476,6 +476,7 @@ svg.leaflet-image-layer.leaflet-interactive path { .leaflet-popup-content { margin: 3px 3px; line-height: 1.4; + margin-top: 1px; } .leaflet-popup-content p { margin: 18px 0;