Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +20 -3
templates/menu.html
CHANGED
@@ -28,14 +28,30 @@
|
|
28 |
margin: auto;
|
29 |
display: flex;
|
30 |
flex-direction: column;
|
|
|
31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
.menu-image {
|
33 |
height: 200px;
|
34 |
width: 100%;
|
35 |
-
object-fit:
|
36 |
border-radius: 15px 15px 0 0;
|
37 |
cursor: pointer;
|
|
|
38 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
.card-title {
|
40 |
font-size: 1.2rem;
|
41 |
font-weight: bold;
|
@@ -98,7 +114,8 @@
|
|
98 |
<div class="card menu-card">
|
99 |
<!-- Image with video URL -->
|
100 |
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}"
|
101 |
-
data-video-url="{{ item.Video_Url__c }}"
|
|
|
102 |
<div class="card-body">
|
103 |
<h5 class="card-title">{{ item.Name }}</h5>
|
104 |
<p class="card-text">${{ item.Price__c }}</p>
|
@@ -155,7 +172,7 @@
|
|
155 |
image.addEventListener('click', function () {
|
156 |
const videoUrl = image.getAttribute('data-video-url');
|
157 |
if (videoUrl) {
|
158 |
-
showVideo(videoUrl); // Open the video modal
|
159 |
} else {
|
160 |
alert("No video associated with this image.");
|
161 |
}
|
|
|
28 |
margin: auto;
|
29 |
display: flex;
|
30 |
flex-direction: column;
|
31 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
32 |
}
|
33 |
+
|
34 |
+
/* Hover Effect for the card */
|
35 |
+
.menu-card:hover {
|
36 |
+
transform: scale(1.05);
|
37 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
38 |
+
}
|
39 |
+
|
40 |
.menu-image {
|
41 |
height: 200px;
|
42 |
width: 100%;
|
43 |
+
object-fit: cover;
|
44 |
border-radius: 15px 15px 0 0;
|
45 |
cursor: pointer;
|
46 |
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
47 |
}
|
48 |
+
|
49 |
+
/* Hover Effect for the image */
|
50 |
+
.menu-card:hover .menu-image {
|
51 |
+
transform: scale(1.1); /* Slight zoom on hover */
|
52 |
+
opacity: 0.8; /* Slight transparency for the zoom effect */
|
53 |
+
}
|
54 |
+
|
55 |
.card-title {
|
56 |
font-size: 1.2rem;
|
57 |
font-weight: bold;
|
|
|
114 |
<div class="card menu-card">
|
115 |
<!-- Image with video URL -->
|
116 |
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}"
|
117 |
+
data-video-url="{{ item.Video_Url__c }}"
|
118 |
+
onerror="this.src='https://via.placeholder.com/300x200.jpg?text=Image+Not+Available';">
|
119 |
<div class="card-body">
|
120 |
<h5 class="card-title">{{ item.Name }}</h5>
|
121 |
<p class="card-text">${{ item.Price__c }}</p>
|
|
|
172 |
image.addEventListener('click', function () {
|
173 |
const videoUrl = image.getAttribute('data-video-url');
|
174 |
if (videoUrl) {
|
175 |
+
showVideo(videoUrl); // Open the video modal and allow downloading
|
176 |
} else {
|
177 |
alert("No video associated with this image.");
|
178 |
}
|