Gustavo Luigi 2023-07-29 21:37:14 -03:00
parent d2d26063b6
commit b6490b8abd
2 changed files with 6 additions and 2 deletions

View File

@ -144,7 +144,11 @@ function initMap() {
locationElement.html(locationElement.html().replace('$title', item.title)); 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-src="$image"', 'src="' + item.image + '"'));
locationElement.html(locationElement.html().replace('data-href="$path"', 'href="' + item.path + '"')); locationElement.html(locationElement.html().replace('data-href="$path"', 'href="' + item.path + '"'));
locationElement.html(locationElement.html().replace('$postalCode', (item[textToSlug(locationField)].postalCode + " " + (item[textToSlug(locationField)].addressLocality ?? "")).trim()));
let location = item[textToSlug(locationField)];
if (location && location.postalCode) locationElement.html(locationElement.html().replace('$postalCode', (location.postalCode + " " + (location.addressLocality ?? "")).trim()));
else locationElement.find(".postal-code").hide();

locationElement.removeClass('d-none'); locationElement.removeClass('d-none');


if (item[textToSlug(tagField)]) item[textToSlug(tagField)].slice(0, 2).forEach(function (besonderheitenItem) { if (item[textToSlug(tagField)]) item[textToSlug(tagField)].slice(0, 2).forEach(function (besonderheitenItem) {

View File

@ -126,7 +126,7 @@
</div> </div>
<div class="col-12 col-md-7"> <div class="col-12 col-md-7">
<h4 class="fs-6 mt-2 fw-bolder">$title</h4> <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>$postalCode</p> <p class="mt-2 text-muted small postal-code"> <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 style="gap: .25rem;" class="d-flex tags"></div>
</div> </div>
</div> </div>