refactor home to be modular

* change images from static to processed
* better content management

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1693381142243034077/jamesk-patch-1
Toshaan Bharvani 3 years ago
parent f971ade705
commit 13f0358473

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@ -1,65 +1,53 @@
--- ---
title: 'Home' title: Home
date: 2021-07-17 promo:
type: home header: OpenPOWER Foundation
layout: single p:

- Create the Future with POWER
promo-h1: OpenPOWER Foundation calltoaction: Join us
promo-p1: Create the Future with POWER image: promobg.jpg
promo-cta: Join us articles:

- header: Open Innovation
article-1: image: openinnovation.jpg
header: Open Innovation reverse: false
p-1: The OpenPOWER Foundation is the catalyst for technical collaboration today - fostering complete collaboration, accelerating innovation and driving resiliency across the industry. By combining a 20-year history of hardware and software expertise with a completely open ecosystem, The OpenPOWER Foundation is the only organization equipped with deep institutional knowledge and a straight forward approach to innovation. lead:
article-2: - title:
header: The POWER Play p: The OpenPOWER Foundation is the catalyst for technical collaboration today - fostering complete collaboration, accelerating innovation and driving resiliency across the industry. By combining a 20-year history of hardware and software expertise with a completely open ecosystem, The OpenPOWER Foundation is the only organization equipped with deep institutional knowledge and a straight forward approach to innovation.
lead-1: Industry Proven - header: The POWER Play
p-1: image: powerplay.jpg
By open sourcing and developing on the POWER ISA - one of the most sophisticated processor architectures reverse: true
available - the OpenPOWER Foundation is democratizing access and extending the reach of the RISC-based lead:
architecture. - title: Industry Proven
lead-2: Open for All p: >
p-2: By open sourcing and developing on the POWER ISA - one of the most sophisticated processor architectures available -
With more than 350 members collaborating regularly, the entire semiconductor industry - from global the OpenPOWER Foundation is democratizing access and extending the reach of the RISC-based architecture.'
organizations with deep expertise to individual creators with a new lens - can innovate with choice and build - title: Open for All
and develop across the full Hardware and Software stack. p: >
lead-3: Complete Equation With more than 350 members collaborating regularly, the entire semiconductor industry - from global
p-3: organizations with deep expertise to individual creators with a new lens - can innovate with choice and build
Open development of this scale enables unprecedented customization across applications, operating systems and and develop across the full Hardware and Software stack.
firmware - driving hundreds of innovations across artificial intelligence, supercomputing, hyperscale and - title: Complete Equation
more. p: >

Open development of this scale enables unprecedented customization across applications, operating systems and firmware -
driving hundreds of innovations across artificial intelligence, supercomputing, hyperscale and more.
sections: sections:
section-1: title: Build across the entire stack
title: Build across the entire stack section:
article-1: - title: Software
image: ./img/thumb-1.jpg image: software.jpg
text: Software link: /tags/software
url: / - title: Silicon
article-2: image: silicon.jpg
image: ./img/thumb-2.jpg link: /tags/silicon
text: Silicon - title: Systems
url: / image: systems.jpg
article-3: link: /tags/systems
image: ./img/thumb-3.jpg dark:
text: Systems - With its open ecosystem approach, active participation from its global membership base and powerful foundation of the POWER ISA, the OpenPOWER Foundation is the premiere organization to facilitate truly effective collaboration and drive meaningful, accessible innovation across the open hardware industry.
url: / subscribe:
section-dark: title: Subscribe to the OpenPOWER newsletter.
p-1: With its open ecosystem approach, active participation from its global membership base and powerful foundation of the POWER ISA, the OpenPOWER Foundation is the premiere organization to facilitate truly effective collaboration and drive meaningful, accessible innovation across the open hardware industry. p:
section-supporters: - Sign up with your email address to receive news and updates.
title: Supporters of OpenPOWER date: 2022-01-03
logos:
- title: image
image: 180x102.png
- title: image
image: 180x102.png
- title: image
image: 180x102.png
- title: image
image: 180x102.png

section-subscribe:
title: Subscribe to the OpenPOWER newsletter.
p-1: Sign up with your email address to receive news and updates.
draft: false draft: false
--- ---

