From 102b873e7905265351e0f59e4e1a96de97c1af07 Mon Sep 17 00:00:00 2001 From: sora-ext Date: Fri, 28 Feb 2025 17:53:12 +0100 Subject: [PATCH] Add template/module/journey/map/mixin-marker.pug --- template/module/journey/map/mixin-marker.pug | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 template/module/journey/map/mixin-marker.pug diff --git a/template/module/journey/map/mixin-marker.pug b/template/module/journey/map/mixin-marker.pug new file mode 100644 index 0000000..cc4ca6b --- /dev/null +++ b/template/module/journey/map/mixin-marker.pug @@ -0,0 +1,41 @@ + +mixin map_marker(place, color_sel_c, color_sel_o, color_else) + l-marker( + :lat-lng="place.latlon" + ) + l-icon( + v-if="(place.step == journey.sel_day)" + v-html="generate_marker(place, \""+color_sel_c+"\")" + ) + l-icon( + v-else-if="(place.step >=0)" + v-html="generate_marker(place, \""+color_sel_o+"\")" + ) + l-icon( + v-else + v-html="generate_marker(place, \""+color_else+"\")" + ) + l-popup() + h1.row.text-medium.text-center {{ place.sname }} + span.row.text-small.text-gray {{ place.display_name }} + span(v-if="edit_active") + .row.input(style="margin-bottom:0") + textarea-autosize.col-12.col-sm-12.text-small( + placeholder="Notes", + v-model="place.notes", + :min-height="30", + :max-height="350" + ) + a.leaflet-popup-close-button.text-gray( + style="right: 4px; visibility: visible", + href="#rm", + v-on:click.prevent="place_delete(\""+place+"\",index)" + v-html="generate_icon('trash', 'NA')" + ) + a.leaflet-popup-close-button.text-gray( + style="right: 20px; visibility: visible", + href="#toggle_day", + v-on:click.prevent="place.step = ((place.step==journey.sel_day)?-1:journey.sel_day)" + v-html="generate_icon(((place.step==journey.sel_day)?'calendar-xmark':'calendar-plus'), 'NA')" + ) + span.row.text-small.text-dark(v-else) {{ place.notes }}