hugo/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/boxes-small-news.html
Bjørn Erik Pedersen 5ac0f751aa Squashed 'docs/' changes from 0584815c8..723da4a37
723da4a37 Vendor the theme

git-subtree-dir: docs
git-subtree-split: 723da4a3769ee8a6c02758b553618143f92fccef
2019-10-21 10:52:23 +02:00

18 lines
904 B
HTML

<section class="relative w-100 bg-black white">
<div class="flex flex-wrap w-90-l center center mw9">
<!-- <a href="/news/" class="link accent-color tr-ns f6 w-100 w-50-m w-10-l bg-animate hover-bg-accent-color hover-white pv3 pv4-l ph3 ph4-l dib">
Latest News:
</a> -->
{{ range first 4 ( sort (where .Site.RegularPages "Section" "news") "Date" "desc" ) }}
<!-- only show 2 boxes on mobile -->
{{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
<a href="{{ .RelPermalink }}" class="link lh-copy light-gray f6 w-100 w-50-m w-25-l bg-animate hover-bg-accent-color hover-white pv3 pv4-ns ph3 ph4-ns{{ if ge $i 3 }} dn dib-l{{ else }} dib{{ end }}">
<span class="f6 gray pb1 db">
{{ .Date.Format "January 2, 2006" }}
</span>
{{ .Params.description | markdownify | truncate 100 "…"}}
</a>
{{ end }}
</div>
</section>