修复EXIF
This commit is contained in:
1 parent
a0c64736eb
commit
0021045c5f
19 files changed
+315
-911
No files matched your search
@@ -1,13 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
|
||||
const x = ref(0);
|
||||
const y = ref(0);
|
||||
const glowEl = ref<HTMLElement | null>(null);
|
||||
const visible = ref(false);
|
||||
var rafId = 0;
|
||||
|
||||
function handleMouseMove(e: MouseEvent) {
|
||||
x.value = e.clientX;
|
||||
y.value = e.clientY;
|
||||
if (rafId) return;
|
||||
rafId = requestAnimationFrame(() => {
|
||||
if (glowEl.value) {
|
||||
glowEl.value.style.transform = `translate(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%))`;
|
||||
}
|
||||
rafId = 0;
|
||||
});
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
@@ -16,21 +21,22 @@ function handleMouseLeave() {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener("mousemove", handleMouseMove);
|
||||
document.addEventListener("mousemove", handleMouseMove, { passive: true });
|
||||
document.addEventListener("mouseleave", handleMouseLeave);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener("mousemove", handleMouseMove);
|
||||
document.removeEventListener("mouseleave", handleMouseLeave);
|
||||
if (rafId) cancelAnimationFrame(rafId);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
ref="glowEl"
|
||||
class="wi-cursor-glow"
|
||||
:class="{ 'wi-cursor-glow--visible': visible }"
|
||||
:style="{ transform: `translate(calc(${x}px - 50%), calc(${y}px - 50%))` }"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
---
|
||||
|
||||
<script>
|
||||
import 'lightgallery/css/lightgallery-bundle.css';
|
||||
import 'lightgallery/css/lightgallery.css';
|
||||
import 'lightgallery/css/lg-zoom.css';
|
||||
import 'lightgallery/css/lg-thumbnail.css';
|
||||
import 'lightgallery/css/lg-fullscreen.css';
|
||||
import 'lightgallery/css/lg-rotate.css';
|
||||
import 'lightgallery/css/lg-autoplay.css';
|
||||
import lightGallery from 'lightgallery';
|
||||
import lgZoom from 'lightgallery/plugins/zoom';
|
||||
import lgThumbnail from 'lightgallery/plugins/thumbnail';
|
||||
@@ -84,9 +89,12 @@
|
||||
showZoomInOutIcons: true,
|
||||
toggleThumb: true,
|
||||
allowMediaOverlap: true,
|
||||
autoplay: false,
|
||||
slideDelay: 5000,
|
||||
autoplay: true,
|
||||
slideShowAutoplay: false,
|
||||
slideShowInterval: 5000,
|
||||
progressBar: true,
|
||||
autoplayControls: true,
|
||||
forceSlideShowAutoplay: false,
|
||||
rotate: true,
|
||||
flipHorizontal: false,
|
||||
flipVertical: false,
|
||||
@@ -107,6 +115,10 @@
|
||||
markInitialized(el);
|
||||
}
|
||||
|
||||
function isMobile() {
|
||||
return window.innerWidth < 768;
|
||||
}
|
||||
|
||||
function initLightGallery() {
|
||||
initContentPages();
|
||||
initPhotosPage();
|
||||
@@ -122,6 +134,18 @@
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
||||
document.addEventListener('click', function(e) {
|
||||
var link = e.target.closest('.wi-lightgallery-item');
|
||||
if (link) {
|
||||
setTimeout(function() {
|
||||
var lgOuter = document.querySelector('.lg-outer');
|
||||
if (lgOuter && !lgOuter.classList.contains('wi-thumb-shown') && !isMobile()) {
|
||||
lgOuter.classList.add('wi-thumb-shown');
|
||||
}
|
||||
}, 350);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initContentPages() {
|
||||
|
||||
@@ -51,7 +51,7 @@ import ThemeSwitcher from "./ThemeSwitcher.vue";
|
||||
</button>
|
||||
|
||||
<th:block th:if="${theme.config?.navbar?.navbar_show_theme_switch != false}">
|
||||
<ThemeSwitcher client:load />
|
||||
<ThemeSwitcher client:idle />
|
||||
</th:block>
|
||||
|
||||
<button
|
||||
|
||||
@@ -28,6 +28,7 @@ const pageConfig = findPageBySlug("photos");
|
||||
th:alt="${photo.spec.displayName ?: ''}"
|
||||
class="wi-photos-section__image"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user