maps-theme/content/index.blade.php

151 lines
8.1 KiB
PHP
Raw Permalink Normal View History

2023-05-15 19:30:18 +00:00
@extends('template.'.config('settings.template').'.content.master')
2023-05-15 19:57:14 +00:00
@section('head')
<title>Home | {{config('settings.name')}}</title>
<style>
#map {
2023-05-16 11:42:14 +00:00
height: 80vh;
2023-05-15 19:57:14 +00:00
width: 100%;
2023-05-18 17:14:55 +00:00
}
.address + .address{
margin-top: .5rem;
}
#marker-window{
min-width: 100px;
2023-05-15 19:57:14 +00:00
}
2023-05-18 17:44:25 +00:00
#contents {
scrollbar-color: #aaa #f5f5f5;
}
#contents::-webkit-scrollbar {
width: 8px;
2023-05-26 04:39:15 +00:00
border-radius: 10px;
2023-05-18 17:44:25 +00:00
background-color: #f5f5f5;
}
#contents::-webkit-scrollbar-thumb {
2023-05-26 04:39:15 +00:00
border-radius: 10px;
2023-05-18 17:44:25 +00:00
background-color: #aaa;
}
#contents::-webkit-scrollbar-thumb:hover {
2023-05-26 04:39:15 +00:00
background-color: #888;
2023-05-18 17:44:25 +00:00
}
2023-05-30 15:25:00 +00:00
.address{
cursor: pointer;
transition: all .2s;
}
.address:hover{
background: #eee;
}
2023-05-15 19:57:14 +00:00
</style>
@stop
2023-05-15 19:30:18 +00:00
@section('content')
2023-05-18 17:14:55 +00:00
<div class="container py-5">
2023-06-08 14:22:12 +00:00
<div class="row mb-5 mt-3">
<div class="col-12">
<h1>{{config('settings.name')}}</h1>
<p class="mt-3">{{config('settings.description')}}</p>
</div>
</div>
2023-05-18 17:14:55 +00:00
<div class="row mb-3">
2023-06-20 18:34:36 +00:00
<div class="col-12 col-md rounded-end">
2023-05-18 17:14:55 +00:00
<div class="d-flex">
2023-06-20 18:34:36 +00:00
<div id="filters" class="d-flex">
<template id="filter">
<div class="dropdown me-2 filter">
<button class="btn btn-primary dropdown-toggle btn-sm bg-light" style="color: #212529; background: #e9ecef; border: 1px solid #ced4da;" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="filter-name"></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu checkbox-menu allow-focus p-2 filter-options"></ul>
</div>
</template>
2023-05-30 15:25:00 +00:00
</div>
2023-06-20 18:34:36 +00:00
<div class="flex-fill me-2" style="max-width: 400px;">
2023-05-23 05:02:35 +00:00
<input type="text" class="form-control form-control-sm" id="ort" placeholder="Ort"/>
2023-05-18 17:14:55 +00:00
</div>
2023-06-20 18:34:36 +00:00
<div class="input-group flex-fill me-2" style="max-width: 400px;">
2023-05-18 17:14:55 +00:00
<input type="text" class="form-control form-control-sm" id="search-input" placeholder="Freitext-Suche">
2023-06-20 18:34:36 +00:00
<button class="input-group-text bg-primary text-light" id="search-button">
2023-05-18 17:14:55 +00:00
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
</svg>
2023-06-20 18:34:36 +00:00
</button>
</div>
</div>
<div class="mt-2 d-flex">
<div class="d-flex">
<div id="applied-filters" class="d-flex">
<template id="applied-filter">
<button class="btn btn-sm btn-primary me-2 btn applied-filter d-none">
<span class="filter-name"></span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
</button>
</template>
</div>
<button class="btn btn-sm btn-primary me-2 btn applied-filter" data-field="ort" style="display: none;">
<span class="filter-name"></span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
</button>
<button class="btn btn-sm btn-primary me-2 btn applied-filter" data-field="search" style="display: none;">
<span class="filter-name"></span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
</button>
2023-05-18 17:14:55 +00:00
</div>
2023-06-20 18:34:36 +00:00
<button id="reset-filters-button" class="btn btn-danger btn-sm ms-1" style="display: none;">Alle löschen</button>
2023-05-18 17:14:55 +00:00
</div>
</div>
<div class="col-12 col-md-auto pe-0 d-flex align-items-end">
2023-05-18 18:55:47 +00:00
<p class="text-end text-muted small m-0 p-0"><span id="count-items-displayed">0</span> results</p>
2023-05-16 11:42:14 +00:00
</div>
</div>
<div class="row">
2023-06-08 14:12:47 +00:00
<div class="col-12 col-md-8 g-0 ps-md-3 order-md-last">
2023-06-08 14:06:52 +00:00
<div id="map"></div>
<div id="marker-window" class="d-none">
2023-08-01 21:28:23 +00:00
<h6 class="js-title"></h6>
<div>
<img class="img-fluid rounded js-image" src="" alt="">
<p class="js-description"></p>
<a href="" class="js-path" style="outline: none;">Details</a>
2023-06-08 14:06:52 +00:00
</div>
</div>
</div>
<div class="col-12 col-md-4 overflow-auto mt-3 mt-md-0" style="height: 80vh;" id="contents">
2023-06-08 14:22:12 +00:00
<div class="card d-none address shadow-sm ">
2023-05-16 21:31:39 +00:00
<div class="card-body">
<div class="row">
2023-06-06 20:57:08 +00:00
<div class="col-12 col-md-5">
2023-08-01 21:28:23 +00:00
<img class="img-fluid rounded js-image" src="" alt="">
2023-05-26 04:39:15 +00:00
</div>
2023-06-06 20:57:08 +00:00
<div class="col-12 col-md-7">
2023-08-01 21:28:23 +00:00
<h4 class="fs-6 mt-2 fw-bolder js-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>
<span class="js-postal-code"></span>
</p>
<div class="js-tags"></div>
2023-05-16 11:42:14 +00:00
</div>
</div>
</div>
2023-05-16 21:31:39 +00:00
</div>
2023-05-16 11:42:14 +00:00
</div>
</div>
</div>
2023-05-18 17:14:55 +00:00
<script src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js"></script>
2023-05-16 21:31:39 +00:00
<script>
2023-06-20 18:34:36 +00:00
const urlBase = "{{url('/')}}";
const type = "{{$_type}}";
2023-06-08 17:51:07 +00:00
const locationField = "{{$_location_field}}";
2023-07-30 00:28:58 +00:00
const tagField = "{{$_tags_field??''}}";
2023-06-20 18:34:36 +00:00
let filterFields = {!! json_encode($_filter_fields) !!};
2023-05-18 17:14:55 +00:00
</script>
2023-06-20 18:34:36 +00:00
<script src="{{storage('assets/home/script.js')}}"></script>
2023-05-23 05:02:35 +00:00
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAKGJCCKvmWZl-L5bBF0uS5BWf0gN4ZkpI&libraries=places&callback=initMap"></script>
2023-05-15 19:30:18 +00:00
@stop