hugo/themes/gohugoioTheme/layouts/showcase/single.html
Bjørn Erik Pedersen 9cc9bab462 Squashed 'docs/' changes from 2fc775dec..f97826a17
f97826a17 Merge commit '12ecbf4a1b05c2794281f47909c836b1a005bc19'
12ecbf4a1 Squashed 'themes/gohugoioTheme/' changes from ecad8247..fe71e360
aaa7ac214 Ignore .DS_Store files
0e023ca12 Remove comments in showcase front matter
f3ba5ac87 Hartwell Insurance showcase
47aefdbda Remove unnecessary duplicated words
612693b4f Some minor language fixes
a833ba15b Spelling
5972e70a9 Revert "showcase: Even smaller file"
3479b975e showcase: Even smaller file
2272e0b83 showcase: Reduce image size
718c3c3e5 Spelling
0b954eccb showcase: Pace copy-edits
baded8064 showcase: Pace
842c1cedf Add a Showcase copyright notice
c5963edaa Update installing
4fa0b0d73 Add link to showcase template
d0f303916 Add some showcase guide content
c809789b1 Add srcset to the showcase screenshots
49d875904 Start of a template
1153de221 Clean resouerces
69f00df4c Remove the showcases
653ad5bcd Add a simple byline
c5342b5e5 Regenerate image after rebase
b80669b34 Bump version in config.toml
cd5c79c67 Fix an issue where whitespace wrap caused scrollbars on some browsers
f00547e98 Add section to the title element
aa10defed Iterating on Showcase (#330)
76a0bfbc3 Add some dummy content to some of the showcase pages
66f68964d Standardize showcase metadata
627ffa6d4 Adjust showcase image size on front page
cbc3efece Redo some showcase images
054b54cb6 Use .RelPermalink and not .URL
82ba5f1c6 Add resources
d1415795b Move showcase items in list view to a template in the layout
f34620e90 Tweak details box for mobile
df6a0bf24 Include images that changed from the column shift
02036581f Improve showcase single layout
5f7730c89 Improve styling of showcase prev/next buttons
a2b2f7731 Remove extra div that was breaking mobile layout of the showcase
b172fe5f4 Add block class to to images on mobile so they behave as expected
a4ebfec86 Add a proper RSS feed to home page
0524479e0 Move showcase images to proper Resources
0544b57df Convert showcase pages to bundles
8febaab2b Add Showcase to Home page and internal pages
26d1f4542 Fix baseURL in Netlify deploy previews
046497616 Revert "Try to fix the Netlify preview baseURL setup"
80dce17ca Revert "Add some temporary baseURL debug"
8617e8692 Add some temporary baseURL debug
371e56bce Try to fix the Netlify preview baseURL setup
1b70b3f18 Add Netlify CMS to Frontends list
d6184e71d Fix menu for "What is Hugo" page
1ae83ad3e Fix mobile menu display so it shows on mid-size displays
f60e1f750 Edited slight typo, added "of"
56b906667 Fix typo
c5bea5cbd Release 0.36
00539094e releaser: Prepare repository for 0.37-DEV
b222cbdf2 releaser: Add release notes to /docs for release of 0.36
e59d1d766 releaser: Bump versions for release of 0.36
9620aa002 docs: Add documentation for smart cropping etc.
91c3801f1 Merge commit 'c305e44f5f081e4436195923a4593e396f07cd49'
8e71ff60b releaser: Prepare repository for 0.36-DEV

git-subtree-dir: docs
git-subtree-split: f97826a17209fe3e153b7f5bbf69c511e4e13203
2018-02-10 12:51: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 "details" .}}
</div>
<div class="w-100 w-60-l order-0 order-1-l">
{{template "main-column" .}}
</div>
<aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2">
{{template "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 "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 "details"}}
<div class="mt4 mt0-ns nested-links mr3-m mr4-l">
<div class="ba b--light-gray bg-white pa3">
<h1 class="f3 mt0">{{.Title}}</h1>
{{ with .Params.siteURL }}
<a href="{{ . }}" class="db f5 mb1">{{ . | replaceRE "^https?://([^/]+).*" "$1"}} {{ 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 "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}}