Created
March 27, 2021 17:46
-
-
Save KravMaguy/5f1ee7a9b31ffffe2948341c2e2f0a0a to your computer and use it in GitHub Desktop.
all_buildings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'inc/header.php'; //include the header file | |
require_once 'scripts/pdocon.php'; //include the db connector | |
require_once 'scripts/functions.php'; //include the functions file | |
?> | |
<? | |
if (isset($_GET['success']) && $_GET['success'] == 1) { | |
echo "<div class='alert alert-success alert-dismissable fade show custom-alert' role='alert'> | |
<button type='button' class='close' data-dismiss='alert' aria-label='Close'> | |
<span aria-hidden='true'>×</span> | |
</button> | |
You have successfully signed up please check your emailf or confirmation details | |
</div>"; | |
} | |
?> | |
<script src="gsap/TweenMax.min.js"></script> | |
<script src="gsap/DrawSVGPlugin.min.js""></script> | |
<div id="drawsvg_content"> | |
<?php include './svgloaders/LA_logo2.svg'?> | |
</div> | |
<script src="jscontrols/splashsvg.js"> | |
</script> | |
<?php include 'inc/navbar.php'?> | |
<!-- <script src='jscontrols/redstyle.js'></script> --> | |
<div class="modal-includes"> | |
<?php include 'inc/modals.php' ?> | |
</div> | |
<div style="display:inline;" class="wrap-container push"> | |
<nav aria-label="menu-nav" style="z-index:1;position:relative;" class="shadow" id="top-menu-nav"> | |
<a href="#menu" id="menu-link"> | |
<svg id="burger" width="30" class="openmenu" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"> | |
<path class="top" d="M0 9h30v2H0z"/> | |
<line class="mid" x1="0" y1="15" x2="30" y2="15" stroke="black" stroke-width="2" vector-effect="non-scaling-stroke"/> | |
<path class="bot" d="M0 19h30v2H0z"/> | |
</svg> | |
</a> | |
</nav> | |
<div class="map-canvas shadow"> | |
<div id="map" class="map"></div> | |
</div> | |
</div> | |
<div id="myOverlay" onclick="closeSearch()" class="overlay"> | |
<span class="closebtn" title="Close Overlay">×</span> | |
<div class="overlay-content"> | |
<input id="pac-input" onclick="event.stopPropagation();" type="text" placeholder="Search.." name="search"> | |
</div> | |
</div> | |
<?php $results = getAllBuildings() ?> | |
<script type="text/javascript"> isFinished = <?php echo true; ?>;</script> | |
<?php | |
foreach ($results as $row) { | |
$image = getFeaturedImage($row['building_id']); | |
$locations[] = array('name' => $row['name'], 'lat' => $row['lat'], 'lng' => $row['lng'], 'description' => $row['short_description'], 'id' => $row['building_id'], 'image' => $image); | |
} | |
$markers = json_encode($locations); | |
?> | |
<script> | |
<?php echo "var markers=$markers;\n"; ?> | |
</script> | |
<script src="assets/js/jquery.min.js"></script> | |
<script src="assets/js/bootstrap.bundle.min.js"></script> | |
<script src="assets/js/slide.min.js"></script> | |
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | |
<script src="https://unpkg.com/@google/markerclustererplus@4.0.1/dist/markerclustererplus.min.js"></script> | |
<script src="jscontrols/drawOutline.js"></script> | |
<script src="jscontrols/mapfunctions.js"></script> | |
<!-- <script src="jscontrols/homePageFunctions.js"></script> --> | |
<script src=`https://maps.googleapis.com/maps/api/js?key=${YOURKEY}&libraries=places&callback=initAutocomplete` async defer></script> | |
<script> | |
$(document).ready(function () { | |
// $('.menu-link').bigSlide({easyClose:true,}); | |
let menuWidth = "15.6em"; | |
const screenWidth = window.innerWidth; | |
if (screenWidth < 475) { | |
menuWidth = "35vw"; | |
} else if (screenWidth < 535) { | |
menuWidth = "11em"; | |
} else if (screenWidth < 600) { | |
menuWidth = "12em"; | |
} | |
const menuState={ | |
isOpen:false | |
} | |
const menuLink=$("#menu-link"); | |
menuLink.bigSlide({ | |
// easyClose: true, | |
menuWidth, | |
state: 'closed', | |
saveState: true, | |
beforeOpen: function() { | |
menuToggle.restart() | |
}, | |
beforeClose: function() { | |
menuToggle.reverse() | |
}, | |
}); | |
var controlit = $("#burger"); | |
var menuToggle = new TimelineMax({ paused: true, reversed: true }); | |
menuToggle | |
.set("", { className: "-=closemenu" }) | |
.set("", { className: "+=openmenu" }) | |
.to(".top", 0.2, { y: "-9px", transformOrigin: "50% 50%" }, "burg") | |
.to(".bot", 0.2, { y: "9px", transformOrigin: "50% 50%" }, "burg") | |
.to(".mid", 0.2, { scale: 0.1, transformOrigin: "50% 50%" }, "burg") | |
.to(controlit, 0.2, { fill:"rgb(244, 98, 58)"}, "burg") | |
.add("rotate") | |
.to(".top", 0.2, { y: "5" }, "rotate") | |
.to(".bot", 0.2, { y: "-5" }, "rotate") | |
.to(".top", 0.2, { rotationZ: 45, transformOrigin: "50% 50%" }, "rotate") | |
.to(".bot", 0.2, { rotationZ: -45, transformOrigin: "50% 50%" }, "rotate") | |
.set("#burger .mid", { opacity: 0 }); //temp fix for stupid iOS rotate y bug | |
if (isFinished) { | |
setTimeout(function () { | |
$("#drawsvg_content").fadeOut(); | |
}, 1000); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment