uikit 3.11.2-dev.244aa5c8c → 3.11.2-dev.28b7953b9
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 +11 -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 +1 -1
- 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 +36 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- 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 +139 -149
- 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 +174 -149
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/state.js +20 -24
- package/src/js/components/slideshow.js +32 -1
- package/src/js/core/img.js +114 -98
- package/src/js/util/options.js +4 -4
- package/tests/image.html +31 -41
- package/tests/images/test.avif +0 -0
- package/tests/images/test.webp +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "uikit",
|
|
3
3
|
"title": "UIkit",
|
|
4
4
|
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
|
|
5
|
-
"version": "3.11.2-dev.
|
|
5
|
+
"version": "3.11.2-dev.28b7953b9",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/component.js
CHANGED
|
@@ -28,7 +28,7 @@ export default function (UIkit) {
|
|
|
28
28
|
|
|
29
29
|
return component.options.functional
|
|
30
30
|
? new component({data: isPlainObject(element) ? element : [...arguments]})
|
|
31
|
-
:
|
|
31
|
+
: element ? $$(element).map(init)[0] : init();
|
|
32
32
|
|
|
33
33
|
function init(element) {
|
|
34
34
|
|
package/src/js/api/state.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {assign, camelize, data as getData, hasOwn, hyphenate, isArray,
|
|
1
|
+
import {assign, camelize, data as getData, hasOwn, hyphenate, isArray, isFunction, isNumeric, isPlainObject, isString, isUndefined, mergeOptions, on, parseOptions, startsWith, toBoolean, toNumber} from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
export default function (UIkit) {
|
|
4
4
|
|
|
@@ -211,11 +211,11 @@ export default function (UIkit) {
|
|
|
211
211
|
on(
|
|
212
212
|
el,
|
|
213
213
|
name,
|
|
214
|
-
|
|
215
|
-
?
|
|
216
|
-
: isString(delegate)
|
|
214
|
+
delegate
|
|
215
|
+
? isString(delegate)
|
|
217
216
|
? delegate
|
|
218
|
-
: delegate.call(component)
|
|
217
|
+
: delegate.call(component)
|
|
218
|
+
: null,
|
|
219
219
|
isString(handler) ? component[handler] : handler.bind(component),
|
|
220
220
|
{passive, capture, self}
|
|
221
221
|
)
|
|
@@ -250,27 +250,23 @@ export default function (UIkit) {
|
|
|
250
250
|
: [value];
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
function normalizeData({data}, {args, props = {}}) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
assign(data, value);
|
|
259
|
-
} else {
|
|
260
|
-
data[args[index]] = value;
|
|
261
|
-
}
|
|
262
|
-
return data;
|
|
263
|
-
}, {})
|
|
264
|
-
: undefined
|
|
265
|
-
: data;
|
|
266
|
-
|
|
267
|
-
if (data) {
|
|
268
|
-
for (const key in data) {
|
|
269
|
-
if (isUndefined(data[key])) {
|
|
270
|
-
delete data[key];
|
|
253
|
+
function normalizeData({data = {}}, {args = [], props = {}}) {
|
|
254
|
+
if (isArray(data)) {
|
|
255
|
+
data = data.slice(0, args.length).reduce((data, value, index) => {
|
|
256
|
+
if (isPlainObject(value)) {
|
|
257
|
+
assign(data, value);
|
|
271
258
|
} else {
|
|
272
|
-
data[
|
|
259
|
+
data[args[index]] = value;
|
|
273
260
|
}
|
|
261
|
+
return data;
|
|
262
|
+
}, {});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
for (const key in data) {
|
|
266
|
+
if (isUndefined(data[key])) {
|
|
267
|
+
delete data[key];
|
|
268
|
+
} else if (props[key]) {
|
|
269
|
+
data[key] = coerce(props[key], data[key]);
|
|
274
270
|
}
|
|
275
271
|
}
|
|
276
272
|
|
|
@@ -2,7 +2,7 @@ import Class from '../mixin/class';
|
|
|
2
2
|
import Slideshow from '../mixin/slideshow';
|
|
3
3
|
import Animations from './internal/slideshow-animations';
|
|
4
4
|
import SliderReactive from '../mixin/slider-reactive';
|
|
5
|
-
import {boxModelAdjust, css} from 'uikit-util';
|
|
5
|
+
import {$$, boxModelAdjust, css, isVisible} from 'uikit-util';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
|
|
@@ -24,6 +24,29 @@ export default {
|
|
|
24
24
|
Animations
|
|
25
25
|
},
|
|
26
26
|
|
|
27
|
+
connected() {
|
|
28
|
+
if (window.IntersectionObserver) {
|
|
29
|
+
this.observer = new IntersectionObserver(entries => {
|
|
30
|
+
if (entries.some(entry => entry.isIntersecting)) {
|
|
31
|
+
this.preloadSlides();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
this.observer.observe(this.$el);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
disconnected() {
|
|
39
|
+
this.observer && this.observer.disconnect();
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
methods: {
|
|
43
|
+
|
|
44
|
+
preloadSlides() {
|
|
45
|
+
[1, -1].forEach(i => removeLazyLoad(this.slides[this.getIndex(this.index + i)]));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
27
50
|
update: {
|
|
28
51
|
|
|
29
52
|
read() {
|
|
@@ -44,6 +67,10 @@ export default {
|
|
|
44
67
|
height = Math.min(this.maxHeight, height);
|
|
45
68
|
}
|
|
46
69
|
|
|
70
|
+
if (isVisible(this.$el)) {
|
|
71
|
+
this.preloadSlides();
|
|
72
|
+
}
|
|
73
|
+
|
|
47
74
|
return {height: height - boxModelAdjust(this.list, 'height', 'content-box')};
|
|
48
75
|
},
|
|
49
76
|
|
|
@@ -56,3 +83,7 @@ export default {
|
|
|
56
83
|
}
|
|
57
84
|
|
|
58
85
|
};
|
|
86
|
+
|
|
87
|
+
function removeLazyLoad(el) {
|
|
88
|
+
el && $$('img[loading="lazy"]', el).forEach(el => el.loading = 'eager');
|
|
89
|
+
}
|
package/src/js/core/img.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {createEvent, css,
|
|
1
|
+
import {append, attr, children, createEvent, css, data, escape, fragment, hasAttr, includes, isArray, isEmpty, parent, parseOptions, queryAll, startsWith, toFloat, toPx, trigger} from 'uikit-util';
|
|
2
|
+
|
|
3
|
+
const nativeLazyLoad = 'loading' in HTMLImageElement.prototype;
|
|
4
|
+
const nativeIsIntersecting = 'isIntersecting' in IntersectionObserverEntry.prototype; // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
2
5
|
|
|
3
6
|
export default {
|
|
4
7
|
|
|
@@ -6,10 +9,7 @@ export default {
|
|
|
6
9
|
|
|
7
10
|
props: {
|
|
8
11
|
dataSrc: String,
|
|
9
|
-
|
|
10
|
-
sizes: String,
|
|
11
|
-
width: Number,
|
|
12
|
-
height: Number,
|
|
12
|
+
dataSources: String,
|
|
13
13
|
offsetTop: String,
|
|
14
14
|
offsetLeft: String,
|
|
15
15
|
target: String
|
|
@@ -17,10 +17,7 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
data: {
|
|
19
19
|
dataSrc: '',
|
|
20
|
-
|
|
21
|
-
sizes: false,
|
|
22
|
-
width: false,
|
|
23
|
-
height: false,
|
|
20
|
+
dataSources: [],
|
|
24
21
|
offsetTop: '50vh',
|
|
25
22
|
offsetLeft: '50vw',
|
|
26
23
|
target: false
|
|
@@ -28,26 +25,6 @@ export default {
|
|
|
28
25
|
|
|
29
26
|
computed: {
|
|
30
27
|
|
|
31
|
-
cacheKey({dataSrc}) {
|
|
32
|
-
return `${this.$name}.${dataSrc}`;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
width({width, dataWidth}) {
|
|
36
|
-
return width || dataWidth;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
height({height, dataHeight}) {
|
|
40
|
-
return height || dataHeight;
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
sizes({sizes, dataSizes}) {
|
|
44
|
-
return sizes || dataSizes;
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
isImg(_, $el) {
|
|
48
|
-
return isImg($el);
|
|
49
|
-
},
|
|
50
|
-
|
|
51
28
|
target: {
|
|
52
29
|
|
|
53
30
|
get({target}) {
|
|
@@ -58,36 +35,31 @@ export default {
|
|
|
58
35
|
this.observe();
|
|
59
36
|
}
|
|
60
37
|
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
offsetTop({offsetTop}) {
|
|
64
|
-
return toPx(offsetTop, 'height');
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
offsetLeft({offsetLeft}) {
|
|
68
|
-
return toPx(offsetLeft, 'width');
|
|
69
38
|
}
|
|
70
39
|
|
|
71
40
|
},
|
|
72
41
|
|
|
73
42
|
connected() {
|
|
74
43
|
|
|
75
|
-
if (!window.IntersectionObserver) {
|
|
76
|
-
setSrcAttrs(this.$el, this.dataSrc
|
|
44
|
+
if (!window.IntersectionObserver || !nativeIsIntersecting) {
|
|
45
|
+
setSrcAttrs(this.$el, this.dataSrc);
|
|
77
46
|
return;
|
|
78
47
|
}
|
|
79
48
|
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
49
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
50
|
+
this.$el.loading = 'lazy';
|
|
51
|
+
setSrcAttrs(this.$el);
|
|
52
|
+
|
|
53
|
+
if (this.target.length === 1) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
84
56
|
}
|
|
85
57
|
|
|
86
|
-
|
|
87
|
-
rootMargin: `${this.offsetTop}px ${this.offsetLeft}px`
|
|
88
|
-
});
|
|
58
|
+
ensureSrcAttribute(this.$el);
|
|
89
59
|
|
|
90
|
-
|
|
60
|
+
const rootMargin = `${toPx(this.offsetTop, 'height')}px ${toPx(this.offsetLeft, 'width')}px`;
|
|
61
|
+
this.observer = new IntersectionObserver(this.load, {rootMargin});
|
|
62
|
+
this.observe();
|
|
91
63
|
|
|
92
64
|
},
|
|
93
65
|
|
|
@@ -97,32 +69,17 @@ export default {
|
|
|
97
69
|
|
|
98
70
|
update: {
|
|
99
71
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (!this.observer) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (!image && document.readyState === 'complete') {
|
|
107
|
-
this.load(this.observer.takeRecords());
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (this.isImg) {
|
|
72
|
+
write(store) {
|
|
73
|
+
if (!this.observer || isImg(this.$el)) {
|
|
111
74
|
return false;
|
|
112
75
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
write(data) {
|
|
119
|
-
|
|
120
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
76
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
77
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
121
78
|
|
|
122
79
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
123
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
124
|
-
|
|
125
|
-
css(this.$el, 'backgroundSize', `${
|
|
80
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
81
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
82
|
+
css(this.$el, 'backgroundSize', `${store.bgSize}px`);
|
|
126
83
|
}
|
|
127
84
|
|
|
128
85
|
}
|
|
@@ -137,18 +94,25 @@ export default {
|
|
|
137
94
|
|
|
138
95
|
load(entries) {
|
|
139
96
|
|
|
140
|
-
|
|
141
|
-
if (!entries.some(entry => isUndefined(entry.isIntersecting) || entry.isIntersecting)) {
|
|
97
|
+
if (!entries.some(entry => entry.isIntersecting)) {
|
|
142
98
|
return;
|
|
143
99
|
}
|
|
144
100
|
|
|
145
|
-
this._data.image
|
|
101
|
+
if (this._data.image) {
|
|
102
|
+
return this._data.image;
|
|
103
|
+
}
|
|
146
104
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
105
|
+
const image = isImg(this.$el)
|
|
106
|
+
? this.$el
|
|
107
|
+
: getImageFromElement(
|
|
108
|
+
this.$el,
|
|
109
|
+
this.dataSrc,
|
|
110
|
+
this.dataSources
|
|
111
|
+
);
|
|
150
112
|
|
|
151
|
-
|
|
113
|
+
this._data.image = image;
|
|
114
|
+
image.loading = 'eager';
|
|
115
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
152
116
|
|
|
153
117
|
this.observer.disconnect();
|
|
154
118
|
},
|
|
@@ -163,13 +127,14 @@ export default {
|
|
|
163
127
|
|
|
164
128
|
};
|
|
165
129
|
|
|
166
|
-
function setSrcAttrs(el, src
|
|
130
|
+
function setSrcAttrs(el, src) {
|
|
167
131
|
|
|
168
132
|
if (isImg(el)) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
133
|
+
|
|
134
|
+
const parentNode = parent(el);
|
|
135
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
136
|
+
elements.forEach(el => setSourceProps(el, el));
|
|
137
|
+
|
|
173
138
|
} else if (src) {
|
|
174
139
|
|
|
175
140
|
const change = !includes(el.style.backgroundImage, src);
|
|
@@ -182,13 +147,66 @@ function setSrcAttrs(el, src, srcset, sizes) {
|
|
|
182
147
|
|
|
183
148
|
}
|
|
184
149
|
|
|
185
|
-
|
|
150
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
151
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
152
|
+
srcProps.forEach(prop => {
|
|
153
|
+
const value = data(sourceEl, prop);
|
|
154
|
+
if (value) {
|
|
155
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function getImageFromElement(el, src, sources) {
|
|
161
|
+
|
|
162
|
+
if (!src) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const img = new Image();
|
|
167
|
+
|
|
168
|
+
wrapInPicture(img, sources);
|
|
169
|
+
setSourceProps(el, img);
|
|
170
|
+
img.onload = () => setSrcAttrs(el, img.currentSrc);
|
|
171
|
+
attr(img, 'src', src);
|
|
172
|
+
return img;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function wrapInPicture(img, sources) {
|
|
186
176
|
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
sources = parseSources(sources);
|
|
178
|
+
|
|
179
|
+
if (sources.length) {
|
|
180
|
+
const picture = fragment('<picture>');
|
|
181
|
+
sources.forEach(attrs => {
|
|
182
|
+
const source = fragment('<source>');
|
|
183
|
+
attr(source, attrs);
|
|
184
|
+
append(picture, source);
|
|
185
|
+
});
|
|
186
|
+
append(picture, img);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function parseSources(sources) {
|
|
191
|
+
if (!sources) {
|
|
192
|
+
return [];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (startsWith(sources, '[')) {
|
|
196
|
+
try {
|
|
197
|
+
sources = JSON.parse(sources);
|
|
198
|
+
} catch (e) {
|
|
199
|
+
sources = [];
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
sources = parseOptions(sources);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (!isArray(sources)) {
|
|
206
|
+
sources = [sources];
|
|
189
207
|
}
|
|
190
208
|
|
|
191
|
-
return
|
|
209
|
+
return sources.filter(source => !isEmpty(source));
|
|
192
210
|
}
|
|
193
211
|
|
|
194
212
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -228,22 +246,20 @@ function getSourceSize(srcset, sizes) {
|
|
|
228
246
|
return descriptors.filter(size => size >= srcSize)[0] || descriptors.pop() || '';
|
|
229
247
|
}
|
|
230
248
|
|
|
231
|
-
function
|
|
232
|
-
|
|
249
|
+
function ensureSrcAttribute(el) {
|
|
250
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
251
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
252
|
+
}
|
|
233
253
|
}
|
|
234
254
|
|
|
235
|
-
function
|
|
236
|
-
return el
|
|
255
|
+
function isPicture(el) {
|
|
256
|
+
return isA(el, 'PICTURE');
|
|
237
257
|
}
|
|
238
258
|
|
|
239
|
-
|
|
240
|
-
|
|
259
|
+
function isImg(el) {
|
|
260
|
+
return isA(el, 'IMG');
|
|
261
|
+
}
|
|
241
262
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
storage = window.sessionStorage || {};
|
|
245
|
-
storage[key] = 1;
|
|
246
|
-
delete storage[key];
|
|
247
|
-
} catch (e) {
|
|
248
|
-
storage = {};
|
|
263
|
+
function isA(el, tagName) {
|
|
264
|
+
return el && el.tagName === tagName;
|
|
249
265
|
}
|
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/tests/image.html
CHANGED
|
@@ -14,18 +14,26 @@
|
|
|
14
14
|
|
|
15
15
|
<h1>Image</h1>
|
|
16
16
|
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
<div class="uk-child-width-1-2@m" uk-grid>
|
|
17
|
+
<div class="uk-child-width-1-2@m uk-background-secondary" uk-grid>
|
|
20
18
|
<div>
|
|
21
|
-
<img
|
|
19
|
+
<img src="https://images.unsplash.com/photo-1522201949034-507737bce479?fit=crop&w=900&h=600&q=80" width="900" height="600" alt="">
|
|
22
20
|
</div>
|
|
23
21
|
<div>
|
|
24
|
-
<img
|
|
22
|
+
<img src="https://images.unsplash.com/photo-1503481766315-7a586b20f66d?fit=crop&w=900&h=600&q=80" width="900" height="600" alt="">
|
|
25
23
|
</div>
|
|
26
24
|
</div>
|
|
27
25
|
|
|
28
|
-
<div class="uk-
|
|
26
|
+
<div class="uk-background-primary">
|
|
27
|
+
<picture>
|
|
28
|
+
<source type="image/webp" sizes="(min-width: 780px) 780px" srcset="http://localhost/site/image?src=WyJzaXRlXC9pbWFnZXNcL2hvbWVcL3lvb3RoZW1lLXByby5qcGciLFtbInR5cGUiLFsid2VicCIsIjg1Il1dLFsiZG9SZXNpemUiLFs3ODEsNDg4LDc4MSw0ODhdXSxbImRvQ3JvcCIsWzc4MCw0ODgsMCwwXV1dXQ%3D%3D&hash=9a3c6f9c 780w, /site/cache/images/yootheme-pro-5db7acab.webp 1560w">
|
|
29
|
+
<img 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">
|
|
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>
|
|
369
|
-
<td>String</td>
|
|
370
|
-
<td>false</td>
|
|
371
|
-
<td>The image's `srcset` attribute.</td>
|
|
372
|
-
</tr>
|
|
373
|
-
<tr>
|
|
374
|
-
<td><code>sizes</code></td>
|
|
376
|
+
<td><code>dataSources</code></td>
|
|
375
377
|
<td>String</td>
|
|
376
|
-
<td>
|
|
377
|
-
<td>The image's `
|
|
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
|