diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-10 11:29:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-10 11:29:00 +0200 |
| commit | c42150058196f5affad5c6c590e99dd2fc7321c3 (patch) | |
| tree | cb0a7ad297128a43d32111e403959491573b6ace /layouts/section.html | |
| parent | d51e4ef7dcd8609cd008a803f9d51674ac3d3ed2 (diff) | |
| download | danixxyz-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 'layouts/section.html')
| -rw-r--r-- | layouts/section.html | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/layouts/section.html b/layouts/section.html index b9f0646..d817087 100644 --- a/layouts/section.html +++ b/layouts/section.html @@ -1,9 +1,9 @@ {{ define "main" }} - <div class="container"> - <h1>{{ .Title }}</h1> - - {{ if eq .Type "articles" }} - <div class="filter-bar"> + {{ if eq .Type "articles" }} + <!-- Articles Section with Timeline --> + <div class="page-header"> + <h1>{{ .Title }}</h1> + <div class="filter-buttons"> <button class="filter-btn active" data-filter="all">All</button> <button class="filter-btn" data-filter="tech">Tech</button> <button class="filter-btn" data-filter="life">Life</button> @@ -11,25 +11,30 @@ <button class="filter-btn" data-filter="link">Link</button> <button class="filter-btn" data-filter="photo">Photo</button> </div> + </div> - <div class="feed-list" id="articles-feed"> - {{ range .Pages.ByDate.Reverse }} - {{ $excerpt := .Params.excerpt }} - {{ if not $excerpt }} - {{ $excerpt = .Summary | plainify | truncate 150 }} - {{ end }} + {{ $featured := (.Pages.ByDate.Reverse) }} + {{ if and $featured (index $featured 0).Params.featured }} + {{ partial "featured-card.html" (dict "page" (index $featured 0)) }} + {{ end }} - {{ $data := dict "title" .Title "type" .Params.type "description" $excerpt "date" .Date "url" .RelPermalink "image" .Params.image "featured" false }} - {{ partial "post-card.html" $data }} + <section class="timeline-section"> + <div class="timeline-line"></div> + <div class="timeline-feed"> + {{ $pages := .Pages.ByDate.Reverse }} + {{ range $index, $page := $pages }} + {{ partial "timeline-item.html" (dict "page" $page "index" $index) }} {{ end }} </div> - {{ else }} - {{ .Content }} - {{ end }} - </div> + </section> - {{ if eq .Type "articles" }} {{ $filters := resources.Get "js/filters.js" | fingerprint }} <script defer src="{{ $filters.RelPermalink }}"></script> + + {{ else }} + <!-- Static Section (is/about, is/contact, etc.) --> + <div class="container-narrow" style="padding-top: 2rem;"> + {{ .Content }} + </div> {{ end }} {{ end }} |
