UNPKG

oxil-net1

Version:
66 lines (58 loc) 2.67 kB
{{- $author := slice (.Get "author") -}} {{- $rank := .Get "rank" -}} {{- $first := first 1 (intersect (where .Site.Pages.ByDate.Reverse "Section" "blog") (intersect (where .Site.Pages.ByDate.Reverse "Params.authors" "intersect" $author) (where .Site.Pages.ByDate.Reverse "Params.headline" "eq" $rank))) -}} {{- range $first -}} {{- if eq $rank "top" -}} {{- $img := .Resources.GetMatch "*featured*" -}} {{- $permalink := .RelPermalink -}} <ul class="unstyled small uppercase "> {{- range .Params.categories -}} <li class="mb0 com"><a class="inv normal g6-text" href="/categories/{{ . | urlize }}/">{{.}}</a></li> {{- end -}} </ul> <h2 class="w-75"><a class="inv font-color bold" href="{{.RelPermalink}}">{{.Title}}</a></h2> <time class="tiny ga-text my2 blk" datetime="{{ dateFormat "2006-01-02T15:04:05-07:00" (default .Date (.Lastmod)) }}"> {{- if ne .PublishDate .Lastmod }}Updated: {{end}}{{ dateFormat "2 Jan, 2006" (default .Date (.Lastmod)) -}} </time> {{- with $img -}} {{- $small := .Resize "600x" -}} <div class="aspect sixteen-nine "> <img class="cover abs" src="{{ $small.RelPermalink }}" alt="{{ $img.Title }}"></img> <a href="{{$permalink}}" class="link-over"></a> </div> {{- end -}} {{- with .Params.featuredcaption -}} <p class="tiny">{{.}}</p> {{- end -}} <p>{{.Description}}</p> <p><a href="{{.RelPermalink}}" class="inv">Read the full article <i class="net-chevron-right"></i></a></p> {{- else -}} <div class="flex flex-grid"> <div class="w-33 pr050l"> <h4><a class="inv font-color bold" href="{{.RelPermalink}}">{{.Title}}</a></h4> <p>{{.Description}}</p> <p class="tiny muted-text"> <time class="small ga-text" datetime="{{ dateFormat "2006-01-02T15:04:05-07:00" (default .Date (.Lastmod)) }}"> {{ if ne .PublishDate .Lastmod }}Updated: {{end}}{{ dateFormat "2 Jan, 2006" (default .Date (.Lastmod)) }} </time>&nbsp;|&nbsp; {{- range .Params.categories -}} <a class="inv normal g6-text" href="/categories/{{ . | urlize }}/">{{.}}</a> {{- end -}} </p> </div> <div class="w-66 pl050l"> {{ $img := .Resources.GetMatch "*featured*" }} {{ $permalink := .RelPermalink }} {{ with $img }} {{ $small := .Resize "600x" }} <div class="aspect sixteen-nine "> <img class="cover abs" src="{{ $small.RelPermalink }}" alt="{{ $img.Title }}"></img> <a href="{{$permalink}}" class="link-over"></a> </div> {{end}} {{with .Params.featuredcaption}} <p class="tiny">{{.}}</p> {{end}} </div> </div> {{- end -}} {{- end -}}