Skip to content

Commit

Permalink
Resized images!
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipstenu committed Oct 10, 2024
1 parent 8fb3440 commit bfa13a5
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 71 deletions.
2 changes: 1 addition & 1 deletion content/assets/scss/hugo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ nav#NewsListOfYears ul, nav#TranscriptsListOfYears ul {
transform: scale(.707) rotate(45deg);
}

.breadcrumb-custom a {
.breadcrumb-custom a, .img-lightbox {
cursor: pointer;
}

Expand Down
4 changes: 2 additions & 2 deletions content/posts/blog/2013/09-29-rip-curl-malibu-pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ thumbnail:
url: https://assets.jorjafox.net/img/gallery/benefits/20040930-ripcurl/ripcurl2004_001.jpg
---

{{< bs5-lightbox >}}

What I love best is that Mark and Jorja were in "The True Story" together, so I kind of like to see it as a reunion. In 2004, it would be all "Hey, Mark, things working out since I was cut from your show?" But of course now in 2014 it's "Hey, Jorja, still on CSI while I'm playing the Hulk?"

{{< bs5-lightbox >}}
8 changes: 4 additions & 4 deletions content/posts/blog/2013/11-14-meet-bexar.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ categories:
tags:
- advocacy
- article
modules: [ "bs5-lightbox" ]
photogallery:
- /img/blog/2013/SwedenWithLove.com_elizabeth-messina_008r.jpg
- /img/blog/2013/SwedenWithLove.com_elizabeth-messina_008r.jpg
- /img/blog/2013/elizabeth-messina_008r.jpg
- /img/blog/2013/elizabeth-messina_013a.jpg
thumbnail:
url: /img/blog/2013/SwedenWithLove.com_elizabeth-messina_013a-600x290.jpg
---

Jorja's beloved boxer, Ali, passed away. I didn't report on it at the time because ... well I don't report on stuff until Jorja makes it public! Then when Jorja was in Texas, she found a dog.

{{< bs5-lightbox >}}

Bexar, pronounced 'Bear', is a total scruffy mutt. Part poodle, no doubt, but none of that matters.

{{< blockquote >}}
"When we found each other, I had just lost my dog of 14 years," she reveals in an interview with Sweden with Love. Bexar (pronounced "bear") had been found roaming the streets of San Antonio, Texas, but it wasn't exactly love at first sight.

Expand Down
4 changes: 2 additions & 2 deletions content/static/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Options +FollowSymLinks -Indexes
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "DENY"
Header set X-Frame-Options "SAMEORIGIN"
Header always set Expect-CT "max-age=7776000, enforce"
Header set Access-Control-Allow-Origin "*"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header add Content-Security-Policy "default-src 'self' https://*.jorjafox.net; script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.jorjafox.net; style-src 'self' https://fonts.googleapis.com https://www.youtube.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; font-src 'self' https://*.jorjafox.net https://fonts.gstatic.com; frame-src 'self' https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com; img-src 'self' https://*.jorjafox.net data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; manifest-src 'self'; media-src 'self' "
Header add Content-Security-Policy "default-src 'self' https://*.jorjafox.net; script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.jorjafox.net; style-src 'self' https://fonts.googleapis.com https://www.youtube.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; font-src 'self' https://*.jorjafox.net https://fonts.gstatic.com; frame-src 'self' https://*.jorjafox.net https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com; img-src 'self' https://*.jorjafox.net data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; manifest-src 'self'; media-src 'self' ; frame-ancestors 'self' https://*.jorjafox.net "
Header set Permissions-Policy "geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), payment=()"
</IfModule>

Expand Down
41 changes: 0 additions & 41 deletions layouts/partials/head/head.html

This file was deleted.

7 changes: 0 additions & 7 deletions layouts/partials/head/preload.html

This file was deleted.

38 changes: 24 additions & 14 deletions layouts/partials/lightbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,31 @@ <h2 id="gallery" class="heading">
<div class="card">
<div class="card-body">
<div class="row row-cols-1 row-cols-md-3 g-4">
{{ range $photogallery }}
{{- $image := . | absURL -}}
<div class="col">
<div class="card">
<a href="{{ $image }}" data-toggle="lightbox" data-gallery="gallery">
{{- partial "assets/image.html" (dict
"url" .
"ratio" "1x1"
"wrapper" "mx-auto"
"title" $title)
-}}
</a>
{{ 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>
</div>
{{ end }}
{{ end }}
</div>
</div> <!-- end card.body -->
{{ if ne $caption false }}
Expand Down
41 changes: 41 additions & 0 deletions layouts/shortcodes/bs5-lightbox.html
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>

0 comments on commit bfa13a5

Please sign in to comment.