Skip to content

Commit d2a9877

Browse files
author
Amr Wagdy
committed
chore: release v4.8.6
2 parents 5d0eb16 + fbd1525 commit d2a9877

File tree

3 files changed

+126
-123
lines changed

3 files changed

+126
-123
lines changed

Diff for: examples/common/demo.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const bgCopyButton = getElementById("bg-copy-button");
2323
const leftColumnImage = getElementById("left-column-image");
2424
const leftColumnImageSize = getElementById("left-column-image-size");
2525

26+
const heroSectionImage = getElementById("hero-section-image");
27+
const heroSectionImageSize = getElementById("hero-section-image-size");
2628
const carImage = getElementById("car-image");
2729
const originalCarImageSize = getElementById("original-car-image-size");
2830
const cropCarImageSize = getElementById("crop-car-image-size");
@@ -109,6 +111,7 @@ function updateImageAndBoxSize() {
109111
setWindowBoxes();
110112

111113
devicePixelRatio.innerText = window.devicePixelRatio.toFixed(1);
114+
heroSectionImageSize.innerHTML = heroSectionImage.offsetWidth;
112115
originalCarImageSize.innerHTML = carImage.offsetWidth;
113116
cropCarImageSize.innerHTML = carImage.offsetWidth;
114117
autoCropCarImageSize.innerHTML = carImage.offsetWidth;

Diff for: examples/low-preview/src/index.html

+35-66
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h2 class="content-text">
9090
</a>
9191
</div>
9292
<div class="sea-coast container">
93-
<img ci-params="ci_info=2" ci-src="Main+image.jpg?vh=a1983b" alt="sea-coast" />
93+
<img ci-params="ci_info=1" ci-src="Main+image.jpg?vh=a1983b" alt="sea-coast" />
9494
<div class="green-blur-circle hide-in-mobile"></div>
9595
<div class="blue-blur-circle hide-in-mobile"></div>
9696
</div>
@@ -194,17 +194,11 @@ <h2>Demo gallery</h2>
194194
id="left-column-image"
195195
ci-params="ci_info=2"
196196
/>
197-
<p class="square-img-text">
198-
Container-square: <strong><span id="left-column-image-size"></span> px</strong>
199-
</p>
200-
<p class="original-size-text">
201-
Original size: <strong>180 kB</strong>
202-
<a
203-
target="_blank"
204-
href="https://scaleflex.cloudimg.io/v7/demo/cloudimage-responsive-demo/josh-withers-xMTXJbHxOZk-unsplash.jpg?ci_info=2">
205-
Link
206-
</a>
207-
</p>
197+
<div class="image-size-wrapper">
198+
<div class="text">
199+
<span><span id="left-column-image-size"></span> px</span>
200+
</div>
201+
</div>
208202
</div>
209203
<div class="right-column">
210204
<div class="square-with-circle-img">
@@ -215,18 +209,11 @@ <h2>Demo gallery</h2>
215209
id="right-column-first-image"
216210
ci-params="ci_info=2"
217211
/>
218-
<p class="square-img-text">
219-
Container-square: <strong><span id="right-column-first-image-size"></span> px</strong>
220-
</p>
221-
<p class="original-size-text">
222-
Original size: <strong>57.5 kB</strong>
223-
<a
224-
target="_blank"
225-
href="https://scaleflex.cloudimg.io/v7/demo/cloudimage-responsive-demo/miroslav-skopek-7Wd3_WwpPb0-unsplash.jpg?ci_info=2"
226-
>
227-
Link
228-
</a>
229-
</p>
212+
<div class="image-size-wrapper">
213+
<p class="text">
214+
<span><span id="right-column-first-image-size"></span> px</span>
215+
</p>
216+
</div>
230217
</div>
231218
<div class="circle-image-wrapper">
232219
<img
@@ -238,18 +225,11 @@ <h2>Demo gallery</h2>
238225
style="border-radius: 50%;"
239226
/>
240227
<div class="circle-image-text-wrapper">
241-
<p class="square-img-text">
242-
Container-circle: <strong><span id="right-column-second-image-size"></span> px</strong>
243-
</p>
244-
<p class="original-size-text">
245-
Original size: <strong>39.7 kB</strong>
246-
<a
247-
target="_blank"
248-
href="https://scaleflex.cloudimg.io/v7/demo/cloudimage-responsive-demo/ibrahima-toure-qVrgGyQqZgg-unsplash.jpg?ci_info=2"
249-
>
250-
Link
251-
</a>
252-
</p>
228+
<div class="image-size-wrapper">
229+
<p class="text">
230+
<span><span id="right-column-second-image-size"></span> px</span>
231+
</p>
232+
</div>
253233
</div>
254234
</div>
255235
</div>
@@ -260,18 +240,11 @@ <h2>Demo gallery</h2>
260240
alt="img"
261241
ci-params="ci_info=2"
262242
/>
263-
<p class="square-img-text">
264-
Container-square: <strong><span id="first-horizontal-image-size"></span> px</strong>
265-
</p>
266-
<p class="original-size-text">
267-
Original size: <strong>106 kB</strong>
268-
<a
269-
target="_blank"
270-
href="https://scaleflex.cloudimg.io/v7/demo/cloudimage-responsive-demo/alexandra-lawrence-N-zxiG46luY-unsplash.jpg?ci_info=2"
271-
>
272-
Link
273-
</a>
274-
</p>
243+
<div class="image-size-wrapper">
244+
<p class="text">
245+
<span><span id="first-horizontal-image-size"></span> px</span>
246+
</p>
247+
</div>
275248
</div>
276249
</div>
277250
</div>
@@ -282,18 +255,11 @@ <h2>Demo gallery</h2>
282255
id="second-horizontal-image"
283256
ci-params="ci_info=2"
284257
/>
285-
<p class="square-img-text">
286-
Container-square: <strong><span id="second-horizontal-image-size"></span> px</strong>
287-
</p>
288-
<p class="original-size-text">
289-
Original size: <strong>3 MB</strong>
290-
<a
291-
target="_blank"
292-
href="https://scaleflex.cloudimg.io/v7/demo/cloudimage-responsive-demo/alexandra-lawrence-N-zxiG46luY-unsplash.jpg?ci_info=2"
293-
>
294-
Link
295-
</a>
296-
</p>
258+
<div class="image-size-wrapper">
259+
<p class="text">
260+
<span><span id="second-horizontal-image-size"></span> px</span>
261+
</p>
262+
</div>
297263
</div>
298264
</div>
299265
</section>
@@ -665,12 +631,15 @@ <h2>Any questions?</h2>
665631
</div>
666632
</section>
667633
<div id="device-pixel-ratio" class="device-pixel-ratio">
668-
<div class="label">Your device pixel ratio:</div>
669-
<span>---</span>
670-
<hr>
671-
<div class="label">Your device width:</div>
672-
<div class="window-width-box">
673-
<span>---</span>
634+
<div class="label">Your device pixel ratio:
635+
<div class="window-width-box">
636+
<span>---</span>
637+
</div>
638+
</div>
639+
<div class="label">Your device width:
640+
<div class="window-width-box">
641+
<span>---</span>
642+
</div>
674643
</div>
675644
</div>
676645
<section class="footer">

Diff for: examples/low-preview/src/styles/main.css

+88-57
Original file line numberDiff line numberDiff line change
@@ -342,42 +342,6 @@ body {
342342
min-width: calc(100% - (471px + 32px));
343343
}
344344

345-
.demo-gallery .image-wrapper p {
346-
font-size: 16px;
347-
line-height: 20px;
348-
font-weight: 400;
349-
color: #4d5c74;
350-
width: 100%;
351-
}
352-
353-
.demo-gallery .image-wrapper a {
354-
color: #3daba4;
355-
font-size: 16px;
356-
line-height: 20px;
357-
padding-left: 12px;
358-
font-weight: 600;
359-
}
360-
361-
.demo-gallery .original-size-text a {
362-
color: #3daba4;
363-
font-size: 16px;
364-
line-height: 20px;
365-
padding-left: 12px;
366-
font-weight: 600;
367-
}
368-
369-
.demo-gallery .image-wrapper .square-img-text {
370-
margin-top: 9px;
371-
}
372-
373-
.demo-gallery .image-wrapper .circle-image-text-wrapper {
374-
text-align: center;
375-
}
376-
377-
.demo-gallery .image-wrapper .original-size-text {
378-
margin-top: 4px;
379-
}
380-
381345
.demo-gallery .image-wrapper .square-with-circle-img {
382346
display: flex;
383347
column-gap: 22.48px;
@@ -397,17 +361,6 @@ body {
397361
display: none;
398362
}
399363

400-
.demo-gallery .mobile-screen-horizontal-image p {
401-
font-size: 16px;
402-
line-height: 20px;
403-
font-weight: 400;
404-
color: #4d5c74;
405-
}
406-
407-
.demo-gallery .mobile-screen-horizontal-image .square-img-text {
408-
margin-top: 9px;
409-
}
410-
411364
.crop-images-section {
412365
display: flex;
413366
flex-direction: column;
@@ -965,6 +918,61 @@ body {
965918
margin: 0 auto;
966919
}
967920

921+
.device-pixel-ratio {
922+
display: flex;
923+
flex-direction: column;
924+
position: fixed;
925+
top: 839px;
926+
right: 18px;
927+
width: 314px;
928+
height: 112px;
929+
padding: 20px;
930+
background: rgba(255, 255, 255, 0.8);
931+
box-shadow: 0px 2px 41px 10px rgba(0, 0, 0, 0.05);
932+
border-radius: 4px;
933+
row-gap: 8px;
934+
}
935+
936+
.device-pixel-ratio .label {
937+
display: flex;
938+
align-items: center;
939+
justify-content: space-between;
940+
font-size: 16px;
941+
line-height: 24px;
942+
color: #4D5C74;
943+
font-weight: 400;
944+
}
945+
946+
.device-pixel-ratio .label span {
947+
font-size: 16px;
948+
line-height: 24px;
949+
color: #203254;
950+
font-weight: 600;
951+
}
952+
953+
.device-pixel-ratio .window-width-box:nth-child(1) {
954+
display: flex;
955+
justify-content: center;
956+
align-items: center;
957+
padding: 6.4px 27.12px 6.4px 28px;
958+
background-color: #F2F7FA;
959+
border-radius: 4px;
960+
width: 90px;
961+
height: 32px;
962+
}
963+
964+
.device-pixel-ratio .window-width-box:nth-child(2) {
965+
display: flex;
966+
justify-content: center;
967+
align-items: center;
968+
padding: 7.2px 12px 6.4px 13px;
969+
background-color: #F2F7FA;
970+
border-radius: 4px;
971+
width: 90px;
972+
height: 32px;
973+
margin-top: 8px
974+
}
975+
968976
.footer .accordion-wrapper {
969977
display: flex;
970978
flex-direction: column;
@@ -1146,6 +1154,39 @@ body {
11461154
color: #4d5c74;
11471155
}
11481156

1157+
.image-size-wrapper {
1158+
display: flex;
1159+
justify-content: center;
1160+
margin-top: 15px;
1161+
}
1162+
1163+
.image-size-wrapper::before {
1164+
content: "";
1165+
height: 14px;
1166+
border: 1px solid #BEC6D2;
1167+
border-top: none;
1168+
border-right: none;
1169+
width: 50%;
1170+
}
1171+
1172+
.image-size-wrapper::after {
1173+
content: "";
1174+
height: 14px;
1175+
border: 1px solid #BEC6D2;
1176+
border-top: none;
1177+
border-left: none;
1178+
width: 50%;
1179+
}
1180+
1181+
.text {
1182+
white-space: nowrap;
1183+
font-size: 16px;
1184+
line-height: 20px;
1185+
font-weight: 600;
1186+
color: #4d5c74;
1187+
margin: 0 12px;
1188+
}
1189+
11491190
@media(max-width: 1229px){
11501191
.content-wrapper .features-wrapper .features {
11511192
margin-top: 54px;
@@ -1317,16 +1358,6 @@ body {
13171358
align-items: flex-start;
13181359
}
13191360

1320-
.demo-gallery .image-wrapper .square-img-text {
1321-
text-align: left;
1322-
white-space: nowrap;
1323-
}
1324-
1325-
.demo-gallery .image-wrapper .original-size-text {
1326-
text-align: left;
1327-
white-space: nowrap;
1328-
}
1329-
13301361
.demo-gallery .image-wrapper a {
13311362
padding-left: 0;
13321363
}

0 commit comments

Comments
 (0)