display postal code and tags

master
Gustavo Luigi 2023-07-28 17:56:23 -03:00
parent 3bfc2d0865
commit 6b447fe592
4 changed files with 22 additions and 34 deletions

View File

@ -144,7 +144,13 @@ function initMap() {
locationElement.html(locationElement.html().replace('$title', item.title));
locationElement.html(locationElement.html().replace('data-src="$image"', 'src="' + item.image + '"'));
locationElement.html(locationElement.html().replace('data-href="$path"', 'href="' + item.path + '"'));
locationElement.html(locationElement.html().replace('$postalCode', (item.location.postalCode + " " + (item.location.addressLocality ?? "")).trim()));
locationElement.removeClass('d-none');

if (item[textToSlug(tagField)]) item[textToSlug(tagField)].slice(0, 2).forEach(function (besonderheitenItem) {
locationElement.find(".tags").append(`<span class="badge text-bg-secondary">${besonderheitenItem}</span>`);
});

locationElement.on('click', function () {
map.setZoom(12);
map.setCenter(item.marker.getPosition());

View File

@ -118,7 +118,6 @@
</div>
</div>
<div class="col-12 col-md-4 overflow-auto mt-3 mt-md-0" style="height: 80vh;" id="contents">

<div class="card d-none address shadow-sm ">
<div class="card-body">
<div class="row">
@ -127,11 +126,8 @@
</div>
<div class="col-12 col-md-7">
<h4 class="fs-6 mt-2 fw-bolder">$title</h4>

<p class="mt-2 text-muted small"> <svg style="fill: #ea4335; width: 10px; margin-right: 4px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M384 192c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384 86 384 192z"/></svg>12345 Musterstadt</p>

<span class="badge text-bg-secondary">Wartung</span> <span class="badge text-bg-secondary">Butterfly</span>

<p class="mt-2 text-muted small"> <svg style="fill: #ea4335; width: 10px; margin-right: 4px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M384 192c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384 86 384 192z"/></svg>$postalCode</p>
<div style="gap: .25rem;" class="d-flex tags"></div>
</div>
</div>
</div>
@ -144,6 +140,7 @@
const urlBase = "{{url('/')}}";
const type = "{{$_type}}";
const locationField = "{{$_location_field}}";
const tagField = "{{$_tags_fielda??''}}";
let filterFields = {!! json_encode($_filter_fields) !!};
</script>
<script src="{{storage('assets/home/script.js')}}"></script>

View File

@ -11,30 +11,18 @@
<script src="{{asset('template/libs/bootstrap-5.2.0/bootstrap.bundle.min.js')}}"></script>
@yield('head')
<style>

body{
background-color: {{$_primary_background_color}};
font-family: {{$_schriftart}};
}


h1,h2{ color: {{$_title_color}} }
.card{
background-color: {{$_secondary_background_color}}
}


.card{ background-color: {{$_secondary_background_color}} }

.bg-primary{ background-color: {{$_primary_ci_color}} !important;}

a, a:hover, a:active { color:{{$_primary_link_color}} };


}
</style>



</head>
<body>
@yield('content')

View File

@ -13,7 +13,6 @@
"name": "Secondary CI Color",
"type": "color"
},

{
"name": "Primary Background Color",
"type": "color",
@ -23,26 +22,21 @@
"name": "Secondary Background Color",
"type": "color"
},

{
"name": "Primary Link Color",
"type": "color",
"value": "#e62b25"

},
{
"name": "Secondary Link Color",
"type": "color",
"value": "#1862A8"

},

{
"name": "Title Color",
"type": "color",
"value": "#e62b25",
"description": "Farbe für Überschriften"

},
{
"name": "Schriftart",
@ -51,7 +45,6 @@
}
]
},

{
"icon": "/font-awesome/light/map-pin.svg",
"group_name": "Maps Config",
@ -73,8 +66,12 @@
"name": "Filter Fields",
"type": "array",
"required": true
},
{
"name": "Tags Field",
"type": "string",
"required": true
}
]
}

]