图片灯箱动画优化
- 为图片灯箱加入了从哪来回哪去的动画
This commit is contained in:
@@ -24,13 +24,19 @@
|
||||
const items = images.map((item) => ({
|
||||
...getSize(item),
|
||||
src: item.dataset.originalSrc || item.currentSrc || item.src,
|
||||
alt: item.alt
|
||||
msrc: item.currentSrc || item.src,
|
||||
alt: item.alt,
|
||||
element: item
|
||||
}));
|
||||
|
||||
lightboxPromise ??= import('photoswipe/lightbox').then(({ default: PhotoSwipeLightbox }) => {
|
||||
const lightbox = new PhotoSwipeLightbox({
|
||||
pswpModule: () => import('photoswipe'),
|
||||
bgClickAction: 'close'
|
||||
bgClickAction: 'close',
|
||||
showHideAnimationType: 'zoom',
|
||||
showAnimationDuration: 360,
|
||||
hideAnimationDuration: 300,
|
||||
easing: 'cubic-bezier(0.22, 1, 0.36, 1)'
|
||||
});
|
||||
lightbox.init();
|
||||
return lightbox;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "八月记"
|
||||
pubDate: "2026-08-27T06:42:43.447Z"
|
||||
categories: ['生活']
|
||||
tags: ['总结']
|
||||
draft: false
|
||||
---
|
||||
|
||||
## 序
|
||||
|
||||
Cue 一下去年年初写的[《复盘我这庸碌的寒假》](https://www.luming.cool/posts/2025/02/winter-holiday-summary/),因为我的暑假比它还庸碌。
|
||||
Reference in New Issue
Block a user