Update scroll behavior and padding in About and Header styles

This commit is contained in:
dertyp7
2024-01-14 13:19:40 +01:00
parent 0de5c8d60d
commit 4e4f2b977c
3 changed files with 4 additions and 8 deletions

View File

@@ -16,11 +16,7 @@ export default function App() {
(entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
if (entry.target.id === "about") {
window.location.hash = "";
} else {
window.location.hash = entry.target.id;
}
window.location.hash = entry.target.id;
}
});
},
@@ -47,7 +43,7 @@ export default function App() {
return (
<div id="app">
<Header />
<div id="about" className="section" ref={aboutRef}>
<div className="section" ref={aboutRef}>
<About />
</div>

View File

@@ -1,6 +1,6 @@
.about {
height: 100vh;
padding: 0rem 10rem;
padding: 5rem 10rem;
.greeting {
color: var(--color-accent);
}

View File

@@ -2,7 +2,7 @@
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
position: fixed;
background-color: var(--color-background-body);
top: 0;
z-index: 100;