add start and end date for bod members

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1691128968110617338/master
Toshaan Bharvani 2 years ago
parent d51ad714df
commit 41bd304ead

@ -5,33 +5,37 @@
<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>
{{ range .Data.Pages.ByWeight }} {{ range .Data.Pages.ByWeight }}
{{ $personfilename := .File.BaseFileName }} {{ $start := time (.Param "start") }}
{{ $personfile := printf "%s/%s" "persons" $personfilename }} {{ $end := time (.Param "end") }}
<article class="post__article col-10 offset-1 row mb-4 pt-4"> {{ if and (le now $end) (ge now $start) }}
<div class="col-md-2 mb-4 mb-md-0 pt-md-3 pl-4 pl-lg-0"> {{ $personfilename := .File.BaseFileName }}
{{ with $.Site.GetPage $personfile }} {{ $personfile := printf "%s/%s" "persons" $personfilename }}
{{ if .Param "image" }} <article class="post__article col-10 offset-1 row mb-4 pt-4">
{{ $imagename := .Param "image" }} <div class="col-md-2 mb-4 mb-md-0 pt-md-3 pl-4 pl-lg-0">
{{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "390x390 webp" }}
<img class="img-fluid" src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }}
{{ .Title }}
{{ end }}
{{ end }}
</div>
<div class="col-md-10 pl-4 mb-4 mb-lg-6 person">
<h2>{{ .Title }}, {{ .Param "position" }}</h2>
{{ with $.Site.GetPage $personfile }} {{ with $.Site.GetPage $personfile }}
{{ $memberfile := printf "%s/%s" "members" (.Param "member") }} {{ if .Param "image" }}
{{ with $.Site.GetPage $memberfile }} {{ $imagename := .Param "image" }}
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3> {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "390x390 webp" }}
<img class="img-fluid" src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }}
{{ .Title }}
{{ end }} {{ end }}
<p>{{ .Content }}</p>
{{ end }} {{ end }}
</div> </div>
</article> <div class="col-md-10 pl-4 mb-4 mb-lg-6 person">
<h2>{{ .Title }}, {{ .Param "position" }}</h2>
{{ with $.Site.GetPage $personfile }}
{{ $memberfile := printf "%s/%s" "members" (.Param "member") }}
{{ with $.Site.GetPage $memberfile }}
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ end }}
<p>{{ .Content }}</p>
{{ end }}
</div>
</article>
{{ end }}
{{ end }} {{ end }}
</div> </div>
</div> </div>

Loading…
Cancel
Save