intia-theme 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_sass/_main.scss +13 -11
- data/favicon.png +0 -0
- data/node_modules/bulma/CHANGELOG.md +1558 -0
- data/node_modules/bulma/LICENSE +21 -0
- data/node_modules/bulma/README.md +134 -0
- data/node_modules/bulma/bulma.sass +10 -0
- data/node_modules/bulma/css/bulma-rtl.css +11811 -0
- data/node_modules/bulma/css/bulma-rtl.css.map +1 -0
- data/node_modules/bulma/css/bulma-rtl.min.css +1 -0
- data/node_modules/bulma/css/bulma.css +11811 -0
- data/node_modules/bulma/css/bulma.css.map +1 -0
- data/node_modules/bulma/css/bulma.min.css +1 -0
- data/node_modules/bulma/package.json +82 -0
- data/node_modules/bulma/sass/base/_all.sass +6 -0
- data/node_modules/bulma/sass/base/animations.sass +5 -0
- data/node_modules/bulma/sass/base/generic.sass +145 -0
- data/node_modules/bulma/sass/base/helpers.sass +1 -0
- data/node_modules/bulma/sass/base/minireset.sass +79 -0
- data/node_modules/bulma/sass/components/_all.sass +15 -0
- data/node_modules/bulma/sass/components/breadcrumb.sass +77 -0
- data/node_modules/bulma/sass/components/card.sass +103 -0
- data/node_modules/bulma/sass/components/dropdown.sass +83 -0
- data/node_modules/bulma/sass/components/level.sass +79 -0
- data/node_modules/bulma/sass/components/media.sass +59 -0
- data/node_modules/bulma/sass/components/menu.sass +59 -0
- data/node_modules/bulma/sass/components/message.sass +101 -0
- data/node_modules/bulma/sass/components/modal.sass +117 -0
- data/node_modules/bulma/sass/components/navbar.sass +446 -0
- data/node_modules/bulma/sass/components/pagination.sass +166 -0
- data/node_modules/bulma/sass/components/panel.sass +121 -0
- data/node_modules/bulma/sass/components/tabs.sass +176 -0
- data/node_modules/bulma/sass/elements/_all.sass +16 -0
- data/node_modules/bulma/sass/elements/box.sass +26 -0
- data/node_modules/bulma/sass/elements/button.sass +345 -0
- data/node_modules/bulma/sass/elements/container.sass +29 -0
- data/node_modules/bulma/sass/elements/content.sass +159 -0
- data/node_modules/bulma/sass/elements/form.sass +1 -0
- data/node_modules/bulma/sass/elements/icon.sass +46 -0
- data/node_modules/bulma/sass/elements/image.sass +73 -0
- data/node_modules/bulma/sass/elements/notification.sass +52 -0
- data/node_modules/bulma/sass/elements/other.sass +31 -0
- data/node_modules/bulma/sass/elements/progress.sass +73 -0
- data/node_modules/bulma/sass/elements/table.sass +133 -0
- data/node_modules/bulma/sass/elements/tag.sass +140 -0
- data/node_modules/bulma/sass/elements/title.sass +70 -0
- data/node_modules/bulma/sass/form/_all.sass +9 -0
- data/node_modules/bulma/sass/form/checkbox-radio.sass +22 -0
- data/node_modules/bulma/sass/form/file.sass +184 -0
- data/node_modules/bulma/sass/form/input-textarea.sass +66 -0
- data/node_modules/bulma/sass/form/select.sass +87 -0
- data/node_modules/bulma/sass/form/shared.sass +60 -0
- data/node_modules/bulma/sass/form/tools.sass +215 -0
- data/node_modules/bulma/sass/grid/_all.sass +5 -0
- data/node_modules/bulma/sass/grid/columns.sass +513 -0
- data/node_modules/bulma/sass/grid/tiles.sass +36 -0
- data/node_modules/bulma/sass/helpers/_all.sass +12 -0
- data/node_modules/bulma/sass/helpers/color.sass +39 -0
- data/node_modules/bulma/sass/helpers/flexbox.sass +35 -0
- data/node_modules/bulma/sass/helpers/float.sass +10 -0
- data/node_modules/bulma/sass/helpers/other.sass +14 -0
- data/node_modules/bulma/sass/helpers/overflow.sass +2 -0
- data/node_modules/bulma/sass/helpers/position.sass +7 -0
- data/node_modules/bulma/sass/helpers/spacing.sass +31 -0
- data/node_modules/bulma/sass/helpers/typography.sass +103 -0
- data/node_modules/bulma/sass/helpers/visibility.sass +122 -0
- data/node_modules/bulma/sass/layout/_all.sass +6 -0
- data/node_modules/bulma/sass/layout/footer.sass +11 -0
- data/node_modules/bulma/sass/layout/hero.sass +153 -0
- data/node_modules/bulma/sass/layout/section.sass +17 -0
- data/node_modules/bulma/sass/utilities/_all.sass +9 -0
- data/node_modules/bulma/sass/utilities/animations.sass +1 -0
- data/node_modules/bulma/sass/utilities/controls.sass +49 -0
- data/node_modules/bulma/sass/utilities/derived-variables.sass +114 -0
- data/node_modules/bulma/sass/utilities/extends.sass +25 -0
- data/node_modules/bulma/sass/utilities/functions.sass +136 -0
- data/node_modules/bulma/sass/utilities/initial-variables.sass +78 -0
- data/node_modules/bulma/sass/utilities/mixins.sass +280 -0
- data/node_modules/bulma-block-list/LICENSE.txt +21 -0
- data/node_modules/bulma-block-list/README.md +32 -0
- data/node_modules/bulma-block-list/node_modules/bulma/CHANGELOG.md +1390 -0
- data/node_modules/bulma-block-list/node_modules/bulma/LICENSE +21 -0
- data/node_modules/bulma-block-list/node_modules/bulma/README.md +130 -0
- data/node_modules/bulma-block-list/node_modules/bulma/bulma.sass +9 -0
- data/node_modules/bulma-block-list/node_modules/bulma/css/bulma.css +10855 -0
- data/node_modules/bulma-block-list/node_modules/bulma/css/bulma.css.map +1 -0
- data/node_modules/bulma-block-list/node_modules/bulma/css/bulma.min.css +1 -0
- data/node_modules/bulma-block-list/node_modules/bulma/package.json +80 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/base/_all.sass +5 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/base/generic.sass +142 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/base/helpers.sass +281 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/base/minireset.sass +79 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/_all.sass +15 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/breadcrumb.sass +75 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/card.sass +79 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/dropdown.sass +81 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/level.sass +77 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/list.sass +39 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/media.sass +50 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/menu.sass +57 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/message.sass +99 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/modal.sass +113 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/navbar.sass +441 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/pagination.sass +150 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/panel.sass +119 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/components/tabs.sass +151 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/_all.sass +15 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/box.sass +24 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/button.sass +323 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/container.sass +24 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/content.sass +155 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/form.sass +1 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/icon.sass +21 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/image.sass +71 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/notification.sass +43 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/other.sass +39 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/progress.sass +67 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/table.sass +127 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/tag.sass +128 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/elements/title.sass +70 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/_all.sass +8 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/checkbox-radio.sass +21 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/file.sass +180 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/input-textarea.sass +64 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/select.sass +85 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/shared.sass +55 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/form/tools.sass +205 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/grid/_all.sass +4 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/grid/columns.sass +504 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/grid/tiles.sass +34 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/layout/_all.sass +5 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/layout/footer.sass +9 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/layout/hero.sass +145 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/layout/section.sass +13 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/_all.sass +8 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/animations.sass +5 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/controls.sass +50 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/derived-variables.sass +106 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/functions.sass +110 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/initial-variables.sass +77 -0
- data/node_modules/bulma-block-list/node_modules/bulma/sass/utilities/mixins.sass +261 -0
- data/node_modules/bulma-block-list/package.json +59 -0
- data/node_modules/bulma-block-list/src/block-list.scss +109 -0
- data/node_modules/bulma-block-list/src/demo.scss +3 -0
- data/node_modules/bulma-carousel/CHANGELOG.md +307 -0
- data/node_modules/bulma-carousel/LICENSE +21 -0
- data/node_modules/bulma-carousel/README.md +13 -0
- data/node_modules/bulma-carousel/dist/css/bulma-carousel.min.css +1 -0
- data/node_modules/bulma-carousel/dist/js/bulma-carousel.js +2371 -0
- data/node_modules/bulma-carousel/package.json +108 -0
- data/node_modules/bulma-carousel/src/demo/_data/events.yml +15 -0
- data/node_modules/bulma-carousel/src/demo/_data/getters.yml +26 -0
- data/node_modules/bulma-carousel/src/demo/_data/menu.yml +26 -0
- data/node_modules/bulma-carousel/src/demo/_data/methods.yml +57 -0
- data/node_modules/bulma-carousel/src/demo/_data/options.yml +79 -0
- data/node_modules/bulma-carousel/src/demo/_data/setters.yml +0 -0
- data/node_modules/bulma-carousel/src/demo/_data/tree.yml +30 -0
- data/node_modules/bulma-carousel/src/demo/_includes/anchor.html +3 -0
- data/node_modules/bulma-carousel/src/demo/_includes/breadcrumb.html +5 -0
- data/node_modules/bulma-carousel/src/demo/_includes/events.html +33 -0
- data/node_modules/bulma-carousel/src/demo/_includes/getters.html +28 -0
- data/node_modules/bulma-carousel/src/demo/_includes/head.html +22 -0
- data/node_modules/bulma-carousel/src/demo/_includes/menu.html +22 -0
- data/node_modules/bulma-carousel/src/demo/_includes/methods.html +49 -0
- data/node_modules/bulma-carousel/src/demo/_includes/options.html +33 -0
- data/node_modules/bulma-carousel/src/demo/_includes/setters.html +28 -0
- data/node_modules/bulma-carousel/src/demo/_includes/tree.html +25 -0
- data/node_modules/bulma-carousel/src/demo/_includes/variables.html +28 -0
- data/node_modules/bulma-carousel/src/demo/_layouts/default.html +47 -0
- data/node_modules/bulma-carousel/src/demo/assets/css/bulma-carousel.min.css +1 -0
- data/node_modules/bulma-carousel/src/demo/assets/css/documentation.min.css +1 -0
- data/node_modules/bulma-carousel/src/demo/assets/css/highlight.css +78 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/1.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/2.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/3.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/4.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/5.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/6.jpg +0 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/left.svg +3 -0
- data/node_modules/bulma-carousel/src/demo/assets/images/right.svg +3 -0
- data/node_modules/bulma-carousel/src/demo/assets/js/bulma-carousel.min.js +1 -0
- data/node_modules/bulma-carousel/src/demo/assets/js/doc.js +111 -0
- data/node_modules/bulma-carousel/src/demo/assets/js/main.js +23 -0
- data/node_modules/bulma-carousel/src/demo/changelog.html +17 -0
- data/node_modules/bulma-carousel/src/demo/customization.html +78 -0
- data/node_modules/bulma-carousel/src/demo/demonstration/index.html +402 -0
- data/node_modules/bulma-carousel/src/demo/index.html +396 -0
- data/node_modules/bulma-carousel/src/js/components/Media.js +129 -0
- data/node_modules/bulma-carousel/src/js/components/autoplay.js +111 -0
- data/node_modules/bulma-carousel/src/js/components/breakpoint.js +91 -0
- data/node_modules/bulma-carousel/src/js/components/infinite.js +60 -0
- data/node_modules/bulma-carousel/src/js/components/loop.js +35 -0
- data/node_modules/bulma-carousel/src/js/components/navigation.js +107 -0
- data/node_modules/bulma-carousel/src/js/components/pagination.js +103 -0
- data/node_modules/bulma-carousel/src/js/components/swipe.js +106 -0
- data/node_modules/bulma-carousel/src/js/components/transitioner.js +74 -0
- data/node_modules/bulma-carousel/src/js/components/transitions/fade.js +90 -0
- data/node_modules/bulma-carousel/src/js/components/transitions/translate.js +98 -0
- data/node_modules/bulma-carousel/src/js/defaultOptions.js +50 -0
- data/node_modules/bulma-carousel/src/js/index.js +428 -0
- data/node_modules/bulma-carousel/src/js/templates/index.js +5 -0
- data/node_modules/bulma-carousel/src/js/templates/item.js +3 -0
- data/node_modules/bulma-carousel/src/js/templates/navigation.js +4 -0
- data/node_modules/bulma-carousel/src/js/templates/pagination-page.js +3 -0
- data/node_modules/bulma-carousel/src/js/templates/pagination.js +3 -0
- data/node_modules/bulma-carousel/src/js/utils/coordinate.js +98 -0
- data/node_modules/bulma-carousel/src/js/utils/css.js +84 -0
- data/node_modules/bulma-carousel/src/js/utils/detect-prefixes.js +50 -0
- data/node_modules/bulma-carousel/src/js/utils/detect-supportsPassive.js +16 -0
- data/node_modules/bulma-carousel/src/js/utils/device.js +17 -0
- data/node_modules/bulma-carousel/src/js/utils/dom.js +10 -0
- data/node_modules/bulma-carousel/src/js/utils/eventEmitter.js +19 -0
- data/node_modules/bulma-carousel/src/js/utils/events.js +65 -0
- data/node_modules/bulma-carousel/src/js/utils/index.js +16 -0
- data/node_modules/bulma-carousel/src/js/utils/type.js +21 -0
- data/node_modules/bulma-carousel/src/sass/index.sass +145 -0
- data/package-lock.json +32 -0
- data/package.json +10 -0
- metadata +217 -2
- data/_config.yml +0 -72
@@ -0,0 +1,84 @@
|
|
1
|
+
import {
|
2
|
+
isObject,
|
3
|
+
isString
|
4
|
+
} from './type';
|
5
|
+
|
6
|
+
export const addClasses = (element, classes) => {
|
7
|
+
classes = Array.isArray(classes) ? classes : classes.split(' ');
|
8
|
+
classes.forEach(cls => {
|
9
|
+
element.classList.add(cls);
|
10
|
+
})
|
11
|
+
};
|
12
|
+
|
13
|
+
export const removeClasses = (element, classes) => {
|
14
|
+
classes = Array.isArray(classes) ? classes : classes.split(' ');
|
15
|
+
classes.forEach(cls => {
|
16
|
+
element.classList.remove(cls);
|
17
|
+
})
|
18
|
+
};
|
19
|
+
|
20
|
+
export const show = elements => {
|
21
|
+
elements = Array.isArray(elements) ? elements : [elements];
|
22
|
+
elements.forEach(element => {
|
23
|
+
element.style.display = '';
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
export const hide = elements => {
|
28
|
+
elements = Array.isArray(elements) ? elements : [elements];
|
29
|
+
elements.forEach(element => {
|
30
|
+
element.style.display = 'none';
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
export const offset = element => {
|
35
|
+
const rect = element.getBoundingClientRect();
|
36
|
+
return {
|
37
|
+
top: rect.top + document.body.scrollTop,
|
38
|
+
left: rect.left + document.body.scrollLeft
|
39
|
+
};
|
40
|
+
};
|
41
|
+
|
42
|
+
// returns an element's width
|
43
|
+
export const width = (element) => element.getBoundingClientRect().width || element.offsetWidth;
|
44
|
+
// returns an element's height
|
45
|
+
export const height = (element) => element.getBoundingClientRect().height || element.offsetHeight;
|
46
|
+
|
47
|
+
export const outerHeight = (element, withMargin = false) => {
|
48
|
+
let height = element.offsetHeight;
|
49
|
+
if (withMargin) {
|
50
|
+
const style = window.getComputedStyle(element);
|
51
|
+
height += parseInt(style.marginTop) + parseInt(style.marginBottom);
|
52
|
+
}
|
53
|
+
return height;
|
54
|
+
};
|
55
|
+
|
56
|
+
export const outerWidth = (element, withMargin = false) => {
|
57
|
+
let width = element.offsetWidth;
|
58
|
+
if (withMargin) {
|
59
|
+
const style = window.getComputedStyle(element);
|
60
|
+
width += parseInt(style.marginLeft) + parseInt(style.marginRight);
|
61
|
+
}
|
62
|
+
return width;
|
63
|
+
};
|
64
|
+
|
65
|
+
export const position = element => {
|
66
|
+
return {
|
67
|
+
left: element.offsetLeft,
|
68
|
+
top: element.offsetTop
|
69
|
+
};
|
70
|
+
};
|
71
|
+
|
72
|
+
export const css = (element, obj) => {
|
73
|
+
if (!obj) {
|
74
|
+
return window.getComputedStyle(element);
|
75
|
+
}
|
76
|
+
if (isObject(obj)) {
|
77
|
+
let style = '';
|
78
|
+
Object.keys(obj).forEach(key => {
|
79
|
+
style += key + ': ' + obj[key] + ';';
|
80
|
+
});
|
81
|
+
|
82
|
+
element.style.cssText += style;
|
83
|
+
}
|
84
|
+
};
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/**
|
2
|
+
* Detecting prefixes for saving time and bytes
|
3
|
+
*/
|
4
|
+
export default function detectPrefixes() {
|
5
|
+
let transform;
|
6
|
+
let transition;
|
7
|
+
let transitionEnd;
|
8
|
+
let hasTranslate3d;
|
9
|
+
|
10
|
+
(function () {
|
11
|
+
let el = document.createElement('_');
|
12
|
+
let style = el.style;
|
13
|
+
|
14
|
+
let prop;
|
15
|
+
|
16
|
+
if (style[prop = 'webkitTransition'] === '') {
|
17
|
+
transitionEnd = 'webkitTransitionEnd';
|
18
|
+
transition = prop;
|
19
|
+
}
|
20
|
+
|
21
|
+
if (style[prop = 'transition'] === '') {
|
22
|
+
transitionEnd = 'transitionend';
|
23
|
+
transition = prop;
|
24
|
+
}
|
25
|
+
|
26
|
+
if (style[prop = 'webkitTransform'] === '') {
|
27
|
+
transform = prop;
|
28
|
+
}
|
29
|
+
|
30
|
+
if (style[prop = 'msTransform'] === '') {
|
31
|
+
transform = prop;
|
32
|
+
}
|
33
|
+
|
34
|
+
if (style[prop = 'transform'] === '') {
|
35
|
+
transform = prop;
|
36
|
+
}
|
37
|
+
|
38
|
+
document.body.insertBefore(el, null);
|
39
|
+
style[transform] = 'translate3d(0, 0, 0)';
|
40
|
+
hasTranslate3d = !!global.getComputedStyle(el).getPropertyValue(transform);
|
41
|
+
document.body.removeChild(el);
|
42
|
+
}());
|
43
|
+
|
44
|
+
return {
|
45
|
+
transform,
|
46
|
+
transition,
|
47
|
+
transitionEnd,
|
48
|
+
hasTranslate3d
|
49
|
+
};
|
50
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export default function detectSupportsPassive() {
|
2
|
+
let supportsPassive = false;
|
3
|
+
|
4
|
+
try {
|
5
|
+
let opts = Object.defineProperty({}, 'passive', {
|
6
|
+
get() {
|
7
|
+
supportsPassive = true;
|
8
|
+
}
|
9
|
+
});
|
10
|
+
|
11
|
+
window.addEventListener('testPassive', null, opts);
|
12
|
+
window.removeEventListener('testPassive', null, opts);
|
13
|
+
} catch (e) {}
|
14
|
+
|
15
|
+
return supportsPassive;
|
16
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export const isIE = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;
|
2
|
+
export const isIETouch = (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1);
|
3
|
+
export const isAndroid = navigator.userAgent.match(/(Android);?[\s\/]+([\d.]+)?/);
|
4
|
+
export const isiPad = navigator.userAgent.match(/(iPad).*OS\s([\d_]+)/);
|
5
|
+
export const isiPod = navigator.userAgent.match(/(iPod)(.*OS\s([\d_]+))?/);
|
6
|
+
export const isiPhone = !navigator.userAgent.match(/(iPad).*OS\s([\d_]+)/) && navigator.userAgent.match(/(iPhone\sOS)\s([\d_]+)/);
|
7
|
+
export const isSafari = (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0 && navigator.userAgent.toLowerCase().indexOf('android') < 0);
|
8
|
+
export const isUiWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent);
|
9
|
+
|
10
|
+
export const supportsTouchEvents = !!('ontouchstart' in window);
|
11
|
+
export const supportsPointerEvents = !!('PointerEvent' in window);
|
12
|
+
export const supportsTouch = supportsTouchEvents || window.DocumentTouch && document instanceof DocumentTouch || navigator.maxTouchPoints; // IE >=11
|
13
|
+
export const pointerDown = !supportsTouch ? 'mousedown' : `mousedown ${supportsTouchEvents ? 'touchstart' : 'pointerdown'}`;
|
14
|
+
export const pointerMove = !supportsTouch ? 'mousemove' : `mousemove ${supportsTouchEvents ? 'touchmove' : 'pointermove'}`;
|
15
|
+
export const pointerUp = !supportsTouch ? 'mouseup' : `mouseup ${supportsTouchEvents ? 'touchend' : 'pointerup'}`;
|
16
|
+
export const pointerEnter = supportsTouch && supportsPointerEvents ? 'pointerenter' : 'mouseenter';
|
17
|
+
export const pointerLeave = supportsTouch && supportsPointerEvents ? 'pointerleave' : 'mouseleave';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export const isInViewport = (element, html) => {
|
2
|
+
const rect = element.getBoundingClientRect();
|
3
|
+
html = html || document.documentElement;
|
4
|
+
return (
|
5
|
+
rect.top >= 0 &&
|
6
|
+
rect.left >= 0 &&
|
7
|
+
rect.bottom <= (window.innerHeight || html.clientHeight) &&
|
8
|
+
rect.right <= (window.innerWidth || html.clientWidth)
|
9
|
+
);
|
10
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export default class EventEmitter {
|
2
|
+
constructor(events = []) {
|
3
|
+
this.events = new Map(events);
|
4
|
+
}
|
5
|
+
|
6
|
+
on(name, cb) {
|
7
|
+
this.events.set(name, [
|
8
|
+
...(this.events.has(name) ? this.events.get(name) : []),
|
9
|
+
cb
|
10
|
+
]);
|
11
|
+
|
12
|
+
return () =>
|
13
|
+
this.events.set(name, this.events.get(name).filter(fn => fn !== cb));
|
14
|
+
}
|
15
|
+
|
16
|
+
emit(name, ...args) {
|
17
|
+
return this.events.has(name) && this.events.get(name).map(fn => fn(...args));
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
/**
|
2
|
+
* dispatch custom events
|
3
|
+
*
|
4
|
+
* @param {element} el slideshow element
|
5
|
+
* @param {string} type custom event name
|
6
|
+
* @param {object} detail custom detail information
|
7
|
+
*/
|
8
|
+
export const dispatchEvent = (target, type, detail) => {
|
9
|
+
let event = new CustomEvent(
|
10
|
+
type, {
|
11
|
+
bubbles: true,
|
12
|
+
cancelable: true,
|
13
|
+
detail: detail
|
14
|
+
}
|
15
|
+
);
|
16
|
+
target.dispatchEvent(event);
|
17
|
+
};
|
18
|
+
|
19
|
+
export const on = (el, events, listener, useCapture = false) => {
|
20
|
+
let events = events.split(' ');
|
21
|
+
events.forEach(type => {
|
22
|
+
el.addEventListener(type, listener, useCapture);
|
23
|
+
});
|
24
|
+
};
|
25
|
+
|
26
|
+
export const one = (el, type, listener, useCapture = false) => {
|
27
|
+
let types = type.split(' ');
|
28
|
+
types.forEach(type => {
|
29
|
+
el.addEventListener(type, e => {
|
30
|
+
e.target.removeEventListener(e.type, arguments.callee);
|
31
|
+
listener(e);
|
32
|
+
}, useCapture);
|
33
|
+
});
|
34
|
+
};
|
35
|
+
|
36
|
+
export const off = (el, type, listener, useCapture = false) => {
|
37
|
+
let types = type.split(' ');
|
38
|
+
types.forEach(type => {
|
39
|
+
el.removeEventListener(type, listener, useCapture);
|
40
|
+
});
|
41
|
+
};
|
42
|
+
|
43
|
+
export const once = (...args) => {
|
44
|
+
const [el, type, listener, useCapture, condition] = args;
|
45
|
+
const off = on(el, type, e => {
|
46
|
+
const result = !condition || condition(e);
|
47
|
+
if (result) {
|
48
|
+
off();
|
49
|
+
listener(e, result);
|
50
|
+
}
|
51
|
+
}, useCapture);
|
52
|
+
|
53
|
+
return off;
|
54
|
+
};
|
55
|
+
|
56
|
+
export const trigger = (el, type, options) => {
|
57
|
+
var event;
|
58
|
+
if (window.CustomEvent) {
|
59
|
+
event = new CustomEvent(type, options);
|
60
|
+
} else {
|
61
|
+
event = document.createEvent('CustomEvent');
|
62
|
+
event.initCustomEvent(type, true, true, options);
|
63
|
+
}
|
64
|
+
el.dispatchEvent(event);
|
65
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export const uuid = (prefix = '') => prefix + ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
|
2
|
+
export const isRtl = () => document.documentElement.getAttribute('dir') === 'rtl';
|
3
|
+
|
4
|
+
export const defer = function () {
|
5
|
+
this.promise = new Promise((function (resolve, reject) {
|
6
|
+
this.resolve = resolve;
|
7
|
+
this.reject = reject;
|
8
|
+
}).bind(this));
|
9
|
+
|
10
|
+
this.then = this.promise.then.bind(this.promise);
|
11
|
+
this.catch = this.promise.catch.bind(this.promise);
|
12
|
+
};
|
13
|
+
|
14
|
+
|
15
|
+
export const getNodeIndex = node => [...node.parentNode.children].indexOf(node);
|
16
|
+
export const camelize = str => str.replace(/-(\w)/g, toUpper);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export const isFunction = unknown => typeof unknown === 'function';
|
2
|
+
export const isNumber = unknown => typeof unknown === "number";
|
3
|
+
export const isString = unknown => (typeof unknown === 'string' || ((!!unknown && typeof unknown === 'object') && Object.prototype.toString.call(unknown) === '[object String]'));
|
4
|
+
export const isDate = unknown => (Object.prototype.toString.call(unknown) === '[object Date]' || unknown instanceof Date) && !isNaN(unknown.valueOf());
|
5
|
+
export const isObject = unknown => ((typeof unknown === 'function' || (typeof unknown === 'object' && !!unknown)) && !Array.isArray(unknown));
|
6
|
+
export const isEmptyObject = unknown => {
|
7
|
+
for (const name in unknown) {
|
8
|
+
if (unknown.hasOwnProperty(name)) {
|
9
|
+
return false;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
return true;
|
13
|
+
};
|
14
|
+
|
15
|
+
|
16
|
+
export const isNode = unknown => !!(unknown && unknown.nodeType === HTMLElement | SVGElement);
|
17
|
+
export const isVideo = unknown => isYoutube(unknown) || isVimeo(unknown) || isHTML5(unknown);
|
18
|
+
export const isHTML5 = unknown => isNode(unknown) && unknown.tagName === 'VIDEO';
|
19
|
+
export const isIFrame = unknown => isNode(unknown) && unknown.tagName === 'IFRAME';
|
20
|
+
export const isYoutube = unknown => isIFrame(unknown) && !!unknown.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/);
|
21
|
+
export const isVimeo = unknown => isIFrame(unknown) && !!unknown.src.match(/vimeo\.com\/video\/.*/);
|
@@ -0,0 +1,145 @@
|
|
1
|
+
.slider
|
2
|
+
position: relative
|
3
|
+
width: 100%
|
4
|
+
// overflow: hidden
|
5
|
+
.slider-container
|
6
|
+
display: flex
|
7
|
+
flex-wrap: nowrap
|
8
|
+
flex-direction: row
|
9
|
+
overflow: hidden
|
10
|
+
transform: translate3d(0, 0, 0)
|
11
|
+
min-height: 100%
|
12
|
+
&.is-vertical
|
13
|
+
flex-direction: column
|
14
|
+
.slider-item
|
15
|
+
flex: none
|
16
|
+
.image
|
17
|
+
&.is-covered
|
18
|
+
img
|
19
|
+
object-fit: cover
|
20
|
+
object-position: center center
|
21
|
+
height: 100%
|
22
|
+
width: 100%
|
23
|
+
// Responsive embedded objects
|
24
|
+
.video-container
|
25
|
+
height: 0
|
26
|
+
padding-bottom: 0
|
27
|
+
padding-top: 56.25% // ratio 16:9
|
28
|
+
margin: 0
|
29
|
+
position: relative
|
30
|
+
&.is-1by1,
|
31
|
+
&.is-square
|
32
|
+
padding-top: 100%
|
33
|
+
&.is-4by3
|
34
|
+
padding-top: 75%
|
35
|
+
&.is-21by9
|
36
|
+
padding-top: 42.857143%
|
37
|
+
& iframe,
|
38
|
+
& object,
|
39
|
+
& embed
|
40
|
+
position: absolute
|
41
|
+
top: 0
|
42
|
+
left: 0
|
43
|
+
width: 100% !important
|
44
|
+
height: 100% !important
|
45
|
+
|
46
|
+
|
47
|
+
.slider-navigation-previous,
|
48
|
+
.slider-navigation-next
|
49
|
+
display: flex
|
50
|
+
justify-content: center
|
51
|
+
align-items: center
|
52
|
+
position: absolute
|
53
|
+
width: 42px
|
54
|
+
height: 42px
|
55
|
+
background: white center center no-repeat
|
56
|
+
background-size: 20px 20px
|
57
|
+
border: 1px solid white
|
58
|
+
border-radius: 25091983px
|
59
|
+
box-shadow: 0 2px 5px #3232321a
|
60
|
+
top: 50%
|
61
|
+
margin-top: -20px
|
62
|
+
left: 0px
|
63
|
+
cursor: pointer
|
64
|
+
transition: transform .3s, opacity .3s
|
65
|
+
&:hover
|
66
|
+
transform: scale(1.2)
|
67
|
+
&.is-hidden
|
68
|
+
display: none
|
69
|
+
opacity: 0
|
70
|
+
svg
|
71
|
+
width: 25%
|
72
|
+
.slider-navigation-next
|
73
|
+
left: auto
|
74
|
+
right: 0px
|
75
|
+
background: white center center no-repeat
|
76
|
+
background-size: 20px 20px
|
77
|
+
|
78
|
+
.slider-pagination
|
79
|
+
display: none
|
80
|
+
justify-content: center
|
81
|
+
align-items: center
|
82
|
+
position: absolute
|
83
|
+
bottom: 0
|
84
|
+
left: 0
|
85
|
+
right: 0
|
86
|
+
padding: .5rem 1rem
|
87
|
+
text-align: center
|
88
|
+
.slider-page
|
89
|
+
background: white
|
90
|
+
width: 10px
|
91
|
+
height: 10px
|
92
|
+
border-radius: 25091983px
|
93
|
+
display: inline-block
|
94
|
+
margin: 0 3px
|
95
|
+
box-shadow: 0 2px 5px #3232321a
|
96
|
+
transition: transform .3s
|
97
|
+
cursor: pointer
|
98
|
+
&.is-active,
|
99
|
+
&:hover
|
100
|
+
transform: scale(1.4)
|
101
|
+
|
102
|
+
@media screen and (min-width: 800px)
|
103
|
+
display: flex
|
104
|
+
|
105
|
+
|
106
|
+
// Hero Carousel
|
107
|
+
=hero-carousel
|
108
|
+
position: absolute
|
109
|
+
top: 0
|
110
|
+
left: 0
|
111
|
+
bottom: 0
|
112
|
+
right: 0
|
113
|
+
height: auto
|
114
|
+
border: none
|
115
|
+
margin: auto
|
116
|
+
padding: 0
|
117
|
+
z-index: 0
|
118
|
+
|
119
|
+
.hero
|
120
|
+
&.has-carousel
|
121
|
+
position: relative
|
122
|
+
+ .hero-body,
|
123
|
+
+ .hero-head,
|
124
|
+
+ .hero-footer
|
125
|
+
z-index: 10
|
126
|
+
overflow: hidden
|
127
|
+
.hero-carousel
|
128
|
+
+hero-carousel
|
129
|
+
.slider
|
130
|
+
width: 100%
|
131
|
+
max-width: 100%
|
132
|
+
overflow: hidden
|
133
|
+
height: 100% !important
|
134
|
+
max-height: 100%
|
135
|
+
z-index: 0
|
136
|
+
.has-background
|
137
|
+
max-height: 100%
|
138
|
+
.is-background
|
139
|
+
object-fit: cover
|
140
|
+
object-position: center center
|
141
|
+
height: 100%
|
142
|
+
width: 100%
|
143
|
+
.hero-body
|
144
|
+
margin: 0 3rem
|
145
|
+
z-index: 10
|
data/package-lock.json
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"name": "INTIA",
|
3
|
+
"requires": true,
|
4
|
+
"lockfileVersion": 1,
|
5
|
+
"dependencies": {
|
6
|
+
"bulma": {
|
7
|
+
"version": "0.9.3",
|
8
|
+
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.3.tgz",
|
9
|
+
"integrity": "sha512-0d7GNW1PY4ud8TWxdNcP6Cc8Bu7MxcntD/RRLGWuiw/s0a9P+XlH/6QoOIrmbj6o8WWJzJYhytiu9nFjTszk1g=="
|
10
|
+
},
|
11
|
+
"bulma-block-list": {
|
12
|
+
"version": "0.4.2",
|
13
|
+
"resolved": "https://registry.npmjs.org/bulma-block-list/-/bulma-block-list-0.4.2.tgz",
|
14
|
+
"integrity": "sha512-WxcGcxNFa6ZrF/CIR7uETLHJVwnFemKuTS5hI3CMn5hJ2PONp2WghldBGlINzxrj6jcf89cyE/YoEEtKUxYJcw==",
|
15
|
+
"requires": {
|
16
|
+
"bulma": "^0.8.0"
|
17
|
+
},
|
18
|
+
"dependencies": {
|
19
|
+
"bulma": {
|
20
|
+
"version": "0.8.2",
|
21
|
+
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.8.2.tgz",
|
22
|
+
"integrity": "sha512-vMM/ijYSxX+Sm+nD7Lmc1UgWDy2JcL2nTKqwgEqXuOMU+IGALbXd5MLt/BcjBAPLIx36TtzhzBcSnOP974gcqA=="
|
23
|
+
}
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"bulma-carousel": {
|
27
|
+
"version": "4.0.24",
|
28
|
+
"resolved": "https://registry.npmjs.org/bulma-carousel/-/bulma-carousel-4.0.24.tgz",
|
29
|
+
"integrity": "sha512-DLYKmf/iHH8yAQSo8+O/cQvSVSAo15f+XmbiQvAvu5hUJs5O8I40RbZqrF9OougNs4n4JMokPEIBUiDGAsFuRA=="
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|