Files
landing_page/qdrant-landing/themes/qdrant/layouts/partials/recent_news.html
T
trean 817a8da5a0 Recent news (#33)
* added recent news to the article page

* changed some css to scss for more convenient use of blocks

* added recent news to the article page

* changed some css to scss for more convenient use of blocks

* tags, link on image, link on categories
2022-04-21 11:28:55 +02:00

34 lines
1.2 KiB
HTML

<div class="col-12">
<div class="sidebar-widget">
<div class="widget-title">
<h4>Recent News</h4>
</div>
{{ range where (where site.Pages "Section" "blog") ".Params.featured" "=" true | first 3 }}
{{ $link := .Permalink }}
{{ if .Params.external_link }}
{{ $link = .Params.external_link }}
{{ end }}
<article class="post-preview">
<div class="post-preview__description">
<a class="post-preview__thumb" href="{{ $link }}">
<img class="post-preview__img" src="{{ .Params.preview_image }}" alt="">
</a>
{{ if .Params.Categories }}
{{ range .Params.Categories | first 1 }}
<a href='{{ "/categories/" | relLangURL }}{{ . | urlize }}' class="post-preview__title">{{ . }}</a>
{{ end }}
{{ end }}
<div class="post-preview__text"><a class="post-preview__link" href="{{ $link }}">{{ .Title }}</a></div>
{{ if .Params.Tags }}
{{ range .Params.Tags }}
<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}' class="post-preview__tags">#{{ . }}</a>
{{ end }}
{{ end }}
</div>
</article>
{{ end }}
</div>
</div>