You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openpower.foundation_sw_dev/themes/openpowerfoundation/layouts/index.html

101 lines
3.8 KiB
HTML

{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ $promobackgroundimagename := .Param "promo.image" }}
{{ $promobackgroundimagelocation := (printf "%s/%s" "images/home/" $promobackgroundimagename) }}
{{ $promobackgroundimageresource := resources.Get $promobackgroundimagelocation }}
{{ $promobackgroundimage := $promobackgroundimageresource.Resize "3840x2160 webp" }}
<section class="home promo__section d-flex flex-column justify-content-center" style="background-image:url({{ $promobackgroundimage.RelPermalink }})" >
<div class="promo__container container text-center">
<h1>{{ .Param "promo.header" }}</h1>
{{ range .Param "promo.p" }}
<p>{{ . | safeHTML }}</p>
{{ end }}
<p>
{{ range .Param "promo.calltoaction" }}
<a class="btn btn-light btn-outline-primary" href="{{ .link | relURL }}">{{ .title }}</a>
{{ end }}
</p>
</div>
</section>
<main id="main" class="main home" >
<div class="container">
{{ range .Params.articles }}
<div class="row {{ if .reverse }}flex-md-row-reverse{{ end }}">
<div class="col-md-6 mb-4 mb-lg-5">
{{ $articleimagename := .image }}
{{ $articleimagelocation := (printf "%s/%s" "images/home/" $articleimagename) }}
{{ $articleimageresource := resources.Get $articleimagelocation }}
{{ $articleimage := $articleimageresource.Resize "600x400 webp" }}
<img class="img-fluid" src="{{ $articleimage.RelPermalink }}" width="600" height="400" alt="{{ .header }}">
</div>
<div class="col-md-6 mb-3 mb-lg-5">
<h2>{{ .header }}</h2>
{{ range .lead }}
<p><b>{{ .title }}</b><br>{{ .p }}</p>
{{ end }}
</div>
</div>
{{ end }}
</div>
</main>
<section class="teaser__section pt-0 pb-3 pb-lg-5">
<div class="container">
<h2 class="teaser__title text-lg-center">{{ .Param "sections.title" }}</h2>
<div class="row text-center">
{{ range .Param "sections.section" }}
<article class="post__article col-md-4">
<div class="post__thumb">
{{ $sectionimagename := .image }}
{{ $sectionimagelocation := (printf "%s/%s" "images/home/" $sectionimagename) }}
{{ $sectionimageresource := resources.Get $sectionimagelocation }}
{{ $sectionimage := $sectionimageresource.Resize "390x390 webp" }}
<img class="img-fluid" src="{{ $sectionimage.RelPermalink }}" width="390" height="390" alt="{{ .title }}">
</div>
<a class="post__title" href="{{ .link }}">{{ .title }}</a>
</article>
{{ end }}
<p class="text-center mt-3 mt-lg-0">
{{ range .Param "sections.buttons" }}
<a class="btn btn-outline-primary" href="{{ .link | relURL }}">{{ .title }}</a>
{{ end }}
</p>
</div>
</section>
<section class="teaser__section _dark">
<div class="container text-center">
{{ range .Param "dark" }}
<p class="h2 mb-4">{{ . }}</p>
{{ end }}
</div>
</section>
<section class="teaser__section py-4 py-lg-5 my-lg-5">
<div class="container">
<h2 class="teaser__title text-center">{{ .Param "sections.section-supporters.title" }}</h2>
<div class="row justify-content-center">
{{ range where .Site.RegularPages "Section" "members" }}
{{ $level := .Param "level" }}
{{ if eq $level "platinum" }}
{{ if .Param "image" }}
{{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "185x102 Center webp" }}
<div class="col-md-2 pb-3 pb-lg-0 text-valign-center">
<img class="img-fluid" src="{{ $image.RelPermalink }}" width="180" height="102" alt="{{ .Title }}">
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</section>
<section class="teaser__section _navy py-4 py-lg-5 my-lg-5">
<div class="container text-center pb-4 pb-lg-0">
<h2 class="teaser__title">{{ .Param "subscribe.title" }}</h2>
{{ range .Param "subscribe.p" }}
<p>{{ . }}</p>
{{ end }}
</div>
</section>
{{ partial "footer.html" . }}