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('$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.location.postalCode + " " + (item.location.addressLocality ?? "")).trim()));
locationElement.removeClass('d-none'); 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 () { locationElement.on('click', function () {
map.setZoom(12); map.setZoom(12);
map.setCenter(item.marker.getPosition()); map.setCenter(item.marker.getPosition());

View File

@ -118,7 +118,6 @@
</div> </div>
</div> </div>
<div class="col-12 col-md-4 overflow-auto mt-3 mt-md-0" style="height: 80vh;" id="contents"> <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 d-none address shadow-sm ">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
@ -127,11 +126,8 @@
</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"> <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> <div style="gap: .25rem;" class="d-flex tags"></div>

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

</div> </div>
</div> </div>
</div> </div>
@ -144,6 +140,7 @@
const urlBase = "{{url('/')}}"; const urlBase = "{{url('/')}}";
const type = "{{$_type}}"; const type = "{{$_type}}";
const locationField = "{{$_location_field}}"; const locationField = "{{$_location_field}}";
const tagField = "{{$_tags_fielda??''}}";
let filterFields = {!! json_encode($_filter_fields) !!}; let filterFields = {!! json_encode($_filter_fields) !!};
</script> </script>
<script src="{{storage('assets/home/script.js')}}"></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> <script src="{{asset('template/libs/bootstrap-5.2.0/bootstrap.bundle.min.js')}}"></script>
@yield('head') @yield('head')
<style> <style>

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



h1,h2{ color: {{$_title_color}} }
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;} .bg-primary{ background-color: {{$_primary_ci_color}} !important;}


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


}
</style> </style>



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

View File

@ -7,13 +7,12 @@
{ {
"name": "Primary CI Color", "name": "Primary CI Color",
"type": "color", "type": "color",
"value" : "#e62b25" "value": "#e62b25"
}, },
{ {
"name": "Secondary CI Color", "name": "Secondary CI Color",
"type": "color" "type": "color"
}, },

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

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

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

}, },

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

}, },
{ {
"name": "Schriftart", "name": "Schriftart",
"type": "string", "type": "string",
"value" : "15px/25px 'Noto Sans', Arial, sans-serif" "value": "15px/25px 'Noto Sans', Arial, sans-serif"
} }
] ]
}, },

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

] ]