-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
74 additions
and
71 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- | ||
Copyright © 2024 Mika Epstein (Ipstenu) | ||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file. | ||
--> | ||
{{ $photogallery := $.Page.Params.photogallery }} | ||
{{ $title := "Photo Gallery" }} | ||
|
||
{{ if .Get "Title" }} | ||
{{ $title := .Get "Title" }} | ||
{{ end }} | ||
<div class="card"> | ||
<div class="card-body"> | ||
<div class="row row-cols-1 row-cols-md-4 g-4"> | ||
{{ range $photogallery }} | ||
{{- $imageurl := . | absURL -}} | ||
{{- $imagesrc := . | absURL -}} | ||
|
||
{{ with resources.Get $imageurl }} | ||
{{ $image := $imageurl.Fit "250x250" }} | ||
{{ $imagesrc = $image.RelPermalink }} | ||
{{ end }} | ||
|
||
{{ $dir := (urls.Parse $imageurl).Path }} | ||
|
||
{{ with resources.GetRemote $imageurl | resources.Copy $dir }} | ||
{{ $image := . }} | ||
{{ $imageurl = $image.Permalink }} | ||
{{ $image = $image.Crop "250x250" }} | ||
{{ $imagesrc = $image.RelPermalink }} | ||
{{ end }} | ||
<div class="col"> | ||
<div class="card"> | ||
<div class="mx-auto"> | ||
<img src="{{ $imagesrc }}" class="img-fluid img-lightbox" alt="{{ $title }}" data-toggle="lightbox" data-gallery="gallery" data-src="{{ $imageurl }}"> | ||
</div> | ||
</div> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</div> <!-- end card.body --> | ||
</div> |