@ -4941,24 +4941,30 @@ textarea.form-control-lg {
display: none !important; } } display: none !important; } }


#main:not(.groups) { #main:not(.groups) {
padding-top: 140px; padding-top: 100px;
} }
.main { .main {
padding: 3.75rem 0; padding: 3.75rem 0;
padding-top: 100px; } padding-top: 10px;
}


.social__list { .social__list {
display: flex; } display: flex;

}
.social__item { .social__item {
display: block; display: block;
width: 28px; width: 32px;
height: 28px; height: 32px;
border-radius: 0.25rem; border-radius: 0.25rem;
background-position: 50% 50%; background-position: 50% 50%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 50% auto; background-size: 50% auto;
background-color: #fff; } background-color: #fff;
}
.social__item i {
padding-left: 5px;
color: #2566f4;
}
.social__item:not(:last-child) { .social__item:not(:last-child) {
margin-right: .5em; } margin-right: .5em; }
.social__item._tw { .social__item._tw {

@ -60,112 +60,87 @@ color: black;
} }


// Join // Join

.join { .join {

.membership-data {
.membership-data { table {

margin:auto;
table { width:100%;
margin:auto; tr {
width:100%; td {

padding: 10px;
tr { }

&:nth-child(odd) {
td { background-color: $white;
padding: 10px; }
} &:nth-child(even) {

background-color: $lightgrey;

}
&:nth-child(odd) { th {
background-color: $white; padding: 10px;
} background-color: #dfecf5;

&:nth-of-type(1) {
&:nth-child(even) { width: 15%;
background-color: $lightgrey; }
} &:nth-of-type(2) {

width: 20%;
th { }
padding: 10px; &:nth-of-type(3) {
background-color: #dfecf5; width: 5%;

}
&:nth-of-type(1) { &:nth-of-type(4) {
width: 20%; width: 35%;
} }
&:nth-of-type(2) { }
width: 15%; }
} }

}
&:nth-of-type(3) { .benefits-data {
width: 25%; table {
} margin:auto;

width:100%;
&:nth-of-type(4) { tr {
width: 35%; td {
} padding: 10px;
} position: relative;
} span {
} position: absolute;
} width: 225px;

display: block;
.benefits-data { top: 10px;

left: 10px;
table { }
margin:auto; }
width:100%; &:nth-child(odd) {

background-color: $white;
tr { }

&:nth-child(even) {
td { background-color: $lightgrey;
padding:10px; }
position: relative; th {

padding:10px;
span { background-color: #dfecf5;
position: absolute; &:nth-of-type(1) {
width: 225px; width: 60%;
display: block; }
top: 10px; &:nth-of-type(2) {
left: 10px; width: 8%;
} }
} &:nth-of-type(3) {

width: 8%;
&:nth-child(odd) { }
background-color: $white; &:nth-of-type(4) {
} width: 8%;

}
&:nth-child(even) { &:nth-of-type(5) {
background-color: $lightgrey; width: 8%;
} }
&:nth-of-type(6) {
th { width: 8%;
padding:10px; }
background-color: #dfecf5; }

}
&:nth-of-type(1) { }
width: 60%; }
}
&:nth-of-type(2) {
width: 8%;
}

&:nth-of-type(3) {
width: 8%;
}

&:nth-of-type(4) {
width: 8%;
}
&:nth-of-type(5) {
width: 8%;
}
&:nth-of-type(6) {
width: 8%;
}
}
}
}
}
} }


// Board of Directors // Board of Directors

@ -1,83 +1,69 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}

{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}

{{ $promobackgroundimagename := .Param "promo.image" }}
{{ partial "home-promo.html" . }} {{ $promobackgroundimagelocation := (printf "%s/%s" "images/home/" $promobackgroundimagename) }}

{{ $promobackgroundimageresource := resources.Get $promobackgroundimagelocation }}
<main id="main" class="main home" > {{ $promobackgroundimage := $promobackgroundimageresource.Resize "3840x2160 webp" }}
<div class="container"> <section class="home promo__section d-flex flex-column justify-content-center" style="background-image:url({{ $promobackgroundimage.RelPermalink }})" >
<div class="row"> <div class="promo__container container text-center">
<div class="col-md-6 mb-4 mb-lg-5"> <h1>{{ .Param "promo.header" }}</h1>
<img class="img-fluid" src="./img/thumb-4.jpg" width="600" height="420" alt=""> {{ range .Param "promo.p" }}
</div> <p>{{ . }}</p>
<div class="col-md-6 mb-3 mb-lg-5"> {{ end }}
<h2>{{ .Param "article-1.header" }}</h2> <p><a class="btn btn-light btn-outline-primary" href="{{ "/join/" | relURL }}">{{ .Param "promo.calltoaction" }}</a></p>
<p><b>{{ .Param "article-1.lead-1" }}</b> {{ .Param "article-1.p-1" }}</p> </div>
<p><b>{{ .Param "article-1.lead-2" }}</b> {{ .Param "article-1.p-2" }}</p> </section>
</div> <main id="main" class="main home" >
</div> <div class="container">
<div class="row flex-md-row-reverse"> {{ range .Params.articles }}
<div class="col-md-6 mb-4 mb-lg-5"> <div class="row {{ if .reverse }}flex-md-row-reverse{{ end }}">
<img class="img-fluid" src="./img/thumb-5.jpg" width="600" height="420" alt=""> <div class="col-md-6 mb-4 mb-lg-5">
</div> {{ $articleimagename := .image }}
<div class="col-md-6 mb-0"> {{ $articleimagelocation := (printf "%s/%s" "images/home/" $articleimagename) }}
<h2>{{ .Param "article-2.header" }}</h2> {{ $articleimageresource := resources.Get $articleimagelocation }}
<h3>{{ .Param "article-2.lead-1" }}</h3> {{ $articleimage := $articleimageresource.Resize "600x400 webp" }}
<p>{{ .Param "article-2.p-1" }}</p> <img class="img-fluid" src="{{ $articleimage.RelPermalink }}" width="600" height="400" alt="{{ .header }}">
<h3>{{ .Param "article-2.lead-2" }}</h3> </div>
<p>{{ .Param "article-2.p-2" }}</p> <div class="col-md-6 mb-3 mb-lg-5">
<h3>{{ .Param "article-2.lead-3" }}</h3> <h2>{{ .header }}</h2>
<p>{{ .Param "article-2.p-3" }}</p> {{ range .lead }}
</div> <p><b>{{ .title }}</b><br>{{ .p }}</p>
</div> {{ end }}
</div> </div>
</div>
{{ end }}
</div>
</main> </main>
<section class="teaser__section pt-0 pb-3 pb-lg-5"> <section class="teaser__section pt-0 pb-3 pb-lg-5">
<div class="container"> <div class="container">
<h2 class="teaser__title text-lg-center">{{ .Param "sections.section-1.title" }}</h2> <h2 class="teaser__title text-lg-center">{{ .Param "sections.title" }}</h2>
<div class="row text-center"> <div class="row text-center">

{{ range .Param "sections.section" }}
<!-- {{ range (.Data.Pages.ByParam "wgtype").Reverse }} <article class="post__article col-md-4">
{{ $imagename := .Param "image" }} <div class="post__thumb">
{{ $imagelocation := (printf "%s/%s" "images/" $imagename) }} {{ $sectionimagename := .image }}
{{ $imageresource := resources.Get $imagelocation }} {{ $sectionimagelocation := (printf "%s/%s" "images/home/" $sectionimagename) }}
<article class="post__article col-md-4"> {{ $sectionimageresource := resources.Get $sectionimagelocation }}
{{ if $imageresource }} {{ $sectionimage := $sectionimageresource.Resize "390x390 webp" }}
<div class="post__thumb"> <img class="img-fluid" src="{{ $sectionimage.RelPermalink }}" width="390" height="390" alt="{{ .title }}">
{{ $image := $imageresource.Fit "390x390" }} </div>
<img class="img-fluid" src="{{ $image.RelPermalink }}" width="390" height="390" alt=""> <a class="post__title" href="{{ .link }}">{{ .title }}</a>
{{ end }} </article>
</div><a class="post__title" href="{{ .Permalink }}">{{ .Title }}</a> {{ end }}
</article> <p class="text-center mt-3 mt-lg-0"><a class="btn btn-outline-primary" href="{{ "/groups/" | relURL }}">Working Groups</a></p>
</div>
{{ end }} -->
<article class="post__article col-md-4">
<div class="post__thumb"><img class="img-fluid" src="./img/thumb-1.jpg" width="390" height="390" alt="">
</div><a class="post__title" href="/">{{ .Param "sections.section-1.article-1.text" }}</a>
</article>
<article class="post__article col-md-4">
<div class="post__thumb"><img class="img-fluid" src="./img/thumb-2.jpg" width="390" height="390" alt="">
</div><a class="post__title" href="/">{{ .Param "sections.section-1.article-2.text" }}</a>
</article>
<article class="post__article col-md-4">
<div class="post__thumb"><img class="img-fluid" src="./img/thumb-3.jpg" width="390" height="390" alt="">
</div><a class="post__title" href="/">{{ .Param "sections.section-1.article-3.text" }}</a>
</article>
</div>
<p class="text-center mt-3 mt-lg-0">
<a class="btn btn-outline-primary" href="{{ "/groups/" | relURL }}">Working Groups</a>
</p>
</div>
</section> </section>
<section class="teaser__section _dark"> <section class="teaser__section _dark">
<div class="container text-center"> <div class="container text-center">
<p class="h2 mb-4">{{ .Param "sections.section-dark.p-1" }}</p> {{ range .Param "dark" }}
</div> <p class="h2 mb-4">{{ . }}</p>
{{ end }}
</div>
</section> </section>
<section class="teaser__section py-4 py-lg-5 my-lg-5"> <section class="teaser__section py-4 py-lg-5 my-lg-5">
<div class="container"> <div class="container">
<h2 class="teaser__title text-center">{{ .Param "sections.section-supporters.title" }}</h2> <h2 class="teaser__title text-center">{{ .Param "sections.section-supporters.title" }}</h2>
<div class="row justify-content-center"> <div class="row justify-content-center">
{{ range where .Site.RegularPages "Section" "members" }} {{ range where .Site.RegularPages "Section" "members" }}
{{ $level := .Param "level" }} {{ $level := .Param "level" }}
{{ if eq $level "platinum" }} {{ if eq $level "platinum" }}
@ -92,29 +78,15 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}

