added site info
parent
a7a2d95d00
commit
3df88ea4cc
|
@ -1,41 +1,36 @@
|
||||||
@extends('template.'.config('settings.template').'.content.master')
|
@extends('template.'.config('settings.template').'.content.master')
|
||||||
|
@section('head')
|
||||||
|
<title>{{$content->title}} | {{config('settings.name')}}</title>
|
||||||
|
<style>
|
||||||
|
#map {
|
||||||
|
height: 400px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@stop
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<a href="{{url('/')}}"> ← Back</a>
|
||||||
<a href="{{url('/')}}"> ← Back</a>
|
|
||||||
|
|
||||||
<h1>{{$content->title}}</h1>
|
<h1>{{$content->title}}</h1>
|
||||||
|
<p>{{$content->description}}</p>
|
||||||
|
|
||||||
<p>{{$content->desription}}</p>
|
|
||||||
<img src="{{$content->image}}" alt="">
|
<img src="{{$content->image}}" alt="">
|
||||||
|
<div id="map"></div>
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAKGJCCKvmWZl-L5bBF0uS5BWf0gN4ZkpI&callback=initMap&v=weekly" defer></script>
|
||||||
<div id="map"></div>
|
<script>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAKGJCCKvmWZl-L5bBF0uS5BWf0gN4ZkpI&callback=initMap&v=weekly" defer></script>
|
|
||||||
<script>
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
let items = {!! json_encode($content) !!};
|
let item = {!! json_encode($content) !!};
|
||||||
items = items.data;
|
|
||||||
|
|
||||||
const map = new google.maps.Map(document.getElementById("map"), {
|
const map = new google.maps.Map(document.getElementById("map"), {
|
||||||
zoom: 5,
|
zoom: 5,
|
||||||
center: { lat: parseFloat(content.location.lat), lng: parseFloat(content.location.lng) }
|
center: { lat: parseFloat(item.location.lat), lng: parseFloat(item.location.lng) }
|
||||||
});
|
});
|
||||||
|
|
||||||
items.forEach(function(item){
|
let marker = new google.maps.Marker({
|
||||||
let marker = new google.maps.Marker({
|
position: { lat: parseFloat(item.location.lat), lng: parseFloat(item.location.lng) },
|
||||||
position: { lat: parseFloat(item.location.lat), lng: parseFloat(item.location.lng) },
|
map: map,
|
||||||
map: map,
|
title: item.title,
|
||||||
title: item.title,
|
optimized: false,
|
||||||
optimized: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.initMap = initMap;
|
window.initMap = initMap;
|
||||||
</script>
|
</script>
|
||||||
|
@stop
|
||||||
@stop
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
@extends('template.'.config('settings.template').'.content.master')
|
@extends('template.'.config('settings.template').'.content.master')
|
||||||
|
@section('head')
|
||||||
|
<title>Home | {{config('settings.name')}}</title>
|
||||||
|
<style>
|
||||||
|
#map {
|
||||||
|
height: 400px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@stop
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<h1>{{config('settings.name')}}</h1>
|
<h1>{{config('settings.name')}}</h1>
|
||||||
|
|
||||||
<p>{{config('settings.description')}}</p>
|
<p>{{config('settings.description')}}</p>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAKGJCCKvmWZl-L5bBF0uS5BWf0gN4ZkpI&callback=initMap&v=weekly" defer></script>
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAKGJCCKvmWZl-L5bBF0uS5BWf0gN4ZkpI&callback=initMap&v=weekly" defer></script>
|
||||||
|
@ -10,6 +17,7 @@
|
||||||
function initMap() {
|
function initMap() {
|
||||||
let items = {!! json_encode($contents) !!};
|
let items = {!! json_encode($contents) !!};
|
||||||
items = items.data;
|
items = items.data;
|
||||||
|
console.log(items);
|
||||||
|
|
||||||
const map = new google.maps.Map(document.getElementById("map"), {
|
const map = new google.maps.Map(document.getElementById("map"), {
|
||||||
zoom: 5,
|
zoom: 5,
|
||||||
|
@ -30,5 +38,4 @@
|
||||||
}
|
}
|
||||||
window.initMap = initMap;
|
window.initMap = initMap;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@stop
|
@stop
|
|
@ -1,15 +1,11 @@
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||||
<meta name="description" content="{{config('settings.description')}}" />
|
<meta name="description" content="{{config('settings.description')}}" />
|
||||||
<meta name="author" content="" />
|
<meta name="author" content=""/>
|
||||||
|
@yield('head')
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue