mirror of
https://github.com/FunKey-Project/FunKey-Project.github.io.git
synced 2025-12-12 18:28:51 +01:00
reintroduce lightbox, now with iFixIt steps
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
ddd2e68785
commit
34cad980d0
@ -95,11 +95,34 @@ $(document).ready(function () {
|
|||||||
.clone()
|
.clone()
|
||||||
.removeClass("step-thumb")
|
.removeClass("step-thumb")
|
||||||
.addClass("step-picture")
|
.addClass("step-picture")
|
||||||
|
.addClass("lightbox")
|
||||||
.insertBefore($(this).parent());
|
.insertBefore($(this).parent());
|
||||||
|
|
||||||
/* Make the first thumbnail active by default */
|
/* Make the first thumbnail active by default */
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let imageGroups = []
|
||||||
|
$(".lightbox").each(function () {
|
||||||
|
let imageSource = $(this).attr('src')
|
||||||
|
let imageAlt = $(this).attr('alt').replace(/ /g,"")
|
||||||
|
let imageTitle = $(this).attr('alt')
|
||||||
|
if (imageTitle) {
|
||||||
|
imageTitle = 'title="' + imageTitle + '" '
|
||||||
|
} else {
|
||||||
|
imageTitle = ''
|
||||||
|
}
|
||||||
|
$(this).
|
||||||
|
wrap('<a class="boxedThumb ' + imageAlt + '" ' +
|
||||||
|
imageTitle + 'href="' + imageSource + '"></a>')
|
||||||
|
imageGroups.push('.' + imageAlt)
|
||||||
|
})
|
||||||
|
jQuery.unique(imageGroups)
|
||||||
|
imageGroups.forEach(imageGroupsSet)
|
||||||
|
|
||||||
|
function imageGroupsSet (value) {
|
||||||
|
$(value).simpleLightbox()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Attach a delegate function on mouse over thumbnail to change the
|
/* Attach a delegate function on mouse over thumbnail to change the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user