github.com/rabbouni145/gg@v0.47.1/docs/themes/gohugoioTheme/layouts/showcase/list.html (about) 1 {{ define "main" }} 2 <div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns "> 3 <article class="cf pa3 pa4-m pa4-l nested-copy-line-height nested-img"> 4 <h1 class="primary-color-dark"> 5 {{ .Title }} 6 </h1> 7 <div class="nested-copy-line-height"> 8 {{ .Content }} 9 </div> 10 </article> 11 <section class="flex-ns flex-wrap justify-between w-100 v-top"> 12 {{ range (.Paginate (.Pages | shuffle ) 20).Pages }} 13 {{template "showcase_items" .}} 14 {{ end }} 15 </section> 16 <div class="nested-list-reset nested-links"> 17 {{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}} 18 {{ template "_internal/pagination.html" . }} 19 </div> 20 <div class="dib f3 mt4">The Showcase articles are copyright the content authors. Any open source license will be attached.</div> 21 </div> 22 {{ end }} 23 24 25 {{define "showcase_items"}} 26 <a href="{{.Permalink}}" class="b--moon-gray ba bg-animate bg-white db flex-auto-ns hover-bg-near-white mb3 mr3 w-100 w-30-l" style="max-width: 1024px;"> 27 <div class="flex flex-column black h-100 mb2 pa3 pa4-l"> 28 {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} 29 {{ with $img }} 30 {{ $big := .Fill "1024x512 top" }} 31 {{ $small := $big.Resize "512x" }} 32 <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYwMCIgaGVpZ2h0PSI5MDAiIHZpZXdCb3g9IjAgMCAxNjAwIDkwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48dGl0bGU+UmVjdGFuZ2xlPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMTYwMCIgaGVpZ2h0PSI5MDAiLz48L2c+PC9zdmc+" 33 data-sizes="auto" 34 data-srcset="{{ $small.RelPermalink }} 1x, 35 {{ $big.RelPermalink }} 2x" data-bg="{{ $small.RelPermalink }}" class="grow img lazyload" style="display: block; width: 100%; height: auto;" /> 36 {{end}} 37 <div style="margin-top:auto;">{{/* the margin aligns to the bottom */}} 38 <h2 class="dib f3 mt4"> 39 {{- .Title -}} 40 </h2> 41 </div> 42 </div> 43 </a> 44 45 46 {{end}}