github.com/rabbouni145/gg@v0.47.1/docs/themes/gohugoioTheme/layouts/showcase/single.html (about) 1 {{ define "title" }} 2 Showcase: {{ .Title }} 3 {{ end }} 4 5 {{ define "main" }} 6 <article class="center ph3 ph4-ns pv3 pv5-ns mw9"> 7 8 <!-- header spans the full width --> 9 <div class="flex flex-wrap"> 10 11 <div class="w-100 w-20-l order-1 order-0-l"> 12 {{template "sc-details" .}} 13 </div> 14 15 <div class="w-100 w-60-l order-0 order-1-l ph4-l"> 16 {{template "sc-main-column" .}} 17 </div> 18 19 <aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2"> 20 {{template "sc-navigation" .}} 21 </aside> 22 23 </div> 24 25 <div class="f6 gray mv6">{{/* bottom row */}} 26 Last Update: {{ .Lastmod.Format "January 2, 2006" }} <br> 27 {{ partial "page-edit.html" . }} 28 </div> 29 <div class="b">The Showcase articles are copyright the content authors. Any open source license will be attached.</div> 30 </article> 31 {{ end }} 32 33 34 35 {{define "sc-main-column"}} 36 {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} 37 {{ with $img }} 38 {{ $big := .Fill "1024x512 top" }} 39 {{ $small := $big.Resize "512x" }} 40 <img srcset="{{ $small.RelPermalink }} 1x, {{ $big.RelPermalink }} 2x" alt="{{ $img.Title }}" width="{{ $big.Width }}" class="mw-100 b--light-gray ba"> 41 {{ end }} 42 <div class="mid-gray nested-copy-line-height nested-img nested-links"> 43 {{with .Params.byline }} 44 <div style="margin-top: 20px; font-style: italic;">By {{ . | markdownify -}}</div> 45 {{ end }} 46 {{with .Content}} 47 {{- . -}} 48 {{end}} 49 </div> 50 51 {{end}} 52 53 {{define "sc-details"}} 54 <div class="mt4 mt0-ns nested-links"> 55 <div class="ba b--light-gray bg-white pa3"> 56 <h1 class="f2-fluid mt0">{{.Title}}</h1> 57 {{ with .Params.siteURL }} 58 <a href="{{ . }}" class="db f5 mb1">{{ . | replaceRE "^https?://(www\\.)?([^/]+).*" "$2"}} {{ partial "svg/link-ext.svg" (dict "size" "10") }}</a> 59 {{ end }} 60 {{ with .Params.siteSource }} 61 <a href="{{ . }}" class="db mb4">source {{ partial "svg/link-ext.svg" (dict "size" "10") }}</a> 62 {{ end }} 63 {{ $bio := (.Resources.ByType "page").GetMatch "bio*" }} 64 {{ with $bio }} 65 <div class="f6 mid-gray nested-copy-line-height nested-links"> 66 {{- .Content -}} 67 </div> 68 {{ end }} 69 </div> 70 <div class="b--light-gray bt dn-l pt3"> 71 <div class="f6 gray mb2">Previous/Next</div> 72 {{- partial "previous-next-links-in-section-with-title.html" . -}} 73 </div> 74 </div> 75 {{end}} 76 77 {{define "sc-navigation"}} 78 {{$section := where .Site.RegularPages "Section" .Section}} 79 {{$number_of_entries := $section | len}} 80 <ul class="pa0 list"> 81 <li class="b f5 blTK b--light-gray pb2 pl2"> 82 More Sites 83 </li> 84 {{range first 20 $section}} 85 <li class="bl b--light-gray pl2 f6 hover-bg-light-gray hover-accent-color-light {{if eq $ .}} bg-light-gray{{end}}"> 86 <a href="{{.RelPermalink}}" class="db link w-100 pv1 ph1 {{ if eq $ . }} b primary-color{{else}} mid-gray {{end}}"> 87 {{- .Title -}} 88 </a> 89 </li> 90 {{end}} 91 {{if ge $number_of_entries 20}} 92 <li class="mt3"> 93 <a href="/showcase/page/2/" class="link blue"> 94 See More » 95 </a> 96 </li> 97 {{end}} 98 </ul> 99 {{end}}