Files
landing_page/qdrant-landing/themes/qdrant-2024/layouts/partials/qdrant-blog-posts.html
T
trean 6c4f2bb72c moved pricing pages files
# Conflicts:
#	qdrant-landing/themes/qdrant-2024/layouts/partials/testimonial-light.html
2026-03-11 23:33:42 +01:00

60 lines
1.9 KiB
HTML

<section class="qdrant-blog-posts">
<div class="container">
<div class="qdrant-blog-posts__articles row gx-5">
{{ $all := ($.Site.GetPage "blog" .Section).Pages.ByPublishDate.Reverse }}
<!-- Remove first 4 featured posts from $all -->
{{ $featured := where $all ".Params.featured" true }}
{{ $notFeatured := where $all ".Params.featured" false }}
<!-- All but first 4 featured posts -->
{{ $oldFeatured := after 4 $featured }}
<!-- Concatenate old featured post with all non-featured -->
{{ $allBut4Featured := $oldFeatured | append $notFeatured }}
<!-- Sort by publish date again -->
{{ $allBut4Featured := $allBut4Featured.ByPublishDate.Reverse }}
{{ $paginator := .Paginate $allBut4Featured 9 }}
{{ range $paginator.Pages }}
{{ .Scratch.Set "scope" "list" }}
{{ $link := .Permalink }}
{{ if .Params.external_link }}
{{ $link = .Params.external_link }}
{{ end }}
<article class="qdrant-blog-posts__article post col-12 col-lg-4">
<a class="post-link" href="{{ .RelPermalink }}">
{{ if .Params.preview_image }}
<div class="post-preview">
{{ partial "preview-image" (dict "context" . "default_file_name" "preview.jpg" "preview_file" .Params.small_preview_image) }}
</div>
{{ end }}
<h6 class="post-title">{{ .Params.title }}</h6>
<p class="post-description">{{ .Params.description }}</p>
<div class="post-about">
<p>{{ .Params.author }}</p>
<p>{{ time.Format "January 02, 2006" .Date }}</p>
</div>
</a>
</article>
{{ end }}
</div>
<div class="row">
<div class="qdrant-blog-posts__pagination col-12">
{{ if gt $paginator.TotalPages 1 }}
{{ partial "pagination" $paginator }}
{{ end }}
</div>
</div>
</div>
</section>