mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 09:05:45 +00:00
IMPR: CMS lightbox
This commit is contained in:
parent
40bd7f9601
commit
52d6dcaf3c
@ -9,13 +9,20 @@ export default ((W) => {
|
|||||||
|
|
||||||
const loadLazyImages = () => {
|
const loadLazyImages = () => {
|
||||||
console.log(`${NAME}: Load lazy images`)
|
console.log(`${NAME}: Load lazy images`)
|
||||||
|
const base = document.querySelector('base')
|
||||||
|
const baseURL = base ? base.getAttribute('href') : '/'
|
||||||
|
|
||||||
|
|
||||||
D.querySelectorAll('[data-lazy-src]').forEach((el) => {
|
D.querySelectorAll('[data-lazy-src]').forEach((el) => {
|
||||||
el.classList.remove('empty')
|
el.classList.remove('empty')
|
||||||
|
|
||||||
const img = new ImageObject()
|
const img = new ImageObject()
|
||||||
|
let imgURL = baseURL + el.getAttribute('data-lazy-src')
|
||||||
|
|
||||||
img.load(el.getAttribute('data-lazy-src'), el)
|
// remove double slash
|
||||||
|
imgURL = imgURL.replace(/([^:]\/)\/+/g, "$1")
|
||||||
|
|
||||||
|
img.load(imgURL, el)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
el.setAttribute('src', result)
|
el.setAttribute('src', result)
|
||||||
})
|
})
|
||||||
|
@ -136,3 +136,29 @@ body.cms {
|
|||||||
.cms table.grid-field__table tbody .col-bulkSelect {
|
.cms table.grid-field__table tbody .col-bulkSelect {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notifications-list {
|
||||||
|
.alert {
|
||||||
|
.btn-close {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-primary,
|
||||||
|
.btn-primary {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visually-hidden,
|
||||||
|
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
||||||
|
position: absolute !important;
|
||||||
|
width: 1px !important;
|
||||||
|
height: 1px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: -1px !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
clip: rect(0, 0, 0, 0) !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
@ -229,7 +229,7 @@ const cfg = merge(common.webpack, {
|
|||||||
reserved: ['$', 'jQuery', 'jquery'],
|
reserved: ['$', 'jQuery', 'jquery'],
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
ecma: 5,
|
ecma: 6,
|
||||||
comments: false,
|
comments: false,
|
||||||
// Turned on because emoji and regex is not minified properly using default
|
// Turned on because emoji and regex is not minified properly using default
|
||||||
// https://github.com/facebook/create-react-app/issues/2488
|
// https://github.com/facebook/create-react-app/issues/2488
|
||||||
|
Loading…
x
Reference in New Issue
Block a user