Initial Hugo gallery site with custom landing page
- Hugo site with nicokaiser/hugo-theme-gallery (git submodule) - Full-viewport hero with parallax scrolling (bg at 70%, text at 85% speed) - Entrance animations on hero title and subtitle - Bouncing scroll arrow that fades out on scroll - Header suppressed on homepage, shown on all other pages - Intro text section between hero and album grid - Cats placeholder album with 8 images - .gitignore excludes public/, resources/, .hugo_build.lock, .idea/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
/* ── Hero ─────────────────────────────────────────────── */
|
||||
|
||||
section.hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 0;
|
||||
margin: 0 0 4rem;
|
||||
}
|
||||
|
||||
/* Background image layer — oversized so parallax has room */
|
||||
.hero-bg {
|
||||
position: absolute;
|
||||
top: -30%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160%;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
/* Gradient overlay sits above bg, below content */
|
||||
.hero-bg::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background:
|
||||
linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 40%),
|
||||
linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 20%);
|
||||
}
|
||||
|
||||
/* Foreground layer — content + scroll arrow */
|
||||
.hero-fg {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
/* ── Hero content ─────────────────────────────────────── */
|
||||
|
||||
.hero-content {
|
||||
padding: 3rem 1.5rem 0;
|
||||
text-align: center;
|
||||
max-width: 768px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hero-content h1 {
|
||||
color: #fafafa;
|
||||
font-weight: 600;
|
||||
font-size: clamp(2rem, 5vw, 3.5rem);
|
||||
line-height: 1.15;
|
||||
text-wrap: balance;
|
||||
letter-spacing: -0.01em;
|
||||
margin-bottom: 0.75rem;
|
||||
animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
|
||||
}
|
||||
|
||||
.hero-content p {
|
||||
color: rgba(250, 250, 250, 0.85);
|
||||
font-size: clamp(1rem, 2vw, 1.125rem);
|
||||
line-height: 1.6;
|
||||
text-wrap: balance;
|
||||
animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
|
||||
}
|
||||
|
||||
/* ── Scroll arrow ─────────────────────────────────────── */
|
||||
|
||||
.hero-scroll {
|
||||
padding-bottom: 2rem;
|
||||
color: rgba(250, 250, 250, 0.75);
|
||||
animation: hero-fade-in 0.6s ease 0.5s both;
|
||||
}
|
||||
|
||||
.hero-scroll-icon {
|
||||
display: block;
|
||||
animation: hero-bounce 2s ease-in-out 1.1s infinite;
|
||||
}
|
||||
|
||||
.hero-scroll svg {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ── Intro text section ───────────────────────────────── */
|
||||
|
||||
.home-intro {
|
||||
max-width: 640px;
|
||||
margin: 0 auto 4rem;
|
||||
padding: 0 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.home-intro .prose p {
|
||||
color: var(--text-1);
|
||||
font-size: 1.0625rem;
|
||||
line-height: 1.75;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.home-intro .prose p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* ── Keyframes ────────────────────────────────────────── */
|
||||
|
||||
@keyframes hero-fade-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(1.25rem);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes hero-fade-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes hero-bounce {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(7px); }
|
||||
}
|
||||
Reference in New Issue
Block a user