Spaces:
Sleeping
Sleeping
Gordon Li
commited on
Commit
·
ffcb8a0
1
Parent(s):
abcd2bb
Image Enlarger
Browse files- HKUSTBNBConstant.py +18 -4
HKUSTBNBConstant.py
CHANGED
@@ -195,7 +195,7 @@ TRAFFIC_DISCOUNT_DISPLAY = """
|
|
195 |
"""
|
196 |
|
197 |
TRAFFIC_POPUP_BASE = """
|
198 |
-
<div style='min-width:
|
199 |
<p style='margin: 5px 0;'><strong>Location ID:</strong> {location_id}</p>
|
200 |
{discount_display}
|
201 |
"""
|
@@ -211,9 +211,23 @@ TRAFFIC_RECORD_ENTRY = """
|
|
211 |
"""
|
212 |
|
213 |
TRAFFIC_IMAGE_HTML = """
|
214 |
-
<
|
215 |
-
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
"""
|
218 |
|
219 |
TRAFFIC_NO_RECORDS = "<p>No records available</p>"
|
|
|
195 |
"""
|
196 |
|
197 |
TRAFFIC_POPUP_BASE = """
|
198 |
+
<div style='min-width: 600px; padding: 10px;'>
|
199 |
<p style='margin: 5px 0;'><strong>Location ID:</strong> {location_id}</p>
|
200 |
{discount_display}
|
201 |
"""
|
|
|
211 |
"""
|
212 |
|
213 |
TRAFFIC_IMAGE_HTML = """
|
214 |
+
<div style="position: relative; display: inline-block;">
|
215 |
+
<img src='data:image/jpeg;base64,{base64_encoded}'
|
216 |
+
style='max-width: 100px; max-height: 100px; margin: 5px 0; cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease;'
|
217 |
+
onmouseover="this.style.transform='scale(1.05)'; this.style.borderColor='#4285f4';"
|
218 |
+
onmouseout="this.style.transform='scale(1)'; this.style.borderColor='transparent';"
|
219 |
+
onclick="this.parentElement.querySelector('.enlarged-view').style.display='flex';"
|
220 |
+
alt='Traffic Image'
|
221 |
+
title='Click to enlarge'>
|
222 |
+
<div class="enlarged-view" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center; flex-direction: column;">
|
223 |
+
<img src='data:image/jpeg;base64,{base64_encoded}'
|
224 |
+
style='max-width: 90%; max-height: 80vh; margin: 0 auto; border: 3px solid white;'>
|
225 |
+
<div style="color: white; margin-top: 15px; background: rgba(0,0,0,0.7); padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold;"
|
226 |
+
onclick="this.parentElement.style.display='none';">
|
227 |
+
Close
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
+
</div>
|
231 |
"""
|
232 |
|
233 |
TRAFFIC_NO_RECORDS = "<p>No records available</p>"
|