</div>
</div> </div>
</div>
</section> </section>
<section class="teaser__section _navy py-4 py-lg-5 my-lg-5"> <section class="teaser__section _navy py-4 py-lg-5 my-lg-5">
<div class="container text-center pb-4 pb-lg-0"> <div class="container text-center pb-4 pb-lg-0">
<h2 class="teaser__title">{{ .Param "sections.section-subscribe.title" }}</h2> <h2 class="teaser__title">{{ .Param "subscribe.title" }}</h2>
<p>{{ .Param "sections.section-subscribe.p-1" }}</p> {{ range .Param "subscribe.p" }}
<form class="teaser__form row justify-content-center" action="/" method="post"> <p>{{ . }}</p>
<div class="col-md-2 pb-3 pb-lg-0"> {{ end }}
<input class="form-control" name="" type="text" placeholder="First Name" value=""> </div>
</div>
<div class="col-md-2 pb-3 pb-lg-0">
<input class="form-control" name="" type="text" placeholder="Last Name" value="">
</div>
<div class="col-md-2 pb-3 pb-lg-0">
<input class="form-control" name="" type="text" placeholder="Email" value="">
</div>
<div class="col-md-2">
<input class="btn btn-outline-primary mt-4 mt-md-0" type="submit" value="Submit">
</div>
</form>
</div>
</section> </section>

{{ partial "footer.html" . }} {{ partial "footer.html" . }}

@ -1,8 +0,0 @@
<section class="home promo__section d-flex flex-column justify-content-center"
style="background-image:url(./img/hero_homepage.jpg)" >
<div class="promo__container container text-center">
<h1>{{ .Param "promo-h1" }}</h1>
<p>{{ .Param "promo-p1" }}</p>
<p><a class="btn btn-light btn-outline-primary" href="{{ "/join/" | relURL }}">{{ .Param "promo-cta" }}</a></p>
</div>
</section>
Loading…
Cancel
Save