uikit 3.11.2-dev.4c11be04b → 3.11.2-dev.54d67da03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +6 -17
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +255 -202
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +261 -220
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/state.js +4 -4
- package/src/js/components/parallax.js +5 -16
- package/src/js/components/sortable.js +1 -2
- package/src/js/core/core.js +2 -2
- package/src/js/core/drop.js +1 -1
- package/src/js/core/height-viewport.js +2 -2
- package/src/js/core/img.js +101 -97
- package/src/js/core/navbar.js +6 -2
- package/src/js/core/sticky.js +82 -50
- package/src/js/util/dimensions.js +28 -12
- package/src/js/util/fastdom.js +2 -2
- package/src/js/util/options.js +4 -4
- package/src/js/util/viewport.js +7 -3
- package/tests/image.html +28 -38
- package/tests/images/test.avif +0 -0
- package/tests/images/test.webp +0 -0
- package/tests/sticky-parallax.html +44 -41
- package/tests/sticky.html +56 -24
package/src/js/core/sticky.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import Class from '../mixin/class';
|
|
2
2
|
import Media from '../mixin/media';
|
|
3
|
-
import {$, addClass, after, Animation,
|
|
3
|
+
import {$, addClass, after, Animation, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
|
|
7
7
|
mixins: [Class, Media],
|
|
8
8
|
|
|
9
9
|
props: {
|
|
10
|
+
position: String,
|
|
10
11
|
top: null,
|
|
11
12
|
bottom: Boolean,
|
|
12
13
|
offset: String,
|
|
@@ -22,6 +23,7 @@ export default {
|
|
|
22
23
|
},
|
|
23
24
|
|
|
24
25
|
data: {
|
|
26
|
+
position: 'top',
|
|
25
27
|
top: 0,
|
|
26
28
|
bottom: false,
|
|
27
29
|
offset: 0,
|
|
@@ -38,8 +40,19 @@ export default {
|
|
|
38
40
|
|
|
39
41
|
computed: {
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
+
position({position}, $el) {
|
|
44
|
+
return position === 'auto'
|
|
45
|
+
? (this.isFixed ? this.placeholder : $el).offsetHeight > getHeight(window)
|
|
46
|
+
? 'bottom'
|
|
47
|
+
: 'top'
|
|
48
|
+
: position;
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
offset({offset}, $el) {
|
|
52
|
+
if (this.position === 'bottom') {
|
|
53
|
+
offset += '+100vh-100%';
|
|
54
|
+
}
|
|
55
|
+
return toPx(offset, 'height', $el);
|
|
43
56
|
},
|
|
44
57
|
|
|
45
58
|
selTarget({selTarget}, $el) {
|
|
@@ -100,7 +113,7 @@ export default {
|
|
|
100
113
|
|
|
101
114
|
handler() {
|
|
102
115
|
|
|
103
|
-
if (!(this.targetOffset !== false && location.hash && window
|
|
116
|
+
if (!(this.targetOffset !== false && location.hash && scrollTop(window) > 0)) {
|
|
104
117
|
return;
|
|
105
118
|
}
|
|
106
119
|
|
|
@@ -130,7 +143,7 @@ export default {
|
|
|
130
143
|
|
|
131
144
|
{
|
|
132
145
|
|
|
133
|
-
read({height}, types) {
|
|
146
|
+
read({height, margin}, types) {
|
|
134
147
|
|
|
135
148
|
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
136
149
|
|
|
@@ -138,42 +151,52 @@ export default {
|
|
|
138
151
|
return false;
|
|
139
152
|
}
|
|
140
153
|
|
|
141
|
-
|
|
154
|
+
const hide = this.isActive && types.has('resize');
|
|
155
|
+
if (hide) {
|
|
142
156
|
this.hide();
|
|
143
|
-
height = this.$el.offsetHeight;
|
|
144
|
-
this.show();
|
|
145
157
|
}
|
|
146
158
|
|
|
147
|
-
|
|
159
|
+
if (!this.isActive) {
|
|
160
|
+
height = this.$el.offsetHeight;
|
|
161
|
+
margin = css(this.$el, 'margin');
|
|
162
|
+
}
|
|
148
163
|
|
|
149
|
-
if (
|
|
150
|
-
this.
|
|
151
|
-
return false;
|
|
164
|
+
if (hide) {
|
|
165
|
+
this.show();
|
|
152
166
|
}
|
|
153
167
|
|
|
168
|
+
const overflow = Math.max(0, height + this.offset - getHeight(window));
|
|
169
|
+
|
|
154
170
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.offsetParentTop = offset(referenceElement.offsetParent).top;
|
|
171
|
+
const topOffset = offset(referenceElement).top;
|
|
172
|
+
const offsetParentTop = offset(referenceElement.offsetParent).top;
|
|
158
173
|
|
|
159
|
-
const
|
|
174
|
+
const top = parseProp(this.top, this.$el, topOffset);
|
|
175
|
+
const bottom = parseProp(this.bottom, this.$el, topOffset + height);
|
|
160
176
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
177
|
+
const start = Math.max(top, topOffset) - this.offset;
|
|
178
|
+
const end = bottom
|
|
179
|
+
? bottom - this.$el.offsetHeight + overflow - this.offset
|
|
180
|
+
: getScrollingElement(this.$el).scrollHeight - getHeight(window);
|
|
164
181
|
|
|
165
182
|
return {
|
|
183
|
+
start,
|
|
184
|
+
end,
|
|
185
|
+
overflow,
|
|
186
|
+
topOffset,
|
|
187
|
+
offsetParentTop,
|
|
166
188
|
height,
|
|
167
|
-
|
|
168
|
-
|
|
189
|
+
margin,
|
|
190
|
+
width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
|
|
191
|
+
top: offsetPosition(this.placeholder)[0]
|
|
169
192
|
};
|
|
170
193
|
},
|
|
171
194
|
|
|
172
|
-
write({height,
|
|
195
|
+
write({height, margin}) {
|
|
173
196
|
|
|
174
197
|
const {placeholder} = this;
|
|
175
198
|
|
|
176
|
-
css(placeholder,
|
|
199
|
+
css(placeholder, {height, margin});
|
|
177
200
|
|
|
178
201
|
if (!within(placeholder, document)) {
|
|
179
202
|
after(this.$el, placeholder);
|
|
@@ -190,42 +213,48 @@ export default {
|
|
|
190
213
|
|
|
191
214
|
{
|
|
192
215
|
|
|
193
|
-
read({scroll = 0}) {
|
|
216
|
+
read({scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end}) {
|
|
194
217
|
|
|
195
|
-
|
|
218
|
+
const scroll = scrollTop(window);
|
|
219
|
+
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
196
220
|
|
|
197
221
|
return {
|
|
198
|
-
dir
|
|
199
|
-
|
|
222
|
+
dir,
|
|
223
|
+
prevDir,
|
|
224
|
+
scroll,
|
|
225
|
+
prevScroll,
|
|
226
|
+
overflowScroll: clamp(
|
|
227
|
+
overflowScroll
|
|
228
|
+
+ clamp(scroll, start, end)
|
|
229
|
+
- clamp(prevScroll, start, end),
|
|
230
|
+
0,
|
|
231
|
+
overflow
|
|
232
|
+
)
|
|
200
233
|
};
|
|
201
234
|
},
|
|
202
235
|
|
|
203
236
|
write(data, types) {
|
|
204
237
|
|
|
205
|
-
const now = Date.now();
|
|
206
238
|
const isScrollUpdate = types.has('scroll');
|
|
207
|
-
const {initTimestamp = 0, dir,
|
|
239
|
+
const {initTimestamp = 0, dir, prevDir, scroll, prevScroll = 0, top, start, topOffset, height} = data;
|
|
208
240
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (scroll < 0 || scroll === lastScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
|
|
241
|
+
if (scroll < 0 || scroll === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
|
|
212
242
|
return;
|
|
213
243
|
}
|
|
214
244
|
|
|
215
|
-
|
|
245
|
+
const now = Date.now();
|
|
246
|
+
if (now - initTimestamp > 300 || dir !== prevDir) {
|
|
216
247
|
data.initScroll = scroll;
|
|
217
248
|
data.initTimestamp = now;
|
|
218
249
|
}
|
|
219
250
|
|
|
220
|
-
data.
|
|
221
|
-
|
|
222
|
-
if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) {
|
|
251
|
+
if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(prevScroll - scroll) <= 10) {
|
|
223
252
|
return;
|
|
224
253
|
}
|
|
225
254
|
|
|
226
255
|
if (this.inactive
|
|
227
|
-
|| scroll <
|
|
228
|
-
|| this.showOnUp && (scroll <=
|
|
256
|
+
|| scroll < start
|
|
257
|
+
|| this.showOnUp && (scroll <= start || dir === 'down' && isScrollUpdate || dir === 'up' && !this.isFixed && scroll <= topOffset + height)
|
|
229
258
|
) {
|
|
230
259
|
|
|
231
260
|
if (!this.isFixed) {
|
|
@@ -240,7 +269,7 @@ export default {
|
|
|
240
269
|
|
|
241
270
|
this.isFixed = false;
|
|
242
271
|
|
|
243
|
-
if (this.animation && scroll >
|
|
272
|
+
if (this.animation && scroll > topOffset) {
|
|
244
273
|
Animation.cancel(this.$el);
|
|
245
274
|
Animation.out(this.$el, this.animation).then(() => this.hide(), noop);
|
|
246
275
|
} else {
|
|
@@ -290,23 +319,28 @@ export default {
|
|
|
290
319
|
|
|
291
320
|
update() {
|
|
292
321
|
|
|
293
|
-
const
|
|
294
|
-
|
|
322
|
+
const {width, scroll = 0, overflow, overflowScroll = 0, start, end, topOffset, height, offsetParentTop} = this._data;
|
|
323
|
+
const active = start !== 0 || scroll > start;
|
|
324
|
+
let top = this.offset;
|
|
295
325
|
let position = 'fixed';
|
|
296
326
|
|
|
297
|
-
if (
|
|
298
|
-
top = this.
|
|
327
|
+
if (scroll > end) {
|
|
328
|
+
top = end + this.offset - offsetParentTop;
|
|
299
329
|
position = 'absolute';
|
|
300
330
|
}
|
|
301
331
|
|
|
332
|
+
if (overflow) {
|
|
333
|
+
top -= overflowScroll;
|
|
334
|
+
}
|
|
335
|
+
|
|
302
336
|
css(this.$el, {
|
|
303
337
|
position,
|
|
304
338
|
top: `${top}px`,
|
|
305
|
-
width
|
|
339
|
+
width
|
|
306
340
|
});
|
|
307
341
|
|
|
308
342
|
this.isActive = active;
|
|
309
|
-
toggleClass(this.$el, this.clsBelow,
|
|
343
|
+
toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);
|
|
310
344
|
addClass(this.$el, this.clsFixed);
|
|
311
345
|
|
|
312
346
|
}
|
|
@@ -315,12 +349,10 @@ export default {
|
|
|
315
349
|
|
|
316
350
|
};
|
|
317
351
|
|
|
318
|
-
function parseProp(
|
|
319
|
-
|
|
320
|
-
const value = $props[prop];
|
|
352
|
+
function parseProp(value, el, propOffset) {
|
|
321
353
|
|
|
322
354
|
if (!value) {
|
|
323
|
-
return;
|
|
355
|
+
return 0;
|
|
324
356
|
}
|
|
325
357
|
|
|
326
358
|
if (isString(value) && value.match(/^-?\d/)) {
|
|
@@ -329,7 +361,7 @@ function parseProp(prop, {$props, $el, [`${prop}Offset`]: propOffset}) {
|
|
|
329
361
|
|
|
330
362
|
} else {
|
|
331
363
|
|
|
332
|
-
return offset(value === true ? parent(
|
|
364
|
+
return offset(value === true ? parent(el) : query(value, el)).bottom;
|
|
333
365
|
|
|
334
366
|
}
|
|
335
367
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {css} from './style';
|
|
2
|
-
import {each,
|
|
2
|
+
import {each, isDocument, isElement, isString, isUndefined, isWindow, memoize, toFloat, toNode, toWindow, ucfirst} from './lang';
|
|
3
3
|
|
|
4
4
|
const dirs = {
|
|
5
5
|
width: ['left', 'right'],
|
|
@@ -157,19 +157,35 @@ export function flipPosition(pos) {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
export function toPx(value, property = 'width', element = window, offsetDim = false) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
160
|
+
|
|
161
|
+
if (!isString(value)) {
|
|
162
|
+
return toFloat(value);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return parseCalc(value).reduce((result, value) => {
|
|
166
|
+
const unit = parseUnit(value);
|
|
167
|
+
if (unit) {
|
|
168
|
+
value = percent(
|
|
169
|
+
unit === 'vh'
|
|
170
|
+
? height(toWindow(element))
|
|
171
|
+
: unit === 'vw'
|
|
172
|
+
? width(toWindow(element))
|
|
173
|
+
: offsetDim
|
|
174
|
+
? element[`offset${ucfirst(property)}`]
|
|
175
|
+
: dimensions(element)[property],
|
|
176
|
+
value
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return result + toFloat(value);
|
|
181
|
+
}, 0);
|
|
171
182
|
}
|
|
172
183
|
|
|
184
|
+
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
185
|
+
const parseCalc = memoize(calc => calc.toString().replace(/\s/g, '').match(calcRe) || []);
|
|
186
|
+
const unitRe = /(?:v[hw]|%)$/;
|
|
187
|
+
const parseUnit = memoize(str => (str.match(unitRe) || [])[0]);
|
|
188
|
+
|
|
173
189
|
function percent(base, value) {
|
|
174
190
|
return base * toFloat(value) / 100;
|
|
175
191
|
}
|
package/src/js/util/fastdom.js
CHANGED
|
@@ -31,7 +31,7 @@ export const fastdom = {
|
|
|
31
31
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
function flush(recursion
|
|
34
|
+
function flush(recursion) {
|
|
35
35
|
runTasks(fastdom.reads);
|
|
36
36
|
runTasks(fastdom.writes.splice(0));
|
|
37
37
|
|
|
@@ -53,7 +53,7 @@ function scheduleFlush(recursion) {
|
|
|
53
53
|
if (recursion && recursion < RECURSION_LIMIT) {
|
|
54
54
|
Promise.resolve().then(() => flush(recursion));
|
|
55
55
|
} else {
|
|
56
|
-
requestAnimationFrame(() => flush());
|
|
56
|
+
requestAnimationFrame(() => flush(1));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
}
|
package/src/js/util/options.js
CHANGED
|
@@ -134,9 +134,8 @@ export function parseOptions(options, args = []) {
|
|
|
134
134
|
|
|
135
135
|
try {
|
|
136
136
|
|
|
137
|
-
return
|
|
138
|
-
? {
|
|
139
|
-
: startsWith(options, '{')
|
|
137
|
+
return options
|
|
138
|
+
? startsWith(options, '{')
|
|
140
139
|
? JSON.parse(options)
|
|
141
140
|
: args.length && !includes(options, ':')
|
|
142
141
|
? ({[args[0]]: options})
|
|
@@ -146,7 +145,8 @@ export function parseOptions(options, args = []) {
|
|
|
146
145
|
options[key.trim()] = value.trim();
|
|
147
146
|
}
|
|
148
147
|
return options;
|
|
149
|
-
}, {})
|
|
148
|
+
}, {})
|
|
149
|
+
: {};
|
|
150
150
|
|
|
151
151
|
} catch (e) {
|
|
152
152
|
return {};
|
package/src/js/util/viewport.js
CHANGED
|
@@ -2,7 +2,7 @@ import {css} from './style';
|
|
|
2
2
|
import {Promise} from './promise';
|
|
3
3
|
import {isVisible, parents} from './filter';
|
|
4
4
|
import {offset, offsetPosition} from './dimensions';
|
|
5
|
-
import {clamp, findIndex, intersectRect, isDocument, isWindow, toNode, toWindow} from './lang';
|
|
5
|
+
import {clamp, findIndex, intersectRect, isDocument, isUndefined, isWindow, toNode, toWindow} from './lang';
|
|
6
6
|
|
|
7
7
|
export function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
8
8
|
|
|
@@ -31,7 +31,11 @@ export function scrollTop(element, top) {
|
|
|
31
31
|
element = toNode(element);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
if (isUndefined(top)) {
|
|
35
|
+
return element.scrollTop;
|
|
36
|
+
} else {
|
|
37
|
+
element.scrollTop = top;
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
export function scrollIntoView(element, {offset: offsetBy = 0} = {}) {
|
|
@@ -145,7 +149,7 @@ export function getViewportClientHeight(scrollElement) {
|
|
|
145
149
|
return (scrollElement === getScrollingElement(scrollElement) ? document.documentElement : scrollElement).clientHeight;
|
|
146
150
|
}
|
|
147
151
|
|
|
148
|
-
function getScrollingElement(element) {
|
|
152
|
+
export function getScrollingElement(element) {
|
|
149
153
|
const {document} = toWindow(element);
|
|
150
154
|
return document.scrollingElement || document.documentElement;
|
|
151
155
|
}
|
package/tests/image.html
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
<h1>Image</h1>
|
|
16
16
|
|
|
17
|
-
<p><button class="uk-button uk-button-default" onclick="sessionStorage.clear()">Clear Session Storage</button></p>
|
|
18
|
-
|
|
19
17
|
<div class="uk-child-width-1-2@m" uk-grid>
|
|
20
18
|
<div>
|
|
21
19
|
<img data-src="https://images.unsplash.com/photo-1522201949034-507737bce479?fit=crop&w=900&h=600&q=80" width="900" height="600" alt="" uk-img>
|
|
@@ -25,7 +23,17 @@
|
|
|
25
23
|
</div>
|
|
26
24
|
</div>
|
|
27
25
|
|
|
28
|
-
<div
|
|
26
|
+
<div>
|
|
27
|
+
<picture>
|
|
28
|
+
<source type="image/webp" sizes="(min-width: 780px) 780px" data-srcset="http://localhost/site/image?src=WyJzaXRlXC9pbWFnZXNcL2hvbWVcL3lvb3RoZW1lLXByby5qcGciLFtbInR5cGUiLFsid2VicCIsIjg1Il1dLFsiZG9SZXNpemUiLFs3ODEsNDg4LDc4MSw0ODhdXSxbImRvQ3JvcCIsWzc4MCw0ODgsMCwwXV1dXQ%3D%3D&hash=9a3c6f9c 780w, /site/cache/images/yootheme-pro-5db7acab.webp 1560w">
|
|
29
|
+
<img data-src="/site/cache/images/yootheme-pro-0d67d545.jpeg" width="780" height="488" alt="Introduction Video on using the YOOtheme Pro Page Builder for WordPress and Joomla" uk-img>
|
|
30
|
+
</picture>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1490822180406-880c226c150b?fit=crop&w=1200&h=450&q=80" data-sources="srcset: images/test.avif; type: image/avif" uk-img>
|
|
33
|
+
<h1>Background Image</h1>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1490822180406-880c226c150b?fit=crop&w=1200&h=450&q=80" data-sources="[{"srcset": "images/test.avif", "type": "image/avif"},{"srcset": "images/test.webp", "type": "image/webp"}]" uk-img>
|
|
29
37
|
<h1>Background Image</h1>
|
|
30
38
|
</div>
|
|
31
39
|
|
|
@@ -255,28 +263,28 @@
|
|
|
255
263
|
|
|
256
264
|
<ul class="uk-slideshow-items">
|
|
257
265
|
<li>
|
|
258
|
-
<img data-src="images/photo.jpg" alt="" uk-cover
|
|
266
|
+
<img data-src="images/photo.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !.uk-slideshow-items > :last-child, !* +*">
|
|
259
267
|
<div class="uk-position-center uk-position-small uk-text-center">
|
|
260
268
|
<h2 uk-slideshow-parallax="x: 100,-100">Heading</h2>
|
|
261
269
|
<p uk-slideshow-parallax="x: 200,-200">Lorem ipsum dolor sit amet.</p>
|
|
262
270
|
</div>
|
|
263
271
|
</li>
|
|
264
272
|
<li>
|
|
265
|
-
<img data-src="images/dark.jpg" alt="" uk-cover
|
|
273
|
+
<img data-src="images/dark.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !* +*">
|
|
266
274
|
<div class="uk-position-center uk-position-small uk-text-center">
|
|
267
275
|
<h2 uk-slideshow-parallax="x: 100,-100">Heading</h2>
|
|
268
276
|
<p uk-slideshow-parallax="x: 200,-200">Lorem ipsum dolor sit amet.</p>
|
|
269
277
|
</div>
|
|
270
278
|
</li>
|
|
271
279
|
<li>
|
|
272
|
-
<img data-src="images/light.jpg" alt="" uk-cover
|
|
280
|
+
<img data-src="images/light.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !* +*">
|
|
273
281
|
<div class="uk-position-center uk-position-small uk-text-center">
|
|
274
282
|
<h2 uk-slideshow-parallax="y: -50,0,0; opacity: 1,1,0">Heading</h2>
|
|
275
283
|
<p uk-slideshow-parallax="y: 50,0,0; opacity: 1,1,0">Lorem ipsum dolor sit amet.</p>
|
|
276
284
|
</div>
|
|
277
285
|
</li>
|
|
278
286
|
<li>
|
|
279
|
-
<img data-src="images/photo2.jpg" alt="" uk-cover
|
|
287
|
+
<img data-src="images/photo2.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !.uk-slideshow-items > :first-child">
|
|
280
288
|
<div class="uk-position-center uk-position-small uk-text-center">
|
|
281
289
|
<h2 uk-slideshow-parallax="x: 200,0,0">Heading</h2>
|
|
282
290
|
<p uk-slideshow-parallax="x: 0,0,-200">Lorem ipsum dolor sit amet.</p>
|
|
@@ -296,43 +304,43 @@
|
|
|
296
304
|
|
|
297
305
|
<ul class="uk-slider-items uk-child-width-1-2@s uk-child-width-1-3@m">
|
|
298
306
|
<li>
|
|
299
|
-
<img data-src="images/slider1.jpg" alt=""
|
|
307
|
+
<img data-src="images/slider1.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
300
308
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">1</h1></div>
|
|
301
309
|
</li>
|
|
302
310
|
<li>
|
|
303
|
-
<img data-src="images/slider2.jpg" alt=""
|
|
311
|
+
<img data-src="images/slider2.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
304
312
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">2</h1></div>
|
|
305
313
|
</li>
|
|
306
314
|
<li>
|
|
307
|
-
<img data-src="images/slider3.jpg" alt=""
|
|
315
|
+
<img data-src="images/slider3.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
308
316
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">3</h1></div>
|
|
309
317
|
</li>
|
|
310
318
|
<li>
|
|
311
|
-
<img data-src="images/slider4.jpg" alt=""
|
|
319
|
+
<img data-src="images/slider4.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
312
320
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">4</h1></div>
|
|
313
321
|
</li>
|
|
314
322
|
<li>
|
|
315
|
-
<img data-src="images/slider5.jpg" alt=""
|
|
323
|
+
<img data-src="images/slider5.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
316
324
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">5</h1></div>
|
|
317
325
|
</li>
|
|
318
326
|
<li>
|
|
319
|
-
<img data-src="images/slider1.jpg" alt=""
|
|
327
|
+
<img data-src="images/slider1.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
320
328
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">6</h1></div>
|
|
321
329
|
</li>
|
|
322
330
|
<li>
|
|
323
|
-
<img data-src="images/slider2.jpg" alt=""
|
|
331
|
+
<img data-src="images/slider2.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
324
332
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">7</h1></div>
|
|
325
333
|
</li>
|
|
326
334
|
<li>
|
|
327
|
-
<img data-src="images/slider3.jpg" alt=""
|
|
335
|
+
<img data-src="images/slider3.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
328
336
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">8</h1></div>
|
|
329
337
|
</li>
|
|
330
338
|
<li>
|
|
331
|
-
<img data-src="images/slider4.jpg" alt=""
|
|
339
|
+
<img data-src="images/slider4.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
332
340
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">9</h1></div>
|
|
333
341
|
</li>
|
|
334
342
|
<li>
|
|
335
|
-
<img data-src="images/slider5.jpg" alt=""
|
|
343
|
+
<img data-src="images/slider5.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
|
|
336
344
|
<div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">10</h1></div>
|
|
337
345
|
</li>
|
|
338
346
|
</ul>
|
|
@@ -365,28 +373,10 @@
|
|
|
365
373
|
<td>The image's `src` attribute.</td>
|
|
366
374
|
</tr>
|
|
367
375
|
<tr>
|
|
368
|
-
<td><code>
|
|
376
|
+
<td><code>dataSources</code></td>
|
|
369
377
|
<td>String</td>
|
|
370
|
-
<td>
|
|
371
|
-
<td>The image's `
|
|
372
|
-
</tr>
|
|
373
|
-
<tr>
|
|
374
|
-
<td><code>sizes</code></td>
|
|
375
|
-
<td>String</td>
|
|
376
|
-
<td>false</td>
|
|
377
|
-
<td>The image's `sizes` attribute.</td>
|
|
378
|
-
</tr>
|
|
379
|
-
<tr>
|
|
380
|
-
<td><code>width</code></td>
|
|
381
|
-
<td>String</td>
|
|
382
|
-
<td>false</td>
|
|
383
|
-
<td>The image's `width` attribute. It will be used to determine the placeholder's width and the images position in the document.</td>
|
|
384
|
-
</tr>
|
|
385
|
-
<tr>
|
|
386
|
-
<td><code>height</code></td>
|
|
387
|
-
<td>String</td>
|
|
388
|
-
<td>false</td>
|
|
389
|
-
<td>The image's `height` attribute. It will be used to determine the placeholder's height and the images position in the document.</td>
|
|
378
|
+
<td>''</td>
|
|
379
|
+
<td>The image's sources. This option is used for background images only. The sources attributes be passed in `key: value;` format for a single source. For multiple sources in JSON format.</td>
|
|
390
380
|
</tr>
|
|
391
381
|
<tr>
|
|
392
382
|
<td><code>offsetTop</code></td>
|
|
Binary file
|
|
Binary file
|