hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

boxes-small-news.html (904B)

    1 <section class="relative w-100 bg-black white">
    2   <div class="flex flex-wrap w-90-l center center mw9">
    3     <!-- <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">
    4       Latest News:
    5     </a> -->
    6     {{ range first 4 ( sort (where .Site.RegularPages "Section" "news") "Date" "desc" ) }}
    7       <!-- only show 2 boxes on mobile -->
    8       {{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
    9       <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 }}">
   10         <span class="f6 gray pb1 db">
   11           {{ .Date.Format "January 2, 2006" }}
   12         </span>
   13         {{ .Params.description | markdownify | truncate 100 "…"}}
   14       </a>
   15     {{ end }}
   16 
   17   </div>
   18 </section>