From 0cef7a7903145dc019aa84722ed3fb6ca9879921 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 08:37:17 -0800 Subject: [PATCH 001/160] Fix up the new-photo-post script Make the script a little more resilient. Print out some EXIF data that the template will use when generating the page. Update the photostream submodule commit. Remove the unused photo_exif_table.html partial. --- layouts/partials/photo_exif_table.html | 66 -------------------------- scripts/new-photo-post | 37 +++++++++++++-- themes/photostream | 2 +- 3 files changed, 33 insertions(+), 72 deletions(-) delete mode 100644 layouts/partials/photo_exif_table.html diff --git a/layouts/partials/photo_exif_table.html b/layouts/partials/photo_exif_table.html deleted file mode 100644 index a212c98..0000000 --- a/layouts/partials/photo_exif_table.html +++ /dev/null @@ -1,66 +0,0 @@ -
-
- - {{ if and .Tags.Make .Tags.Model }} - - - - {{ end }} - {{ with .Tags.LensModel }} - - - - {{ end }} - - {{- $hasLocation := and .Lat .Long -}} - {{ if $hasLocation -}} - - {{- end -}} - {{ if and .Tags.PixelXDimension .Tags.PixelYDimension -}} - - {{ end }} - - {{ if or .Tags.ISOSpeedRatings .Tags.FocalLengthIn35mmFilm .Tags.FNumber .Tags.ExposureTime }} - - - - - - - {{ end }} -
- {{- $make := .Tags.Make -}} - {{- $model := .Tags.Model -}} - {{- if in $model $make -}} - {{ .Tags.Model }} - {{- else -}} - {{ .Tags.Make }} {{ .Tags.Model }} - {{- end -}} -
{{ . }}
- {{ $lat := float .Lat }}{{ $latDir := cond (eq $lat 0) "" (cond (gt $lat 0) "N" "S") }} - {{ .Lat | lang.FormatNumber (cond (ne $lat 0) 3 0) }}º{{ $latDir }}, - {{ $long := float .Long }}{{ $longDir := cond (eq $long 0) "" (cond (gt $long 0) "E" "W") }} - {{ .Long | lang.FormatNumber (cond (ne $long 0) 3 0) }}º{{ $longDir }} - - {{- $widthpx := .Tags.PixelXDimension -}} - {{- $heightpx := .Tags.PixelYDimension -}} - {{- if and (gt $widthpx 0) (gt $heightpx 0) -}} - {{- $megapixels := div (mul $widthpx $heightpx) 1e6 -}} - {{ $megapixels | lang.FormatNumber 0 }} MP - • - {{ $widthpx }} × {{ $heightpx }} - {{- end -}} -
{{ with .Tags.ISOSpeedRatings }}ISO {{ . }}{{ end }} - {{- $focalLength := .Tags.FocalLengthIn35mmFilm | default .Tags.FocalLength -}} - {{- with $focalLength -}}{{ . }} mm{{- end -}} - {{ with .Tags.FNumber }}{{ printf "ƒ%0.1f" . }}{{ end }} - {{- with $exposureTime := .Tags.ExposureTime -}} - {{- if in $exposureTime "/" -}} - {{ . }} s - {{- else -}} - 1/{{ printf "%.0f" (div 1.0 (float $exposureTime)) }} s - {{- end -}} - {{- end -}} -
-
-
diff --git a/scripts/new-photo-post b/scripts/new-photo-post index cdc7ae9..858565e 100755 --- a/scripts/new-photo-post +++ b/scripts/new-photo-post @@ -7,12 +7,14 @@ New script. import argparse import datetime +import json import os.path import re import shutil import subprocess from PIL import Image from PIL.ExifTags import TAGS +from typing import Optional PHOTOS_CONTENT_DIR = 'content/photos' @@ -24,6 +26,7 @@ def parse_args(argv, *a, **kw): parser.add_argument('-n', '--dry-run', action='store_true') parser.add_argument('-t', '--title') parser.add_argument('-s', '--slug') + parser.add_argument('--dump-exif', action='store_true') parser.add_argument('photos', nargs='+') args = parser.parse_args(argv) return args @@ -31,9 +34,11 @@ def parse_args(argv, *a, **kw): def main(argv): args = parse_args(argv[1:], prog=argv[0]) - earliest_exif_date = None + earliest_exif_date: Optional[datetime.datetime] = None + + for index, photo in enumerate(args.photos): + print(f'image\t\t{photo}') - for photo in args.photos: try: image = Image.open(photo) except IOError: @@ -47,12 +52,34 @@ def main(argv): exif_date = datetime.datetime.strptime(date_string, '%Y:%m:%d %H:%M:%S %z') except KeyError: exif_date = datetime.datetime.strptime(friendly_exif["DateTime"], '%Y:%m:%d %H:%M:%S') + print(f'capture-time\t{exif_date.isoformat()}') - print(f'{photo} -> {exif_date.isoformat()}') + iso_rating = friendly_exif.get('ISOSpeedRatings') + if iso_rating: + print(f'iso\t\t{iso_rating}') + + focal_length_35mm = friendly_exif.get('FocalLengthIn35mmFilm') + focal_length = friendly_exif.get('FocalLength') + if focal_length or focal_length_35mm: + print(f'focal-length\t{focal_length} {focal_length_35mm}') + + fstop = friendly_exif.get('FNumber') + if fstop: + print(f'f-stop\t\t{fstop}') + + exposure_time = friendly_exif.get('ExposureTime') + if exposure_time: + print(f'exposure-time\t{exposure_time}') if not earliest_exif_date or exif_date < earliest_exif_date: earliest_exif_date = exif_date + if index < len(args.photos) - 1: + print() + + if not earliest_exif_date: + earliest_exif_date = datetime.datetime.now() + year = earliest_exif_date.year month = earliest_exif_date.month @@ -83,12 +110,12 @@ def main(argv): result = subprocess.run(hugo_command) result.check_returncode() else: - print(' '.join(hugo_command)) + print(' '.join(hugo_command), file=sys.stderr) except subprocess.CalledProcessError: print(f'Failed to create new Hugo post', file=sys.stderr) return -1 - if args.title: + if args.title and not args.dry_run: # The hugo command can't set a title for a post so I need to do it myself. index_file_path = os.path.join(post_path, 'index.md') with open(index_file_path) as index_file: diff --git a/themes/photostream b/themes/photostream index cf0aa69..63eb00b 160000 --- a/themes/photostream +++ b/themes/photostream @@ -1 +1 @@ -Subproject commit cf0aa69a8705456e31f9e89331a2ff6891f36d16 +Subproject commit 63eb00bf4a8007a0a2e6c877988874d28fa34f49 From 126dc58e7c8b4d3ed94b4c2d24e72ef21f0d4e77 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 08:38:21 -0800 Subject: [PATCH 002/160] Add a 2024 section index to the photostream --- content/photos/2024/_index.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 content/photos/2024/_index.md diff --git a/content/photos/2024/_index.md b/content/photos/2024/_index.md new file mode 100644 index 0000000..05bcc0a --- /dev/null +++ b/content/photos/2024/_index.md @@ -0,0 +1,4 @@ +--- +title: 2024 +date: 2024-01-01 +--- From 8010f10396c9e67399fb8efa7ce5698c92be5894 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 08:41:50 -0800 Subject: [PATCH 003/160] photos: Add North from the Fairmont Hotel post --- .../the-view-from-the-fremont-hotel/index.md | 20 +++++++++++++++++++ .../the-view-from-the-fremont-hotel/north.jpg | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 content/photos/2024/the-view-from-the-fremont-hotel/index.md create mode 100644 content/photos/2024/the-view-from-the-fremont-hotel/north.jpg diff --git a/content/photos/2024/the-view-from-the-fremont-hotel/index.md b/content/photos/2024/the-view-from-the-fremont-hotel/index.md new file mode 100644 index 0000000..2926aec --- /dev/null +++ b/content/photos/2024/the-view-from-the-fremont-hotel/index.md @@ -0,0 +1,20 @@ +--- +title: North from the Fairmont Hotel +linkTitle: Fairmont Hotel +date: 2024-01-14T17:10:37-08:00 +categories: Me +tags: + - Travel + - San Francisco + - Birthdays + - Staycation +resources: + - src: north.jpg +--- + +For my birthday this year, {{< tess >}} booked us a room in the [Fairmont +Hotel][fairmont] in San Francisco for one-night staycation. The Fairmont has a +long history as a San Francisco landmark, hosted many world leaders, +celebrities, and other famous people. + +[fairmont]: https://www.fairmont.com/san-francisco/ diff --git a/content/photos/2024/the-view-from-the-fremont-hotel/north.jpg b/content/photos/2024/the-view-from-the-fremont-hotel/north.jpg new file mode 100644 index 0000000..903e424 --- /dev/null +++ b/content/photos/2024/the-view-from-the-fremont-hotel/north.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7a8c45c07f072e6742faa5878b42b202a9017d64c479549ef75bff3c480c1e0 +size 2774118 From 0a0f007a11133e36aee98d1acf51a52c616966f0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 08:45:11 -0800 Subject: [PATCH 004/160] feeds: Update submodule commit --- themes/feeds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/feeds b/themes/feeds index 256eae4..4689129 160000 --- a/themes/feeds +++ b/themes/feeds @@ -1 +1 @@ -Subproject commit 256eae44e9f861408b584c856def3cf818ae9fe1 +Subproject commit 468912935563a04a17cc03ff66096849a41a0ea8 From 54782cc1f7db563430c4a7d7123c4d9c12a8d22b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 15:47:19 -0800 Subject: [PATCH 005/160] feeds: Update submodule commit --- themes/feeds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/feeds b/themes/feeds index 4689129..32762af 160000 --- a/themes/feeds +++ b/themes/feeds @@ -1 +1 @@ -Subproject commit 468912935563a04a17cc03ff66096849a41a0ea8 +Subproject commit 32762afb55549080a87fed867c5b2ad6ce990fcf From 32c41daea17d2338d249cdfdfe9c8851021f4013 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 16:36:40 -0800 Subject: [PATCH 006/160] Remove the explicit dependencies from go.mod --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 374f3c5..dcba15d 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,4 @@ module github.com/erynofwales/erynwells.me/v2 go 1.22.5 require ( - github.com/erynofwales/hugo-resource-builders/v2 v2.0.0-20240807181356-8ae8136b8a70 // indirect - github.com/erynofwales/hugo-theme-termlite/v2 v2.0.0-20240807183649-c348571be6af // indirect ) From 7d50f86bcf1ba583d6598afe5b62eccc8fa6304f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 16:37:40 -0800 Subject: [PATCH 007/160] Remove the /now reference on the home page /now is still a draft. --- content/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/_index.md b/content/_index.md index 503b1a2..320c794 100644 --- a/content/_index.md +++ b/content/_index.md @@ -8,7 +8,7 @@ Hi, I'm Eryn Wells. This is my website. Welcome! ## Latest -Here are some of my most recent posts. You can also check out my [now][n] page. +Here are some of my most recent posts. {{< home/latest >}} From 8cb1187aaadaef1088be41c638f2e25fa45824ba Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 16:38:29 -0800 Subject: [PATCH 008/160] Do not build drafts Too much trouble. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3cd87b2..413dece 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ NETHACK_LOGFILE_DATA_FILE=data/nethack/logfile/$(HOSTNAME).json site: @echo "Building site" - hugo --buildDrafts --buildFuture --enableGitInfo --destination "$(BUILD_DIR)" + hugo --buildFuture --enableGitInfo --destination "$(BUILD_DIR)" deploy: site @echo "Deploying to $(DEPLOY_LOCATION)" From 15bec870da698afeb44d8b01fe37dc3f0b338313 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 16:52:02 -0800 Subject: [PATCH 009/160] Add the Coit Tower photo Rename the first Fairmont photo to match the title and slug. I originally called it the Freemont Hotel, which is wrong. --- .../IMG_3324.jpeg | 3 +++ .../index.md | 23 +++++++++++++++++++ .../index.md | 3 +++ .../north.jpg | 0 4 files changed, 29 insertions(+) create mode 100644 content/photos/2024/coit-tower-from-the-fairmont-hotel/IMG_3324.jpeg create mode 100644 content/photos/2024/coit-tower-from-the-fairmont-hotel/index.md rename content/photos/2024/{the-view-from-the-fremont-hotel => north-from-the-fairmont-hotel}/index.md (83%) rename content/photos/2024/{the-view-from-the-fremont-hotel => north-from-the-fairmont-hotel}/north.jpg (100%) diff --git a/content/photos/2024/coit-tower-from-the-fairmont-hotel/IMG_3324.jpeg b/content/photos/2024/coit-tower-from-the-fairmont-hotel/IMG_3324.jpeg new file mode 100644 index 0000000..67691e9 --- /dev/null +++ b/content/photos/2024/coit-tower-from-the-fairmont-hotel/IMG_3324.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46fbb1b429956fa5714ff9d2907ab6af11c05b1e42baa095e9830ab89e528595 +size 2356075 diff --git a/content/photos/2024/coit-tower-from-the-fairmont-hotel/index.md b/content/photos/2024/coit-tower-from-the-fairmont-hotel/index.md new file mode 100644 index 0000000..38fb371 --- /dev/null +++ b/content/photos/2024/coit-tower-from-the-fairmont-hotel/index.md @@ -0,0 +1,23 @@ +--- +title: Coit Tower from the Fairmont Hotel +linkTitle: Coit Tower +date: 2024-01-14T17:10:51-08:00 +categories: Me +tags: + - Travel + - San Francisco + - Birthdays + - Staycation +resources: + - src: IMG_3324.jpeg + params: + alt: > + A round creamy white tower stands atop a hill, surrounded by trees. A + dense urban environment surrounds the hilltop. In the distance, the San + Francisco Bay and Berkeley Hill. +--- + +Another perspective from {{< tess >}}'s and my [stay][north] at the Fairmont +Hotel, this one of Coit Tower on Telegraph Hill. + +[north]: {{< ref "/photos/2024/north-from-the-fairmont-hotel" >}} diff --git a/content/photos/2024/the-view-from-the-fremont-hotel/index.md b/content/photos/2024/north-from-the-fairmont-hotel/index.md similarity index 83% rename from content/photos/2024/the-view-from-the-fremont-hotel/index.md rename to content/photos/2024/north-from-the-fairmont-hotel/index.md index 2926aec..9a99b20 100644 --- a/content/photos/2024/the-view-from-the-fremont-hotel/index.md +++ b/content/photos/2024/north-from-the-fairmont-hotel/index.md @@ -17,4 +17,7 @@ Hotel][fairmont] in San Francisco for one-night staycation. The Fairmont has a long history as a San Francisco landmark, hosted many world leaders, celebrities, and other famous people. +Check out [Coit Tower][coit] too. + [fairmont]: https://www.fairmont.com/san-francisco/ +[coit]: {{< ref "/photos/2024/coit-tower-from-the-fairmont-hotel" >}} diff --git a/content/photos/2024/the-view-from-the-fremont-hotel/north.jpg b/content/photos/2024/north-from-the-fairmont-hotel/north.jpg similarity index 100% rename from content/photos/2024/the-view-from-the-fremont-hotel/north.jpg rename to content/photos/2024/north-from-the-fairmont-hotel/north.jpg From 8483704e730a57f55331f127ae9749499ab1b4af Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 4 Nov 2024 16:53:03 -0800 Subject: [PATCH 010/160] Remove drafts from the production dev server --- dev_server.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/dev_server.sh b/dev_server.sh index 43ab51d..bb5f02f 100755 --- a/dev_server.sh +++ b/dev_server.sh @@ -3,7 +3,6 @@ if [[ "$1" == "production" ]]; then hugo server \ - --buildDrafts \ --buildFuture \ --noHTTPCache \ --enableGitInfo \ From 0b67da255723c3098b7418eb83a86b4f0c817afa Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 5 Nov 2024 08:56:49 -0800 Subject: [PATCH 011/160] photos: Bay FC Home Opener post --- .../2024/bayfc-home-opener/IMG_3717.jpeg | 3 ++ .../photos/2024/bayfc-home-opener/index.md | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 content/photos/2024/bayfc-home-opener/IMG_3717.jpeg create mode 100644 content/photos/2024/bayfc-home-opener/index.md diff --git a/content/photos/2024/bayfc-home-opener/IMG_3717.jpeg b/content/photos/2024/bayfc-home-opener/IMG_3717.jpeg new file mode 100644 index 0000000..ce553d0 --- /dev/null +++ b/content/photos/2024/bayfc-home-opener/IMG_3717.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43d0fe7737c885e6e4d2b2942f711fbbfd89ed43bef930916f207f0733e944bc +size 2220993 diff --git a/content/photos/2024/bayfc-home-opener/index.md b/content/photos/2024/bayfc-home-opener/index.md new file mode 100644 index 0000000..b983b96 --- /dev/null +++ b/content/photos/2024/bayfc-home-opener/index.md @@ -0,0 +1,29 @@ +--- +title: Bay FC's Home Opener +linkTitle: Bay FC +slug: bayfc-home-opener +date: 2024-03-30T19:03:39-07:00 +categories: Me +tags: + - Sports + - Soccer + - Bay FC + - NWSL + - Houston Dash +--- + +In 2024, we got a new +[NWSL][nwsl] +expansion team: [BayFC][bayfc]. +{{< tess >}} and I got tickets to the home opener against the [Houston +Dash][dash]. They lost that game in a pretty dramatic finish, with the Dash +scoring their winning goal in the last few minutes of stoppage time. They went +on to have a pretty great first season: earning the most wins in a first season +of any expansion team in the league. + +Tess and I have gone to several home games this season, including one with Erin +and some family friends. It's so fun having a home team to root for! + +[nwsl]: https://www.nwslsoccer.com +[bayfc]: https://bayfc.com +[dash]: https://www.houstondynamofc.com/houstondash/ From 2104b5354bc6ac306d38ade0a6a0c53d923620be Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 6 Nov 2024 09:04:24 -0800 Subject: [PATCH 012/160] blog: Ay Carmela Update termlite submodule with pre-formatted block styles. --- content/blog/2024/ay-carmela.md | 55 +++++++++++++++++++++++++++++++++ themes/termlite | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 content/blog/2024/ay-carmela.md diff --git a/content/blog/2024/ay-carmela.md b/content/blog/2024/ay-carmela.md new file mode 100644 index 0000000..6e24b06 --- /dev/null +++ b/content/blog/2024/ay-carmela.md @@ -0,0 +1,55 @@ +--- +title: ¡Ay Carmela! +description: | + Pero nada pueden bombas
+ Donde sobra corazón +date: 2024-11-06T08:30:22-08:00 +categories: Politics +tags: + - Music + - United States + - España + - Guerra Civil Española +--- + +> ```text +> El ejército del Ebro +> Rumbala rumbala rum-ba-la +> El ejército del Ebro +> Rumbala rumbala rum-ba-la +> +> Una noche el río pasó +> ¡Ay Carmela! ¡Ay Carmela! +> Una noche el río pasó +> ¡Ay Carmela! ¡Ay Carmela! +> +> Pero nada pueden bombas +> Rumbala rumbala rum-ba-la +> Pero nada pueden bombas +> Rumbala rumbala rum-ba-la +> +> Donde sobra corazón +> ¡Ay Carmela! ¡Ay Carmela! +> Donde sobra corazón +> ¡Ay Carmela! ¡Ay Carmela! +> +> Contraataques muy rabiosos +> Rumbala rumbala rum-ba-la +> Contraataques muy rabiosos +> Rumbala rumbala rum-ba-la +> +> Deberemos resistir +> ¡Ay Carmela! ¡Ay Carmela! +> Deberemos resistir +> ¡Ay Carmela! ¡Ay Carmela! +> +> Pero igual que combatimos +> Rumbala rumbala rum-ba-la +> Pero igual que combatimos +> Rumbala rumbala rum-ba-la +> +> Prometemos resistir +> ¡Ay Carmela! ¡Ay Carmela! +> Prometemos resistir +> ¡Ay Carmela! ¡Ay Carmela! +> ``` diff --git a/themes/termlite b/themes/termlite index cf8de8a..25eaca4 160000 --- a/themes/termlite +++ b/themes/termlite @@ -1 +1 @@ -Subproject commit cf8de8a58aa0f5478c2f4e19387be87102be1699 +Subproject commit 25eaca442cbcd1ad760c07cc17ed0d46c4897b8a From d59f2e0a696a72b43f423ad88954a92457a18086 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 6 Nov 2024 09:32:12 -0800 Subject: [PATCH 013/160] blog: Add citation and caption to Ay Carmela post Update termlite submodule. Enable block and title attributes in the Hugo renderer. --- config/_default/markup.yaml | 4 ++++ content/blog/2024/ay-carmela.md | 1 + themes/termlite | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/_default/markup.yaml b/config/_default/markup.yaml index c271d52..0a8cb53 100644 --- a/config/_default/markup.yaml +++ b/config/_default/markup.yaml @@ -1,6 +1,10 @@ goldmark: renderer: unsafe: true + parser: + attribute: + block: true + title: true highlight: anchorLineNos: true lineNos: false diff --git a/content/blog/2024/ay-carmela.md b/content/blog/2024/ay-carmela.md index 6e24b06..6ce6d3d 100644 --- a/content/blog/2024/ay-carmela.md +++ b/content/blog/2024/ay-carmela.md @@ -53,3 +53,4 @@ tags: > Prometemos resistir > ¡Ay Carmela! ¡Ay Carmela! > ``` +{cite="https://music.apple.com/us/album/ay-carmela/1119265269?i=1119265947" caption="Traditional; emphasis mine"} diff --git a/themes/termlite b/themes/termlite index 25eaca4..e04e7da 160000 --- a/themes/termlite +++ b/themes/termlite @@ -1 +1 @@ -Subproject commit 25eaca442cbcd1ad760c07cc17ed0d46c4897b8a +Subproject commit e04e7dafa32a5d88c3144311dd66dbb9d8a308dd From 0cebee344a2ccf5559cbc60ae9a5300c054ca523 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 7 Nov 2024 08:55:51 -0800 Subject: [PATCH 014/160] photos: Devil's Slide posts --- .../devils-slide-coast2.jpg | 3 +++ .../photos/2024/devils-slide-north/index.md | 19 +++++++++++++++++++ .../2024/devils-slide/devils-slide-coast.jpg | 3 +++ content/photos/2024/devils-slide/index.md | 19 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 content/photos/2024/devils-slide-north/devils-slide-coast2.jpg create mode 100644 content/photos/2024/devils-slide-north/index.md create mode 100644 content/photos/2024/devils-slide/devils-slide-coast.jpg create mode 100644 content/photos/2024/devils-slide/index.md diff --git a/content/photos/2024/devils-slide-north/devils-slide-coast2.jpg b/content/photos/2024/devils-slide-north/devils-slide-coast2.jpg new file mode 100644 index 0000000..a82052f --- /dev/null +++ b/content/photos/2024/devils-slide-north/devils-slide-coast2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7634feb337dc6bd86c836fa5ef83bf7f11c37c9bbf026851d8c5619f58fc0a6c +size 8615065 diff --git a/content/photos/2024/devils-slide-north/index.md b/content/photos/2024/devils-slide-north/index.md new file mode 100644 index 0000000..09ca90d --- /dev/null +++ b/content/photos/2024/devils-slide-north/index.md @@ -0,0 +1,19 @@ +--- +title: Devil's Slide (North) +linkTitle: Devil's Slide +date: 2024-11-07T08:49:16-08:00 +categories: Me +tags: + - Outdoors + - Landscapes + - Ocean + - California + - California Coast +--- + +Earlier this year, {{< tess >}} and I went on a short hike in the [Devil's +Slide][dwp] area, along Highway 1. This photo is looking to the north along the +coast. I took [another photo][other] facing south. + +[dwp]: https://en.wikipedia.org/wiki/Devil%27s_Slide_(California) +[other]: {{< ref "photos/2024/devils-slide" >}} diff --git a/content/photos/2024/devils-slide/devils-slide-coast.jpg b/content/photos/2024/devils-slide/devils-slide-coast.jpg new file mode 100644 index 0000000..fec883f --- /dev/null +++ b/content/photos/2024/devils-slide/devils-slide-coast.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b5863a9d92d34714e661ee2f03c1c70467c1792d1dc0c5cadc31f64e8ac6956 +size 7547107 diff --git a/content/photos/2024/devils-slide/index.md b/content/photos/2024/devils-slide/index.md new file mode 100644 index 0000000..1456cc8 --- /dev/null +++ b/content/photos/2024/devils-slide/index.md @@ -0,0 +1,19 @@ +--- +title: Devil's Slide (South) +linkTitle: Devil's Slide +date: 2024-11-07T08:33:37-08:00 +categories: Me +tags: + - Outdoors + - Landscapes + - Ocean + - California + - California Coast +--- + +Earlier this year, {{< tess >}} and I went on a short hike in the [Devil's +Slide][dwp] area, along Highway 1. This photo is looking south along the coast. +I love the fog tucked into the coves. I took [another photo][other] facing north too. + +[dwp]: https://en.wikipedia.org/wiki/Devil%27s_Slide_(California) +[other]: {{< ref "photos/2024/devils-slide-north" >}} From f47c41a80dcf2d7c4d3670042947a0336d50ea6f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 7 Nov 2024 08:57:57 -0800 Subject: [PATCH 015/160] photostream: Update submodule commit --- themes/photostream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/photostream b/themes/photostream index 63eb00b..ff3b345 160000 --- a/themes/photostream +++ b/themes/photostream @@ -1 +1 @@ -Subproject commit 63eb00bf4a8007a0a2e6c877988874d28fa34f49 +Subproject commit ff3b345cb7c788c985b10657adf029e4227034ef From d87438bf6a9a9ab423e03ca170c049ac3f55c3f2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 7 Nov 2024 08:58:21 -0800 Subject: [PATCH 016/160] Add a few characters to the list of ones to strip out of strings when slugifying a title --- scripts/new-photo-post | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/new-photo-post b/scripts/new-photo-post index 858565e..bc44567 100755 --- a/scripts/new-photo-post +++ b/scripts/new-photo-post @@ -19,7 +19,10 @@ from typing import Optional PHOTOS_CONTENT_DIR = 'content/photos' def slugify(s): - return re.sub(r'[‘’“”]', '', re.sub(r'\s+', '-', s.strip().lower())) + s = s.strip().lower() + s = re.sub(r'\s+', '-', s) + s = re.sub(r'[‘’“”"\'()]', '', s) + return s def parse_args(argv, *a, **kw): parser = argparse.ArgumentParser(*a, **kw) From 1f53428932dcd8809ffbb703681c03f5651fedb4 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 7 Nov 2024 09:11:32 -0800 Subject: [PATCH 017/160] termlite: Update submodule commit --- themes/termlite | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/termlite b/themes/termlite index e04e7da..ac168d7 160000 --- a/themes/termlite +++ b/themes/termlite @@ -1 +1 @@ -Subproject commit e04e7dafa32a5d88c3144311dd66dbb9d8a308dd +Subproject commit ac168d7143d0437a837549a6cf96902e30409dac From 11d4dcd59030775fc760302af9984532e592ed21 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Nov 2024 12:57:45 -0800 Subject: [PATCH 018/160] photos: Niagara Falls posts --- content/photos/2024/maid-of-the-mist/index.md | 20 +++++++++++++++++++ .../2024/maid-of-the-mist/niagara-falls-2.jpg | 3 +++ .../2024/niagara-falls-rainbow/index.md | 17 ++++++++++++++++ .../niagara-falls-rainbow/niagara-falls-1.jpg | 3 +++ .../photos/2024/niagaras-two-falls/index.md | 17 ++++++++++++++++ .../niagaras-two-falls/niagara-falls-3.jpg | 3 +++ 6 files changed, 63 insertions(+) create mode 100644 content/photos/2024/maid-of-the-mist/index.md create mode 100644 content/photos/2024/maid-of-the-mist/niagara-falls-2.jpg create mode 100644 content/photos/2024/niagara-falls-rainbow/index.md create mode 100644 content/photos/2024/niagara-falls-rainbow/niagara-falls-1.jpg create mode 100644 content/photos/2024/niagaras-two-falls/index.md create mode 100644 content/photos/2024/niagaras-two-falls/niagara-falls-3.jpg diff --git a/content/photos/2024/maid-of-the-mist/index.md b/content/photos/2024/maid-of-the-mist/index.md new file mode 100644 index 0000000..14e73f6 --- /dev/null +++ b/content/photos/2024/maid-of-the-mist/index.md @@ -0,0 +1,20 @@ +--- +title: "Maid of the Mist in the Mist" +linkTitle: Maid of the Mist +slug: niagara-maid-of-the-mist +date: 2024-11-08T08:13:53-08:00 +draft: true +categories: Travel +tags: + - New York + - Buffalo + - Landscapes + - Waterfalls +--- + +Maid of the Mist is a tour company that runs a few boats to the base of both +falls at Niagara. They launch from the Canadian and American sides, and use the +colors of the lifejackets and trimmings of the boats to indicate where people +should be returned to should it come to that. You can see one of the Canadian +boats just moving into the misty base of the horseshoe falls. We didn't get to +go out there on this visit, but I've heard you get quite wet on that boat ride. diff --git a/content/photos/2024/maid-of-the-mist/niagara-falls-2.jpg b/content/photos/2024/maid-of-the-mist/niagara-falls-2.jpg new file mode 100644 index 0000000..c2e442d --- /dev/null +++ b/content/photos/2024/maid-of-the-mist/niagara-falls-2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70990495d3e8f412f8c8ce374c959fe5692c97569e13d218afa130c58882c7ac +size 3122248 diff --git a/content/photos/2024/niagara-falls-rainbow/index.md b/content/photos/2024/niagara-falls-rainbow/index.md new file mode 100644 index 0000000..551a2af --- /dev/null +++ b/content/photos/2024/niagara-falls-rainbow/index.md @@ -0,0 +1,17 @@ +--- +title: Niagara Falls Rainbow +linkTitle: Rainbow +date: 2024-11-08T08:13:53-08:00 +draft: true +categories: Travel +tags: + - New York + - Buffalo + - Landscapes + - Waterfalls + - Rainbows +--- + +One of the wonderful things about these falls is they stir up a lot of fine +water droplets that produce rainbows when you and the sun are in just the right +places. diff --git a/content/photos/2024/niagara-falls-rainbow/niagara-falls-1.jpg b/content/photos/2024/niagara-falls-rainbow/niagara-falls-1.jpg new file mode 100644 index 0000000..c7eda85 --- /dev/null +++ b/content/photos/2024/niagara-falls-rainbow/niagara-falls-1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b29a6c876f9004a932350d0687bdd50826ae2001f2c94255fa7e5b013fe7cdae +size 6266918 diff --git a/content/photos/2024/niagaras-two-falls/index.md b/content/photos/2024/niagaras-two-falls/index.md new file mode 100644 index 0000000..5e30646 --- /dev/null +++ b/content/photos/2024/niagaras-two-falls/index.md @@ -0,0 +1,17 @@ +--- +title: "Niagara's Two Falls" +linkTitle: Two Falls +date: 2024-11-08T08:13:54-08:00 +draft: true +categories: Travel +tags: + - New York + - Buffalo + - Landscapes + - Waterfalls +--- + +Niagara Falls is actually two waterfalls. The larger and more famous horseshoe +falls on the Canadian side, and the smaller but no less impressive American +falls. This photo was taken overlooking the American side (on the left side of +the photo) looking toward the Canadian falls. diff --git a/content/photos/2024/niagaras-two-falls/niagara-falls-3.jpg b/content/photos/2024/niagaras-two-falls/niagara-falls-3.jpg new file mode 100644 index 0000000..868f4a5 --- /dev/null +++ b/content/photos/2024/niagaras-two-falls/niagara-falls-3.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0648c55e9c1dca35fd65e1ba216c0cd9e23fb53220bb8615320bd6d1b5e90442 +size 6540231 From cb16a35020046bfe73d6e7693f84e3be603c557c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Nov 2024 08:33:27 -0800 Subject: [PATCH 019/160] photos: Publish the Niagara posts (remove draft flag) --- content/photos/2024/maid-of-the-mist/index.md | 1 - content/photos/2024/niagara-falls-rainbow/index.md | 1 - content/photos/2024/niagaras-two-falls/index.md | 1 - 3 files changed, 3 deletions(-) diff --git a/content/photos/2024/maid-of-the-mist/index.md b/content/photos/2024/maid-of-the-mist/index.md index 14e73f6..e177ca5 100644 --- a/content/photos/2024/maid-of-the-mist/index.md +++ b/content/photos/2024/maid-of-the-mist/index.md @@ -3,7 +3,6 @@ title: "Maid of the Mist in the Mist" linkTitle: Maid of the Mist slug: niagara-maid-of-the-mist date: 2024-11-08T08:13:53-08:00 -draft: true categories: Travel tags: - New York diff --git a/content/photos/2024/niagara-falls-rainbow/index.md b/content/photos/2024/niagara-falls-rainbow/index.md index 551a2af..aadf318 100644 --- a/content/photos/2024/niagara-falls-rainbow/index.md +++ b/content/photos/2024/niagara-falls-rainbow/index.md @@ -2,7 +2,6 @@ title: Niagara Falls Rainbow linkTitle: Rainbow date: 2024-11-08T08:13:53-08:00 -draft: true categories: Travel tags: - New York diff --git a/content/photos/2024/niagaras-two-falls/index.md b/content/photos/2024/niagaras-two-falls/index.md index 5e30646..65eac61 100644 --- a/content/photos/2024/niagaras-two-falls/index.md +++ b/content/photos/2024/niagaras-two-falls/index.md @@ -2,7 +2,6 @@ title: "Niagara's Two Falls" linkTitle: Two Falls date: 2024-11-08T08:13:54-08:00 -draft: true categories: Travel tags: - New York From 122e55b1fa7201752080de44e4e6ecc647641ce1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 13 Nov 2024 17:06:01 -0800 Subject: [PATCH 020/160] blog: Rubiks' Cube Scrambler post Implement the rubiks-cube-scrambler custom element, including JS and template files. Put these things in the body-extras.html partial that the termlite theme added. resource-builders: Update submodule commit termlite: Update submodule commit --- assets/scripts/rubiks/scrambler.js | 123 ++++++++++++++++++ content/blog/2024/rubiks-scrambler.md | 30 +++++ layouts/partials/base/body-extras.html | 4 + .../partials/rubiks/scrambler-template.html | 61 +++++++++ layouts/shortcodes/rubiks/scrambler.html | 1 + themes/resource-builders | 2 +- themes/termlite | 2 +- 7 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 assets/scripts/rubiks/scrambler.js create mode 100644 content/blog/2024/rubiks-scrambler.md create mode 100644 layouts/partials/base/body-extras.html create mode 100644 layouts/partials/rubiks/scrambler-template.html create mode 100644 layouts/shortcodes/rubiks/scrambler.html diff --git a/assets/scripts/rubiks/scrambler.js b/assets/scripts/rubiks/scrambler.js new file mode 100644 index 0000000..10a03c3 --- /dev/null +++ b/assets/scripts/rubiks/scrambler.js @@ -0,0 +1,123 @@ +class RubiksCubeScrambler extends HTMLElement { + static #RandomMoveHysteresisMaxLength = 2; + + #shadowRoot; + #movesListElement; + + #numberOfMovesToGenerate = 25; + + constructor() { + super(); + this.#shadowRoot = this.attachShadow({ mode: "open" }); + } + + scramble() { + console.log("Randomizing Rubik's cube..."); + + const movesList = this.#movesListElement; + + while (movesList.childElementCount > this.#numberOfMovesToGenerate) { + movesList.removeChild(movesList.lastChild); + } + + let randomMoveHysteresis = []; + + for (let i = 0; i < this.#numberOfMovesToGenerate; i++) { + const randomMove = this.#randomMove(randomMoveHysteresis); + + let moveItem; + if (i < movesList.childElementCount) { + moveItem = movesList.children[i]; + } else { + moveItem = document.createElement("li"); + movesList.appendChild(moveItem); + } + + moveItem.classList.add("scrambler__move"); + moveItem.classList.remove("scrambler__move--start", "scrambler__move--end"); + + if (randomMove.includes("2")) { + moveItem.classList.add("scrambler__move--start"); + } else if (randomMove.includes("'")) { + moveItem.classList.add("scrambler__move--end"); + } + + moveItem.innerText = randomMove; + } + } + + #randomMove(hysteresis) { + const faces = "FBLRUD"; + + let move; + do { + move = faces.charAt(Math.floor(Math.random() * faces.length)); + } while (hysteresis && hysteresis.includes(move)); + + if (hysteresis) { + hysteresis.unshift(move); + while (hysteresis.length > RubiksCubeScrambler.#RandomMoveHysteresisMaxLength) { + hysteresis.pop(); + } + } + + const modifierFactor = Math.random(); + if (modifierFactor < 0.33333) { + move = "2" + move; + } else if (modifierFactor < 0.666666) { + move = move + "'"; + } + + return move; + } + + #removeAllMoves() { + const element = this.#movesListElement; + while (element.hasChildNodes()) { + element.removeChild(element.lastChild); + } + } + + // MARK: Custom Element + + connectedCallback() { + let template = document.getElementById("rubiks-cube-scrambler-template"); + console.assert(template, "Couldn't find RubiksCubeScrambler component template in the document"); + + const shadowRoot = this.#shadowRoot; + shadowRoot.appendChild(template.content.cloneNode(true)); + + this.#movesListElement = shadowRoot.querySelector(".scrambler__move-list"); + + shadowRoot + .querySelector("button[name='scramble']") + .addEventListener("click", () => this.scramble()); + + const patternLengthInputElement = shadowRoot.querySelector(".scrambler__pattern-length > input"); + patternLengthInputElement.value = this.#numberOfMovesToGenerate; + patternLengthInputElement.addEventListener("input", event => { + try { + const integerValue = parseInt(event.target.value); + this.#numberOfMovesToGenerate = integerValue; + } catch (e) { + console.error("Non-integer value of pattern length field", e); + } + }); + + this.scramble(); + } + + attributeChangedCallback(name, oldValue, newValue) { + console.debug("RubiksCubeScrambler attribute changed", name, oldValue, newValue); + if (name === "count") { + try { + let newIntValue = parseInt(newValue); + this.#numberOfMovesToGenerate = newIntValue; + } catch (e) { + console.error("`count` attribute should have an integer value.", e); + } + } + } +} + +window.customElements.define("rubiks-cube-scrambler", RubiksCubeScrambler); diff --git a/content/blog/2024/rubiks-scrambler.md b/content/blog/2024/rubiks-scrambler.md new file mode 100644 index 0000000..a0ac788 --- /dev/null +++ b/content/blog/2024/rubiks-scrambler.md @@ -0,0 +1,30 @@ +--- +title: Rubik's Cube Scrambler +date: 2024-11-13T15:34:22-08:00 +tags: + - Tech + - Puzzles + - Rubik's Cube + - HTML + - JavaScript + - CSS + - Web Components +--- + +Here's a silly thing I made while I was home sick today. It's a widget that +produces a randomized pattern of [moves][rmoves] to scramble a 3×3 [Rubik's +Cube][rcube]. + +
+ {{< rubiks/scrambler >}} +
+ +This thing is a [Web Component][wc]. The interactive logic lives inside a custom +[HTMLElement][htmlelement], and the content and styling are specified inside a +[`