Skip to content

Commit

Permalink
Splitted showcase in two partials for easier handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
antongit committed May 3, 2024
1 parent a3c76dc commit 11a4e51
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 76 deletions.
32 changes: 32 additions & 0 deletions layouts/partials/showcase-projects.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div class="row justify-content-center mb-3 mb-md-1">
<div class="col-11 col-xl-9">
<div class="row">
<div class="col d-flex">
<div class="label py-1 px-2 text-center">Recent</div>
</div>
</div>
</div>
</div>
<div class="row justify-content-center mb-5">
<div class="col-11 col-xl-9">
{{ $pages := ((where site.RegularPages "Section" "madewithgamma").ByParam "id").Reverse }}

<div class="swiper">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
{{ range $index, $elem:= $pages }}
{{ partial "madeWithGammaCard" (dict "context" $elem "index" $index) }}
{{ end }}
</div>
</div>

<!-- If we need pagination -->
<div class="swiper-pagination"></div>

<!-- If we need navigation buttons -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>

</div>
</div>
33 changes: 33 additions & 0 deletions layouts/partials/showcase-showreels.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div class="row justify-content-center mb-3">
<div class="col-11 col-xl-9">
<div class="row">
<div class="col d-flex">
<div class="label py-1 px-2 text-center">Showreels</div>
</div>
</div>
</div>
<div class="col-11 col-xl-9 mt-2">
<ul class="nav nav-pills" id="showreel-pills" role="tablist">
{{ with .Showreel2}}
<li class="nav-item" role="presentation">
<button class="nav-link active mr-2" href="#showreel-2" data-toggle="pill" data-target="#showreel-2" role="tab" aria-controls="showreel-2" aria-selected="true" alt="{{ .alt }}">{{ .title }}</button >
</li>
{{ end }}
{{ with .Showreel1}}
<li class="nav-item" role="presentation">
<button class="nav-link" href="#showreel-1" data-toggle="pill" data-target="#showreel-1" role="tab" aria-controls="showreel-1" aria-selected="false" alt="{{ .alt }}">{{ .title }}</button >
</li>
{{ end }}
</ul>
</div>
</div>
<div class="row mt-2 px-3 justify-content-center" id="showreel-content">
<div class="tab-content col-11 col-xl-9 mx-2 text-center px-0">
<div class="mediaShadow tab-pane fade show active" id="showreel-2" role="tabpanel" aria-labelledby="pills-showreel2-tab">
{{ partial "vimeo" .Showreel2.vimeo }}
</div>
<div class="mediaShadow tab-pane fade" id="showreel-1" role="tabpanel" aria-labelledby="pills-showreel1-tab">
{{ partial "vimeo" .Showreel1.vimeo }}
</div>
</div>
</div>
85 changes: 9 additions & 76 deletions layouts/partials/showcase.html
Original file line number Diff line number Diff line change
@@ -1,82 +1,15 @@
{{ "<!-- MADE WITH GAMMA -->" | safeHTML }}
<section id="Showcase">
<div class="container-fluid">
{{ with .Site.Params.Showcase }}
<div class="row justify-content-center">
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">{{ .headline }}</h2>
<hr class="primary">
</div>
</div>
{{ end }}


<div class="row justify-content-center mb-3 mb-md-1">
<div class="col-11 col-xl-9">
<div class="row">
<div class="col d-flex">
<div class="label py-1 px-2 text-center">Recent</div>
</div>
</div>
</div>
</div>
<div class="row justify-content-center mb-5">
<div class="col-11 col-xl-9">
{{ $pages := ((where .Site.RegularPages "Section" "madewithgamma").ByParam "id").Reverse }}

<div class="swiper">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
{{ range $index, $elem:= $pages }}
{{ partial "madeWithGammaCard" (dict "context" $elem "index" $index) }}
{{ end }}
</div>
</div>

<!-- If we need pagination -->
<div class="swiper-pagination"></div>

<!-- If we need navigation buttons -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>

</div>
</div>
{{ with .Site.Params.Showcase }}
<div class="row justify-content-center mb-3">
<div class="col-11 col-xl-9">
<div class="row">
<div class="col d-flex">
<div class="label py-1 px-2 text-center">Showreels</div>
</div>
{{ with .Site.Params.Showcase }}
<div class="row justify-content-center">
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">{{ .headline }}</h2>
<hr class="primary">
</div>
</div>
<div class="col-11 col-xl-9 mt-2">
<ul class="nav nav-pills" id="showreel-pills" role="tablist">
{{ with .Showreel2}}
<li class="nav-item" role="presentation">
<button class="nav-link active mr-2" href="#showreel-2" data-toggle="pill" data-target="#showreel-2" role="tab" aria-controls="showreel-2" aria-selected="true" alt="{{ .alt }}">{{ .title }}</button >
</li>
{{ end }}
{{ with .Showreel1}}
<li class="nav-item" role="presentation">
<button class="nav-link" href="#showreel-1" data-toggle="pill" data-target="#showreel-1" role="tab" aria-controls="showreel-1" aria-selected="false" alt="{{ .alt }}">{{ .title }}</button >
</li>
{{ end }}
</ul>
</div>
</div>
<div class="row mt-2 px-3 justify-content-center" id="showreel-content">
<div class="tab-content col-11 col-xl-9 mx-2 text-center px-0">
<div class="mediaShadow tab-pane fade show active" id="showreel-2" role="tabpanel" aria-labelledby="pills-showreel2-tab">
{{ partial "vimeo" .Showreel2.vimeo }}
</div>
<div class="mediaShadow tab-pane fade" id="showreel-1" role="tabpanel" aria-labelledby="pills-showreel1-tab">
{{ partial "vimeo" .Showreel1.vimeo }}
</div>
</div>
</div>
{{ end }}
{{ partial "showcase-projects" . }}
{{ partial "showcase-showreels" . }}
{{ end }}
</div>
</section>
</section>

0 comments on commit 11a4e51

Please sign in to comment.