Browse Source

change the member page

- sorting is now alphabetic
- change member level sizing
  - platinum members are a 2 columns - larger images
  - gold members are 3 columns - medium images
  - silver members are 4 columns - small images
  - academic members are 4 columns - small images
  - associate members are 4 columns - small images
  - individuals members are 4 columns - no images
- have a member count

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
jamesk-patch-1
Toshaan Bharvani 9 months ago
parent
commit
79f90badc5
  1. 16
      data/memberlevels.yaml
  2. 12
      themes/openpowerfoundation/layouts/members/list.html

16
data/memberlevels.yaml

@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
- name: Platinum Members
identifier: platinum
size: 300x300
size: 800x800
col: 6
- name: Gold Members
identifier: gold
size: 200x200
size: 600x600
col: 4
- name: Silver Members
identifier: silver
size: 150x150
size: 400x400
col: 3
- name: Academic Members
identifier: academic
size: 100x100
col: 2
size: 200x200
col: 3
- name: Associate Members
identifier: associate
size: 100x100
col: 2
size: 200x200
col: 3
- name: Individual Members
identifier: individual
size: 1x1
col: 1
col: 3

12
themes/openpowerfoundation/layouts/members/list.html

@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
{{ partial "header.html" . }}

{{ partial "navbar.html" . }}

{{ $i := 0 }}
<main id="main" class="main members">
<div class="container">
<section id="intro">
@ -10,7 +9,6 @@ @@ -10,7 +9,6 @@
</div>
</section>
<div class="row">
{{ $i := 0 }}
{{ $data := index $.Site.Data }}
{{ range $data.memberlevels }}
<div class="col-lg-12">
@ -22,10 +20,10 @@ @@ -22,10 +20,10 @@
{{ $imagesize := printf "%s webp" .size }}
{{ $col := .col }}
<div class="row d-flex justify-content-center">
{{ range $.Site.Pages }}
{{ range $.Site.Pages.ByTitle }}
{{ $level := .Param "level" }}
{{ if eq $level $key }}
<div class="col-lg-4 pt-5 pb-0 pb-lg-3">
<div class="col-lg-{{ $col }} pt-5 pb-0 pb-lg-3">
<div class="box">
<a href="{{ .Permalink }}">
{{ if .Param "image" }}
@ -36,8 +34,9 @@ @@ -36,8 +34,9 @@
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
</a>
{{ else }}
<h3><a target="_blank" class="text-black" href="{{ .Param " link" }}">{{ .Param "title" }}</a></h3>
<h3><a class="text-black" href="{{ .Permalink }}">{{ .Title }}</a></h3>
{{ end }}
{{ $i = add $i 1 }}
</div>
</div>
{{ end }}
@ -49,5 +48,4 @@ @@ -49,5 +48,4 @@
</div>
</div>
</main>

{{ partial "footer.html" . }}

Loading…
Cancel
Save