hugo/themes/gohugoioTheme/layouts/showcase/single.html
Bjørn Erik Pedersen 374d184e67 Squashed 'docs/' changes from f97826a17..1dc05a16b
1dc05a16b Update index.md
d73a9b3b4 Added StackImpact showcase
b0e82b3a5 Fix uglyURLs example
cf8a93728 GA track outgoing sponsor clikcs
aca59ac66 Move the sponsor banners up a little
5571673f0 Migrate from analytics.js to gtag.js
64a29b6cb Update faq.md
84704aa84 Use GOPATH variable if defined in installation from source
5f70e6ee2 Remove disableRSS etc. from the documentation
4945e7937 Remove superflous asterisks
39f6c9c28 showcase: Add 1password.com
fe0f82610 Add GitLab warning
9f26f21d2 Fix URL typo
83a91fc99 Remove duplicate release notes
133cdd313 Release 0.36.1
fbe2a2dc7 Clean images
1b02f9193 Merge branch 'temp361'
c430d2d58 Merge branch 'release-0.36.1'
dd7370fc4 releaser: Prepare repository for 0.37-DEV
72534f9ec releaser: Add release notes to /docs for release of 0.36.1
845b2cacb releaser: Bump versions for release of 0.36.1
78790fcb1 Add fluid type to showcase details box
4ef59e008 Adjust column widths to handle a wider variety of copy width
6d2e68521 Always show the latest showcase item on front page
665b1eb5e showcase: Shuffle the news items
5fef1f9b7 Escape quote
d680f0c16 Add some quotes
1722f0d5a showcase: Make the description more about Hugo
a9d43db0a Add Quiply Employee Communications App
7aaa464ec Add Quiply Employee Communications App
fad6a25dd maintenance: Show last 30
7afcfdced showcase: Set Linode date to today
0c31f481a New showcase for Linode
6c7687c2d Minor edits to the `apply` documentation
04bbff8b3 Update apply.md
f543032e3 Fix clunky sentence
218ba2a65 Some more Netlify improvements
0bd512125 Improve the Netlify versioning docs
7a708d60e Clarify Netlify's Hugo versions handling
8f86342cd Add some space
d68d4ff37 Remove now superflous warning
bf93a46ea maintenance: Add TODO list
3b5f27835 maintenance: Remove a superflous prefix
8f29ba2fb maintenance: Adjust order
105d53610 maintenance: Add TOC
29e86396b maintenance: Fix page list selection
ba51fe66d Finish the Maintenance  section
e9b0c710c Add latest changes in new spotlight section
8ccd79f61 Fix broken sentence
c77643c37 Spelling
919f2faef Remove some old troubleshooting articles
09e467f06 Add a new FAQ
ac2b25bb5 Hartwell showcase typos
5bf766993 Trim "www." from shocase URLs in title
a180cd5cb Make the inline showcase template names unique
6886982fd Merge commit '9cc9bab46288d8d5f9fda7009c5f746258cec1b4'
09728efbf Add "target" and "rel" parameters to figure shortcode

git-subtree-dir: docs
git-subtree-split: 1dc05a16bd6b99809d97daeda743d914297f908c
2018-02-21 10:00:31 +01:00

99 lines
3.1 KiB
HTML

{{ 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">
{{template "sc-details" .}}
</div>
<div class="w-100 w-60-l order-0 order-1-l ph4-l">
{{template "sc-main-column" .}}
</div>
<aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2">
{{template "sc-navigation" .}}
</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 }}
{{define "sc-main-column"}}
{{ $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}}
{{define "sc-details"}}
<div class="mt4 mt0-ns nested-links">
<div class="ba b--light-gray bg-white pa3">
<h1 class="f2-fluid mt0">{{.Title}}</h1>
{{ with .Params.siteURL }}
<a href="{{ . }}" class="db f5 mb1">{{ . | replaceRE "^https?://(www\\.)?([^/]+).*" "$2"}} {{ partial "svg/link-ext.svg" (dict "size" "10") }}</a>
{{ 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}}
{{define "sc-navigation"}}
{{$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 &raquo;
</a>
</li>
{{end}}
</ul>
{{end}}