Compare commits
3 Commits
SendEmailF
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c22f5d722a | |||
| ff26e3c329 | |||
| 2b694b2198 |
@@ -24,6 +24,11 @@ const { pageTitle } = Astro.props;
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{pageTitle ? `Naliia | ${pageTitle}` : "Naliia"}</title>
|
<title>{pageTitle ? `Naliia | ${pageTitle}` : "Naliia"}</title>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://unpkg.com/lenis@1.3.17/dist/lenis.css"
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -86,6 +91,22 @@ const { pageTitle } = Astro.props;
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<Footer />
|
<Footer />
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Lenis from "lenis";
|
||||||
|
|
||||||
|
const lenis = new Lenis({
|
||||||
|
touchMultiplier: 2,
|
||||||
|
infinite: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
function raf(time: number) {
|
||||||
|
lenis.raf(time);
|
||||||
|
requestAnimationFrame(raf);
|
||||||
|
}
|
||||||
|
|
||||||
|
requestAnimationFrame(raf);
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@@ -100,47 +121,7 @@ const { pageTitle } = Astro.props;
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
|
||||||
import Lenis from "lenis";
|
|
||||||
|
|
||||||
// Inicialización de Lenis
|
|
||||||
const lenis = new Lenis({
|
|
||||||
duration: 1.2,
|
|
||||||
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
|
|
||||||
direction: "vertical",
|
|
||||||
gestureDirection: "vertical",
|
|
||||||
smoothHover: true,
|
|
||||||
// En móviles a veces es mejor dejarlo en false para no interferir con el scroll nativo
|
|
||||||
smoothTouch: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Función de actualización (Raf)
|
|
||||||
function raf(time: number) {
|
|
||||||
lenis.raf(time);
|
|
||||||
requestAnimationFrame(raf);
|
|
||||||
}
|
|
||||||
|
|
||||||
requestAnimationFrame(raf);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Estilos base para Lenis */
|
|
||||||
html.lenis {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lenis.lenis-smooth {
|
|
||||||
scroll-behavior: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lenis.lenis-smooth [data-lenis-prevent] {
|
|
||||||
overscroll-behavior: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lenis.lenis-stopped {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Estilos globales */
|
/* Estilos globales */
|
||||||
html {
|
html {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -161,10 +142,6 @@ const { pageTitle } = Astro.props;
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
|
|
||||||
/* background-image: url("/src/assets/imgs/n-naliia-rosada-fondo.webp");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: top right; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body::before {
|
body::before {
|
||||||
|
|||||||
@@ -116,8 +116,6 @@ const videosList = Object.keys(videoFiles).map((key) => {
|
|||||||
const name = item.getAttribute("data-name");
|
const name = item.getAttribute("data-name");
|
||||||
const matches = name && name.includes(query);
|
const matches = name && name.includes(query);
|
||||||
|
|
||||||
// Usamos toggle: si matches es true, hidden es false (se muestra)
|
|
||||||
// Si matches es false, hidden es true (se oculta)
|
|
||||||
item.classList.toggle("hidden", !matches);
|
item.classList.toggle("hidden", !matches);
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
|
|||||||
Reference in New Issue
Block a user