Skip to content

Commit 90d644d

Browse files
committed
Commit 15 pequeños cambios en la estética
1 parent c2e100a commit 90d644d

2 files changed

Lines changed: 32 additions & 4 deletions

File tree

assets/css/styles.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
--radius:16px; --max:1120px;
66
}
77
*{box-sizing:border-box} html,body{margin:0}
8+
9+
10+
html {
11+
scroll-behavior: smooth;
12+
}
13+
814
body{
915
background:linear-gradient(180deg,#0b0f14 0%,#0b0f14 60%,#0d1218 100%);
1016
color:var(--text); font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
@@ -215,3 +221,13 @@ p{color:var(--muted); line-height:1.7}
215221
radial-gradient(circle at 20% 80%, rgba(56,189,248,0.5), transparent 55%);
216222
}
217223

224+
.section {
225+
opacity: 0;
226+
transform: translateY(24px);
227+
transition: opacity .6s ease, transform .6s ease;
228+
}
229+
230+
.section.visible {
231+
opacity: 1;
232+
transform: translateY(0);
233+
}

assets/js/app.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,24 @@ function renderServices(){
173173
`).join("");
174174
}
175175

176+
function setupSectionObserver(){
177+
const sections = document.querySelectorAll('.section');
178+
const observer = new IntersectionObserver(entries => {
179+
entries.forEach(entry => {
180+
if (entry.isIntersecting){
181+
entry.target.classList.add('visible');
182+
// opcional: dejar de observar para no animar mil veces
183+
observer.unobserve(entry.target);
184+
}
185+
});
186+
}, {
187+
threshold: 0.18
188+
});
176189

177-
178-
190+
sections.forEach(sec => observer.observe(sec));
191+
}
179192

180193
document.addEventListener("DOMContentLoaded", ()=>{
181194
applyI18n();
182-
renderProjects();
195+
setupSectionObserver();
183196
});
184-

0 commit comments

Comments
 (0)