refactor the member page internally

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1720744104865095624/master
Toshaan Bharvani 3 years ago
parent 51ad806588
commit 8d969a3940

@ -3,47 +3,51 @@
{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}


<main id="main" class="main members"> <main id="main" class="main members">
<div class="container"> <div class="container">
<section id="intro"> <section id="intro">
<div class="row"> <div class="row">
<h1 class="section-header my-3 my-md-5 pb-2 pb-md-3 text-center">{{ .Title }}</h1> <h1 class="section-header my-3 my-md-5 pb-2 pb-md-3 text-center">{{ .Title }}</h1>
</section> </div>
</section>
<div class="row"> <div class="row">
{{ $i := 0 }} {{ $i := 0 }}
{{ $data := index $.Site.Data }} {{ $data := index $.Site.Data }}
{{ range $data.memberlevels }} {{ range $data.memberlevels }}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="membership-level pt-5 pb-0 pb-lg-3"> <div class="membership-level pt-5 pb-0 pb-lg-3">
<h2 class="pb-2 pb-lg-5 text-center">{{ .name }}</h2> <h2 class="pb-2 pb-lg-5 text-center">{{ .name }}</h2>
{{ $key := .identifier }} {{ $key := .identifier }}
{{ $imageheight := .image.height }} {{ $imageheight := .image.height }}
{{ $imagewidth := .image.width }} {{ $imagewidth := .image.width }}
{{ $imagesize := printf "%s webp" .size }} {{ $imagesize := printf "%s webp" .size }}
{{ $col := .col }} {{ $col := .col }}
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
{{ range $.Site.Pages }} {{ range $.Site.Pages }}
{{ $level := .Param "level" }} {{ $level := .Param "level" }}
{{ if eq $level $key }} {{ if eq $level $key }}
<div class="col-lg-4 pt-5 pb-0 pb-lg-3"> <div class="col-lg-4 pt-5 pb-0 pb-lg-3">
<div class="box"> <div class="box">
<a target="_blank" href="{{ .Param "link" }}"> <a href="{{ .Permalink }}">
{{ if .Param "image" }} {{ if .Param "image" }}
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit $imagesize }} {{ $image := $imageresource.Fit $imagesize }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
</a> </a>
{{ else }} {{ else }}
<h3><a target="_blank" class="text-black" href="{{ .Param " link" }}">{{ .Param "title" }}</a></h3> <h3><a target="_blank" class="text-black" href="{{ .Param " link" }}">{{ .Param "title" }}</a></h3>
{{ end }} {{ end }}
</div>
</div> </div>
</div> {{ end }}
{{ end }} {{ end }}
{{ end }} </div>

</div>
{{ end }} </div>

{{ end }}
</div>
</div>
</main> </main>


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

Loading…
Cancel
Save