-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.php
174 lines (135 loc) · 6.38 KB
/
gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?php
include_once 'config.php';
// $presidentialSuitePrice=$countryardSuitePrice=$tigerDenPrice=$leopardsLairPrice=$deerParkPrice='';
$conn = connectToDatabase();
$mediaData=getPaginatedImageData($conn);
closeDatabaseConnection($conn)
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Ansonika">
<title>Countryard- Gallery</title>
<!-- Favicons-->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" type="image/x-icon" href="img/apple-touch-icon-57x57-precomposed.webp">
<link rel="apple-touch-icon" type="image/x-icon" sizes="72x72" href="img/apple-touch-icon-72x72-precomposed.webp">
<link rel="apple-touch-icon" type="image/x-icon" sizes="114x114"
href="img/apple-touch-icon-114x114-precomposed.webp">
<link rel="apple-touch-icon" type="image/x-icon" sizes="144x144"
href="img/apple-touch-icon-144x144-precomposed.webp">
<!-- GOOGLE WEB FONT-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;500&family=Montserrat:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<!-- BASE CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/vendors.min.css" rel="stylesheet">
<!-- YOUR CUSTOM CSS -->
<link href="css/custom.css" rel="stylesheet">
</head>
<body>
<div id="preloader">
<div data-loader="circle-side"></div>
</div><!-- /Page Preload -->
<div class="layer"></div><!-- Opacity Mask -->
<?php include_once 'navbar.php'; ?>
<!-- /nav_panel -->
<main>
<div class="hero medium-height jarallax" data-jarallax data-speed="0.2">
<img class="jarallax-img" src="img/C2.webp" alt="">
<div class="wrapper opacity-mask d-flex align-items-center justify-content-center text-center animate_hero"
data-opacity-mask="rgba(0, 0, 0, 0.5)">
<div class="container">
<small class="slide-animated one">Luxury Resort Experience</small>
<h1 class="slide-animated two">Gallery</h1>
</div>
</div>
</div>
<!-- /Background Img Parallax -->
<div class="container margin_120_95">
<div class="isotope-wrapper">
<div class="row justify-content-center">
<?php
// Loop through the image data and generate the HTML code
foreach ($mediaData as $data) {
$mediaSrc = $data["src"];
$mediaLink = $data["link"];
$isVideo = strpos($mediaSrc, 'VID') !== false; // Check if it's a video
echo '<div class="item col-xl-4 col-lg-6 col-mb-6 mb-4">';
echo '<div class="item-img" data-cue="slideInUp">';
if ($isVideo) {
echo '<div class="video-container">';
echo "<video controls autoplay muted loop class='landscape-video'>";
echo "<source src='$mediaSrc' type='video/mp4'>";
echo "Your browser does not support the video tag.";
echo "</video>";
echo '</div>';
} else {
echo "<img src='$mediaSrc' alt='' />";
}
echo '<div class="content">';
echo "<a data-fslightbox='gallery_1' data-type='" . ($isVideo ? 'video' : 'image') . "' href='$mediaLink'>";
echo "<i class='bi " . ($isVideo ? 'bi-play-circle' : 'bi-arrows-angle-expand') . "'></i>";
echo "</a>";
echo '</div>';
echo '</div>';
echo '</div>';
// Add CSS for the landscape video
echo '<style>
.video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 aspect ratio (9 / 16 * 100%) */
height: 0;
overflow: hidden;
}
.landscape-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>';
}
?>
</div>
<!--/row -->
</div>
</div>
<!--/container -->
</main>
<?php require 'footer.php'; ?>
<!-- /footer -->
<div class="progress-wrap">
<svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
<path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98" />
</svg>
</div>
<!-- /back to top -->
<!-- COMMON SCRIPTS -->
<script src="js/common_scripts.js"></script>
<script src="js/common_functions.js"></script>
<script src="phpmailer/validate.js"></script>
<!-- SPECIFIC SCRIPTS -->
<script src="js/isotope.min.js"></script>
<script>
$(function() {
"use strict";
$(window).on('load', function() {
var $container = $('.isotope-wrapper');
$container.isotope({
itemSelector: '.item',
layoutMode: 'masonry',
});
});
});
</script>
</body>
</html>