2018-08-20 19:07:54 +00:00
{{ define "main" }}
2018-10-01 19:38:37 +00:00
{{ $pages := .Pages }}
2019-02-05 16:33:23 +00:00
{{ with site.Params.language_alternatives }}
2018-10-01 19:38:37 +00:00
{{ range . }}
{{ with (where $.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge $p.Pages }}
{{ end }}
{{ end }}
{{ end }}
{{ $featured := (where $pages "Params.featured" true).ByWeight | first 4 }}
2018-08-20 19:07:54 +00:00
< section id = "mainContent" >
< main >
< div class = "content" >
< div class = "case-studies" >
{{ range $featured }}
2018-10-01 19:38:37 +00:00
{{ template "case-study-featured-block" (dict "ctx" $ "page" .) }}
2018-08-20 19:07:54 +00:00
{{ end }}
< / div >
< / div >
< / main >
< / section >
{{ $featuredVideos := where .Pages ".Params.video" "!=" nil }}
{{ with $featuredVideos }}
{{ with index $featuredVideos 0 }}
< section id = "video" >
< main >
< div >
< h4 > < i > "{{ .Params.quote | html }}"< / i > < / h4 >
{{ $img := .Resources.GetMatch "video.png" }}
{{ $small := .Resources.GetMatch "**small*.png" }}
{{ with $small }}< img src = "{{ .RelPermalink }}" alt = "{{ .Title }}" > {{ end }}
< / div >
< div style = "padding-left: 40px;" > < button onclick = "kub.showVideo()" > {{ with $img }}< img src = "{{ .RelPermalink }}" alt = "Box video" > {{ end }}< h6 > Kubernetes at Box< / h6 > < / button > < / div >
< / main >
< div id = "videoPlayer" >
< iframe data-url = "{{ .Params.video | safeURL }}" frameborder = "0" allowfullscreen = "true" > < / iframe >
< button id = "closeButton" > < / button >
< / div >
< / section >
{{ end }}
{{ end }}
< section id = "users" >
< main >
2018-10-01 19:38:37 +00:00
< h3 > {{ .Title }}< / h3 >
2018-08-20 19:07:54 +00:00
< div id = "usersGrid" >
2018-10-01 19:38:37 +00:00
{{ range $pages.ByTitle }}
2018-08-20 19:07:54 +00:00
{{ $logo := .Resources.GetMatch "**logo*.png" }}
{{ $p := . }}
< a target = "_blank" href = "{{ with $p.Params.content_url }}{{ . | safeURL }}{{ else }}{{ .RelPermalink }}{{ end }}" > {{ with $logo }}< img src = "{{ .RelPermalink }}" alt = "{{ $p.LinkTitle }}" > {{ else }}
2019-04-09 01:19:05 +00:00
{{ errorf "Case Studies: Missing logo for %s. Put a PNG with the word 'logo' in the filename into %q" $p.LinkTitle $p.File.Dir }}
2018-08-20 19:07:54 +00:00
{{ end }}< / a >
{{ end }}
2019-04-17 00:36:01 +00:00
< a target = "_blank" href = "https://docs.google.com/a/google.com/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform" class = "tell-your-story" > < img src = "/images/case_studies/story.png" alt = "{{ T " layouts_case_studies_list_tell " } } " > < / a >
2018-08-20 19:07:54 +00:00
< / div >
< / main >
< / section >
{{ .Content }}
{{ end }}
{{ define "case-study-featured-block" }}
2018-10-01 19:38:37 +00:00
{{ $isForeignLanguage := (ne .page.Lang .ctx.Lang)}}
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.png" }}
2018-08-20 19:07:54 +00:00
< div class = "case-study" >
{{ with $logo }}< img src = "{{ .RelPermalink }}" alt = "{{ .Title }}" > {{ end }}
2018-10-01 19:38:37 +00:00
< p class = "quote" > "{{ .page.Params.quote | html }}"< / p >
2018-10-04 00:11:55 +00:00
< a href = "{{ .page.RelPermalink }}" { { if $ isForeignLanguage } } target = "_blank" { { end } } > {{ T "main_read_about"}} {{ .page.LinkTitle }}< / a >
2018-08-20 19:07:54 +00:00
< / div >
2019-02-05 16:33:23 +00:00
{{ end }}