`

`).join('')
: originalSlides;
// Swiper walks its slides on update; leave it alone rather than empty it.
if (! slidesHtml.trim()) return;
if (swiper.params.loop) swiper.loopDestroy();
wrapper.innerHTML = slidesHtml;
slideCount = gallery.length || origSlideCount;
if (gallery.length !== 1) swiper.loopCreate();
swiper.update();
// With the loop rebuilt, index 0 is the copy of the LAST picture: open on the first.
swiper.slideTo(swiper.params.loop && gallery.length !== 1 ? swiper.loopedSlides : 0, 0);
if (thumbSwiper) { thumbSwiper.destroy(true, true); thumbSwiper = null; }
// thumbs.init() reads params.thumbs.swiper (not thumbs.swiper), and every update
// walks thumbs.swiper: neither may keep pointing at the destroyed instance.
swiper.thumbs.swiper = null;
swiper.params.thumbs.swiper = null;
const thumbWrapper = $refs.thumbs.querySelector('.swiper-wrapper');
if (originalThumbs === null) originalThumbs = thumbWrapper.innerHTML;
thumbWrapper.innerHTML = gallery.length
? gallery.map(img => `

`).join('')
: originalThumbs;
const thumbSlides = gallery.length || $refs.thumbs.querySelectorAll('.swiper-slide').length;
if (thumbSlides > 0) {
thumbSwiper = new Swiper($refs.thumbs, {
loop: thumbSlides > 1,
spaceBetween: 10,
slidesPerView: 4,
watchSlidesVisibility: true,
watchSlidesProgress: true,
breakpoints: { 320: { slidesPerView: 2, spaceBetween: 20 }, 480: { slidesPerView: 3, spaceBetween: 30 }, 640: { slidesPerView: 4, spaceBetween: 45 } }
});
}
// Swiper reads $el off the thumbs instance, so only re-attach a real one.
if (thumbSwiper) {
swiper.params.thumbs.swiper = thumbSwiper;
swiper.thumbs.init();
}
swiper.update();
// Thumbs built while x-show still hides them have no width: size them once shown.
$nextTick(() => { if (thumbSwiper) { thumbSwiper.update(); swiper.update(); } });
"
x-init="
const thumbCfg = {
loop: true,
spaceBetween: 10,
slidesPerView: 4,
watchSlidesVisibility: true,
watchSlidesProgress: true,
breakpoints: {
320: { slidesPerView: 2, spaceBetween: 20 },
480: { slidesPerView: 3, spaceBetween: 30 },
640: { slidesPerView: 4, spaceBetween: 45 }
}
};
if ($refs.thumbs && $refs.thumbs.querySelector('.swiper-slide')) {
thumbSwiper = new Swiper($refs.thumbs, thumbCfg);
}
swiper = new Swiper($refs.container, {
loop: true,
spaceBetween: 0,
slidesPerView: 1,
watchSlidesVisibility: !0,
watchSlidesProgress: !0,
thumbs: {swiper: thumbSwiper}
});
">
Show your Hogwarts™ pride with this classic set of ten Hogwarts note cards, the newest addition to Insight Editions’ best-selling Harry Potter™ stationery series!
Hogwarts School of Witchcraft and Wizardry, founded by Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw, and Salazar Slytherin, is located in the grand Hogwarts castle. These embossed foil note cards celebrate the iconic school by showcasing its classic crest in a clean, minimal design. A perfect accessory to the beloved Harry Potter films, the Hogwarts Crest Foil Note Cards invite fans to show their love for the magical series.