2018-02-10 06:51:31 -05:00
|
|
|
{{ define "title" }}
|
|
|
|
Showcase: {{ .Title }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
|
|
|
<article class="center ph3 ph4-ns pv3 pv5-ns mw9">
|
|
|
|
|
|
|
|
<!-- header spans the full width -->
|
|
|
|
<div class="flex flex-wrap">
|
|
|
|
|
|
|
|
<div class="w-100 w-20-l order-1 order-0-l">
|
2018-02-21 04:00:31 -05:00
|
|
|
{{template "sc-details" .}}
|
2018-02-10 06:51:31 -05:00
|
|
|
</div>
|
|
|
|
|
2018-02-21 04:00:31 -05:00
|
|
|
<div class="w-100 w-60-l order-0 order-1-l ph4-l">
|
|
|
|
{{template "sc-main-column" .}}
|
2018-02-10 06:51:31 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2">
|
2018-02-21 04:00:31 -05:00
|
|
|
{{template "sc-navigation" .}}
|
2018-02-10 06:51:31 -05:00
|
|
|
</aside>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="f6 gray mv6">{{/* bottom row */}}
|
|
|
|
Last Update: {{ .Lastmod.Format "January 2, 2006" }} <br>
|
|
|
|
{{ partial "page-edit.html" . }}
|
|
|
|
</div>
|
|
|
|
<div class="b">The Showcase articles are copyright the content authors. Any open source license will be attached.</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-21 04:00:31 -05:00
|
|
|
{{define "sc-main-column"}}
|
2018-02-10 06:51:31 -05:00
|
|
|
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
|
|
|
|
{{ with $img }}
|
|
|
|
{{ $big := .Fill "1024x512 top" }}
|
|
|
|
{{ $small := $big.Resize "512x" }}
|
|
|
|
<img srcset="{{ $small.RelPermalink }} 1x, {{ $big.RelPermalink }} 2x" alt="{{ $img.Title }}" width="{{ $big.Width }}" class="mw-100 b--light-gray ba">
|
|
|
|
{{ end }}
|
|
|
|
<div class="mid-gray nested-copy-line-height nested-img nested-links">
|
|
|
|
{{with .Params.byline }}
|
|
|
|
<div style="margin-top: 20px; font-style: italic;">By {{ . | markdownify -}}</div>
|
|
|
|
{{ end }}
|
|
|
|
{{with .Content}}
|
|
|
|
{{- . -}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{end}}
|
|
|
|
|
2018-02-21 04:00:31 -05:00
|
|
|
{{define "sc-details"}}
|
|
|
|
<div class="mt4 mt0-ns nested-links">
|
2018-02-10 06:51:31 -05:00
|
|
|
<div class="ba b--light-gray bg-white pa3">
|
2018-02-21 04:00:31 -05:00
|
|
|
<h1 class="f2-fluid mt0">{{.Title}}</h1>
|
2018-02-10 06:51:31 -05:00
|
|
|
{{ with .Params.siteURL }}
|
2018-02-21 04:00:31 -05:00
|
|
|
<a href="{{ . }}" class="db f5 mb1">{{ . | replaceRE "^https?://(www\\.)?([^/]+).*" "$2"}} {{ partial "svg/link-ext.svg" (dict "size" "10") }}</a>
|
2018-02-10 06:51:31 -05:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Params.siteSource }}
|
|
|
|
<a href="{{ . }}" class="db mb4">source {{ partial "svg/link-ext.svg" (dict "size" "10") }}</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ $bio := (.Resources.ByType "page").GetMatch "bio*" }}
|
|
|
|
{{ with $bio }}
|
|
|
|
<div class="f6 mid-gray nested-copy-line-height nested-links">
|
|
|
|
{{- .Content -}}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="b--light-gray bt dn-l pt3">
|
|
|
|
<div class="f6 gray mb2">Previous/Next</div>
|
|
|
|
{{- partial "previous-next-links-in-section-with-title.html" . -}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2018-02-21 04:00:31 -05:00
|
|
|
{{define "sc-navigation"}}
|
2018-02-10 06:51:31 -05:00
|
|
|
{{$section := where .Site.RegularPages "Section" .Section}}
|
|
|
|
{{$number_of_entries := $section | len}}
|
|
|
|
<ul class="pa0 list">
|
|
|
|
<li class="b f5 blTK b--light-gray pb2 pl2">
|
|
|
|
More Sites
|
|
|
|
</li>
|
|
|
|
{{range first 20 $section}}
|
|
|
|
<li class="bl b--light-gray pl2 f6 hover-bg-light-gray hover-accent-color-light {{if eq $ .}} bg-light-gray{{end}}">
|
|
|
|
<a href="{{.RelPermalink}}" class="db link w-100 pv1 ph1 {{ if eq $ . }} b primary-color{{else}} mid-gray {{end}}">
|
|
|
|
{{- .Title -}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
{{if ge $number_of_entries 20}}
|
|
|
|
<li class="mt3">
|
|
|
|
<a href="/showcase/page/2/" class="link blue">
|
|
|
|
See More »
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
{{end}}
|