|
46 | 46 | justify-content: flex-start;
|
47 | 47 | min-width: 220px;
|
48 | 48 | min-height: 430px;
|
| 49 | + transition: border-radius 0.4s ease-in-out, border-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out; |
49 | 50 | }
|
50 | 51 |
|
51 | 52 | .phone-notch {
|
|
60 | 61 | transform: translateX(-50%);
|
61 | 62 | z-index: 10;
|
62 | 63 | border: 1px solid #222;
|
| 64 | + cursor: pointer; |
| 65 | + /* Indicates it's clickable */ |
| 66 | + /* Added transition for smooth switching */ |
| 67 | + transition: all 0.4s ease-in-out; |
| 68 | + } |
| 69 | + |
| 70 | + .phone-frame.is-iphone { |
| 71 | + border-radius: 48px; |
| 72 | + /* More rounded corners for iPhone */ |
| 73 | + border-color: #38383a; |
| 74 | + /* iPhone's Pro dark gray titanium color */ |
| 75 | + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 1px 0 #666 inset; |
| 76 | + } |
| 77 | + |
| 78 | + .phone-frame.is-iphone .phone-notch { |
| 79 | + /* Transforms the notch into the Dynamic Island */ |
| 80 | + width: 110px; |
| 81 | + height: 28px; |
| 82 | + border-radius: 20px; |
| 83 | + /* Pill shape */ |
| 84 | + top: 14px; |
| 85 | + background: #000; |
| 86 | + border: none; |
63 | 87 | }
|
64 | 88 |
|
65 | 89 | .preview-bg {
|
|
186 | 210 | border-radius: 16px;
|
187 | 211 | }
|
188 | 212 |
|
| 213 | + .phone-frame.is-iphone { |
| 214 | + border-radius: 42px; |
| 215 | + } |
| 216 | + |
189 | 217 | .phone-notch {
|
190 | 218 | width: 14px;
|
191 | 219 | height: 14px;
|
192 | 220 | top: 8px;
|
193 | 221 | }
|
| 222 | + |
| 223 | + .phone-frame.is-iphone .phone-notch { |
| 224 | + width: 90px; |
| 225 | + height: 24px; |
| 226 | + top: 13px; |
| 227 | + } |
194 | 228 | }
|
195 | 229 |
|
196 | 230 | @media (max-width: 767.98px) {
|
@@ -277,7 +311,7 @@ <h3 class="mb-4">Cài đặt màn hình trường</h3>
|
277 | 311 | <!-- Right: Preview -->
|
278 | 312 | <div class="col-lg-7 col-md-6 d-flex align-items-center justify-content-center bg-light py-5 col-preview">
|
279 | 313 | <div class="phone-frame" id="phoneFrame">
|
280 |
| - <div class="phone-notch"></div> |
| 314 | + <div class="phone-notch" id="phoneClickableNotch"></div> |
281 | 315 | <img id="previewBg" class="preview-bg" style="display:none;">
|
282 | 316 | <div id="previewBgColor" class="preview-bg" style="z-index:1;"></div>
|
283 | 317 | <div class="preview-overlay">
|
@@ -415,6 +449,9 @@ <h3 class="mb-4">Cài đặt màn hình trường</h3>
|
415 | 449 | updateIconImage(iconImage.files[0]);
|
416 | 450 | updateLink();
|
417 | 451 | });
|
| 452 | + phoneClickableNotch.addEventListener('click', function () { |
| 453 | + phoneFrame.classList.toggle('is-iphone'); |
| 454 | + }); |
418 | 455 |
|
419 | 456 | // Initial state
|
420 | 457 | updateSchoolName();
|
|
0 commit comments