summaryrefslogtreecommitdiffstats
path: root/assets/css/components/hero.css
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-10 11:29:00 +0200
committerDanilo M. <danix@danix.xyz>2026-04-10 11:29:00 +0200
commitc42150058196f5affad5c6c590e99dd2fc7321c3 (patch)
treecb0a7ad297128a43d32111e403959491573b6ace /assets/css/components/hero.css
parentd51e4ef7dcd8609cd008a803f9d51674ac3d3ed2 (diff)
downloaddanixxyz-theme-c42150058196f5affad5c6c590e99dd2fc7321c3.tar.gz
danixxyz-theme-c42150058196f5affad5c6c590e99dd2fc7321c3.zip
feat: complete Hugo theme implementation from mockups
Transform all production-ready mockup files into a fully functional Hugo theme with all design patterns, components, and interactivity. Implements the complete plan: token alignment, global shell, homepage, articles section, single article views, photo gallery, static pages, and 404 page. Changes: - Phase 0: Token alignment (--color-* → --type-*, add spacing/z-index/timing scales) - Phase 1a: Global shell (baseof.html, hamburger menu, theme toggle, matrix rain) - Phase 1b: Homepage (hero layout, glitch/typing/scroll-reveal effects) - Phase 1c: Articles section (timeline layout, filter system, featured cards) - Phase 1d: Single article (meta bar, share sidebar, footer nav, progress bar) - Phase 1e: Photo gallery (lightbox, grid layout, shortcode updates) - Phase 1f: Static pages (about/contact page layout) - Phase 1g: 404 page (standalone HTML, quote randomization, recent articles) New files: - 6 CSS components: hamburger, article-hero, share-sidebar, timeline, lightbox, 404 - 8 JS modules: hamburger, glitch, typing, scroll-reveal, share-sidebar, lightbox, 404, photo-utils - 6 template partials: article-single, featured-card, photo-article, share-sidebar, static-page, timeline-item - 1 layout: 404.html (standalone) Updated: - All CSS variables with comprehensive token system - All JS modules integrated into main.js - All shortcodes (gallery, gal-img) for lightbox compatibility - All layout files (baseof, home, section, page) with new dispatching logic Verified: Hugo build succeeds with 21 pages, no errors. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'assets/css/components/hero.css')
-rw-r--r--assets/css/components/hero.css306
1 files changed, 258 insertions, 48 deletions
diff --git a/assets/css/components/hero.css b/assets/css/components/hero.css
index 567a3e9..3596274 100644
--- a/assets/css/components/hero.css
+++ b/assets/css/components/hero.css
@@ -1,82 +1,269 @@
/* hero.css */
+
.hero {
position: relative;
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 2rem;
+ gap: 3rem;
overflow: hidden;
- padding: var(--section-py-mobile) 1.5rem;
- background: var(--bg);
- border-bottom: 1px solid var(--border);
-}
-
-@media (min-width: 768px) {
- .hero {
- padding: var(--section-py-desktop) 1.5rem;
- }
}
#matrix-canvas {
position: absolute;
inset: 0;
- opacity: 0.4;
+ opacity: 0.13;
pointer-events: none;
}
html.theme-light #matrix-canvas {
- opacity: 0.5;
+ opacity: 0.08;
}
-.hero-content {
+.hero-left {
+ flex: 1;
+ min-width: 0;
position: relative;
- z-index: 1;
- max-width: var(--container-max);
- margin: 0 auto;
- display: flex;
- align-items: center;
- gap: var(--gap-lg);
+ z-index: 2;
}
-.hero-avatar {
- width: 64px;
- height: 64px;
- border-radius: 50%;
- flex-shrink: 0;
- background: linear-gradient(135deg, var(--accent), var(--accent2));
- display: flex;
- align-items: center;
- justify-content: center;
+.hero-prompt {
+ font-size: 0.75rem;
+ letter-spacing: 0.16em;
+ text-transform: uppercase;
+ color: var(--accent);
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+ font-family: var(--font-mono);
+}
+
+.hero-name {
font-family: var(--font-head);
- font-size: 1.4rem;
+ font-size: clamp(3rem, 12vw, 7rem);
font-weight: 800;
- color: #fff;
+ letter-spacing: -0.04em;
+ line-height: 1;
+ margin-bottom: 1rem;
+ position: relative;
+ display: inline-block;
}
-@media (min-width: 768px) {
- .hero-avatar {
- width: 80px;
- height: 80px;
- font-size: 1.8rem;
- }
+/* Glitch effect on hero name */
+.hero-name::before,
+.hero-name::after {
+ content: attr(data-text);
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0;
+ pointer-events: none;
+ overflow: hidden;
+ font-family: inherit;
+ font-size: inherit;
+ font-weight: inherit;
+ letter-spacing: inherit;
+ line-height: inherit;
}
-.hero-text h1 {
- margin-bottom: 0.25rem;
+.hero-name::before {
+ color: #ff2b6d;
+}
+
+.hero-name::after {
+ color: #00e5ff;
+}
+
+.hero-name.is-glitching::before {
+ opacity: 0.8;
+ animation: glitch-red 0.45s steps(3) forwards;
+}
+
+.hero-name.is-glitching::after {
+ opacity: 0.8;
+ animation: glitch-cyn 0.45s steps(3) forwards;
+}
+
+@keyframes glitch-red {
+ 0% { clip-path: inset(0 0 0 0); transform: translate(0); }
+ 20% { clip-path: inset(0 0 65% 0); transform: translate(-0.05em, -0.03em); }
+ 40% { clip-path: inset(28% 0 58% 0); transform: translate(0.05em, 0.03em); }
+ 60% { clip-path: inset(44% 0 58% 0); transform: translate(-0.05em, -0.02em); }
+ 80% { clip-path: inset(12% 0 85% 0); transform: translate(0.05em, 0.02em); }
+ 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
+}
+
+@keyframes glitch-cyn {
+ 0% { clip-path: inset(0 0 0 0); transform: translate(0); }
+ 20% { clip-path: inset(0 0 60% 0); transform: translate(0.05em, 0.02em); }
+ 40% { clip-path: inset(38% 0 58% 0); transform: translate(-0.05em, 0.01em); }
+ 60% { clip-path: inset(19% 0 40% 0); transform: translate(0.025em, -0.02em); }
+ 80% { clip-path: inset(1% 0 58% 0); transform: translate(-0.05em, -0.02em); }
+ 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}
.hero-role {
- font-family: var(--font-mono);
- font-size: 0.85rem;
+ font-size: clamp(0.85rem, 3vw, 1rem);
+ letter-spacing: 0.05em;
+ margin-bottom: 1.5rem;
color: var(--accent);
+ font-weight: 400;
+ min-height: 1.5em;
+ font-family: var(--font-mono);
+}
+
+.cursor {
+ display: inline-block;
+ width: 0.15em;
+ height: 1em;
+ background: var(--accent);
+ margin-left: 0.1em;
+ animation: cursor-blink 1s step-end infinite;
+}
+
+@keyframes cursor-blink {
+ 0%, 49% { opacity: 1; }
+ 50%, 100% { opacity: 0; }
+}
+
+.hero-tagline {
+ font-family: var(--font-body);
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.95;
+ color: var(--text-dim);
+ margin-bottom: 2rem;
+ max-width: 90%;
+}
+
+/* Buttons */
+.hero-buttons {
+ display: flex;
+ gap: 1rem;
+ flex-wrap: wrap;
+ margin-bottom: 2rem;
+}
+
+.btn {
+ padding: 0.75rem 1.5rem;
+ font-size: 0.8rem;
+ font-family: var(--font-mono);
letter-spacing: 0.1em;
text-transform: uppercase;
- margin-bottom: 0.75rem;
+ font-weight: 500;
+ cursor: pointer;
+ border: none;
+ transition: all var(--duration-base) ease;
+ text-decoration: none;
+ display: inline-block;
+ border-radius: 0;
}
-.hero-bio {
+.btn-primary {
+ background: var(--accent);
+ color: #000;
+ font-weight: 600;
+}
+
+.btn-primary:hover {
+ box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
+ transform: translate(0, -2px);
+}
+
+.btn-outline {
+ background: transparent;
+ color: var(--accent);
+ border: 1px solid var(--border);
+}
+
+.btn-outline:hover {
+ background: var(--accent);
+ color: #000;
+ box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
+}
+
+/* Right column: terminal widget */
+.hero-right {
+ flex: 0 0 auto;
+ width: 320px;
+ display: none;
+ position: relative;
+ z-index: 2;
+}
+
+@media (min-width: 1200px) {
+ .hero-right {
+ display: block;
+ }
+}
+
+.hero-terminal {
+ background: rgba(6, 11, 16, 0.85);
+ border: 1px solid rgba(168, 85, 247, 0.3);
+ border-radius: 8px;
+ overflow: hidden;
+ font-size: 0.75rem;
+ line-height: 1.7;
+}
+
+.terminal-bar {
+ background: var(--surface);
+ padding: 0.5rem 1rem;
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ align-items: center;
+ gap: 0.75rem;
+}
+
+.terminal-dot {
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ display: inline-block;
+}
+
+.terminal-content {
+ padding: 1rem;
+ font-family: var(--font-mono);
+ color: var(--terminal-text, #c4d6e8);
+}
+
+.terminal-content div {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+.terminal-prompt {
+ color: var(--terminal-prompt, #00ff88);
+}
+
+/* Scroll Indicator */
+.scroll-indicator {
+ position: absolute;
+ bottom: 2rem;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.75rem;
color: var(--text-dim);
- font-size: 0.95rem;
- line-height: 1.8;
- max-width: 400px;
+ animation: bounce 2s infinite;
+ z-index: 2;
}
+.scroll-indicator svg {
+ color: var(--accent);
+}
+
+@keyframes bounce {
+ 0%, 100% { transform: translateX(-50%) translateY(0); }
+ 50% { transform: translateX(-50%) translateY(-8px); }
+}
/* Ambient glow behind hero */
.hero::before {
@@ -89,15 +276,38 @@ html.theme-light #matrix-canvas {
background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
transform: translate(-50%, -50%);
pointer-events: none;
+ z-index: 1;
}
-@media (max-width: 768px) {
- .hero-content {
+/* Mobile */
+@media (max-width: 900px) {
+ .hero {
flex-direction: column;
- text-align: center;
+ min-height: auto;
+ justify-content: flex-start;
+ padding-top: 6rem;
}
- .hero-bio {
+ .hero-tagline {
max-width: 100%;
}
+
+ .scroll-indicator {
+ display: none;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .hero-name.is-glitching::before,
+ .hero-name.is-glitching::after {
+ animation: none;
+ }
+
+ .scroll-indicator {
+ animation: none;
+ }
+
+ .cursor {
+ animation: none;
+ }
}