diff options
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 }} |
