adjust landing page

This commit is contained in:
Abdenasser 2024-11-06 08:03:56 +01:00
parent 7bf166b3df
commit 21c19dfa05
2 changed files with 97 additions and 25 deletions

View File

@ -82,10 +82,10 @@
data-position="Right" data-x_margin="18" data-y_margin="18"></script> data-position="Right" data-x_margin="18" data-y_margin="18"></script>
</div> </div>
</div> </div>
<div class="hero-image">
<img src="https://github.com/Abdenasser/neohtop/raw/main/screenshot.png" alt="NeoHtop Interface"
class="floating-screenshot">
</div> </div>
<div class="hero-background">
<img src="https://github.com/Abdenasser/neohtop/raw/main/screenshot-light.png" alt="NeoHtop Interface light" />
<img src="https://github.com/Abdenasser/neohtop/raw/main/screenshot.png" alt="NeoHtop Interface dark" />
</div> </div>
</section> </section>

View File

@ -131,24 +131,67 @@ section {
/* Hero Section */ /* Hero Section */
.hero { .hero {
height: 600px;
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 4rem 2rem; overflow: hidden;
margin-top: 64px;
/* Account for fixed header */
} }
.hero-content { .hero-content {
max-width: 1200px; flex: 0 0 50%;
margin: 0 auto; padding: 2rem;
display: grid; z-index: 2;
grid-template-columns: 1fr 1fr; position: relative;
gap: 3rem;
align-items: center;
} }
.hero-text { .hero-content::before {
max-width: 540px; content: '';
position: absolute;
top: -50px;
left: -50px;
width: calc(100% + 100px);
height: calc(100% + 100px);
background: linear-gradient(to right,
var(--background) 0%,
var(--background) 60%,
transparent 100%);
z-index: -1;
}
.hero-background {
flex: 0 0 90%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
margin-right: -40%;
padding-right: 40%;
}
.hero-background img {
max-width: 200%;
max-height: 200%;
width: auto;
height: 100%;
object-fit: contain;
}
.hero-background img[src*="screenshot.png"] {
display: none;
}
.hero-background img[src*="screenshot-light.png"] {
display: block;
}
/* Dark mode */
[data-theme="dark"] .hero-background img[src*="screenshot.png"] {
display: block;
}
[data-theme="dark"] .hero-background img[src*="screenshot-light.png"] {
display: none;
} }
.gradient-text { .gradient-text {
@ -192,17 +235,34 @@ section {
/* Responsive design */ /* Responsive design */
@media (max-width: 1024px) { @media (max-width: 1024px) {
.hero { .hero {
padding: 3rem 1.5rem; flex-direction: column;
height: auto;
min-height: auto;
} }
.hero-content { .hero-content {
grid-template-columns: 1fr; flex: 0 0 100%;
gap: 2rem; width: 100%;
padding: 3rem 2rem;
text-align: center; text-align: center;
} }
.hero-text { .hero-background {
margin: 0 auto; flex: 0 0 100%;
margin-right: 0;
padding-right: 0;
}
.hero-background img {
width: 100%;
height: auto;
max-height: 400px;
object-fit: contain;
}
.hero-content::before {
display: none;
/* Remove the gradient since content and image are now stacked */
} }
.hero-cta { .hero-cta {
@ -212,15 +272,15 @@ section {
.tech-stack { .tech-stack {
justify-content: center; justify-content: center;
} }
.gradient-text {
font-size: 3rem;
}
} }
@media (max-width: 640px) { @media (max-width: 640px) {
.hero { .hero {
padding: 1rem; padding: 2rem 1rem;
}
.hero-content {
padding: 2rem 1rem;
} }
.gradient-text { .gradient-text {
@ -1033,3 +1093,15 @@ footer {
.learn-more:hover { .learn-more:hover {
text-decoration: underline; text-decoration: underline;
} }
/* Responsive adjustments */
@media (max-width: 768px) {
.hero {
height: 500px;
}
.hero-content,
.hero-background {
flex: 0 0 100%;
}
}