add picture lightbox

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK
2021-01-23 18:03:13 +01:00
parent 1077996988
commit f14ab87c84
15 changed files with 196 additions and 99 deletions

24
docs/assets/js/custom.js Normal file
View File

@@ -0,0 +1,24 @@
$(document).ready(function () {
let imageGroups = []
$(".lightbox").each(function () {
let imageSource = $(this).attr('src')
let imageTag = $(this).attr('tag')
let imageTitle = $(this).attr('title')
if (imageTitle) {
imageTitle = 'title="' + imageTitle + '" '
}
else {
imageTitle = ''
}
$(this).
wrap('<a class="boxedThumb ' + imageTag + '" ' +
imageTitle + 'href="' + imageSource + '"></a>')
imageGroups.push('.' + imageTag)
})
jQuery.unique(imageGroups)
imageGroups.forEach(imageGroupsSet)
function imageGroupsSet (value) {
$(value).simpleLightbox()
}
})

24
docs/assets/js/custom.js~ Normal file
View File

@@ -0,0 +1,24 @@
$(document).ready(function () {
let productImageGroups = []
$('.img-fluid').each(function () {
let productImageSource = $(this).attr('src')
let productImageTag = $(this).attr('tag')
let productImageTitle = $(this).attr('title')
if (productImageTitle) {
productImageTitle = 'title="' + productImageTitle + '" '
}
else {
productImageTitle = ''
}
$(this).
wrap('<a class="boxedThumb ' + productImageTag + '" ' +
productImageTitle + 'href="' + productImageSource + '"></a>')
productImageGroups.push('.' + productImageTag)
})
jQuery.unique(productImageGroups)
productImageGroups.forEach(productImageGroupsSet)
function productImageGroupsSet (value) {
$(value).simpleLightbox()
}
})

2
docs/assets/js/jquery-3.5.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
docs/assets/js/simple-lightbox.min.js vendored Normal file

File diff suppressed because one or more lines are too long