From c846922bafbbe94253d6c1cbd1312de1dfc7dd95 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Sun, 10 Jul 2022 17:24:25 -0700 Subject: [PATCH] fix build crash --- readme.md | 6 ++++-- src/utils.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 58fb1d2..1242e9b 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,15 @@ # chuckdries.com -![screenshot of website](static/screenshot-1.png) +[![Build Status](https://drone.chuckdries.com/api/badges/chuckdries/Personal-Website/status.svg)](https://drone.chuckdries.com/chuckdries/Personal-Website) -My personal website. +My personal website. Built with - gatsby - tailwind - node-vibrant - react-helmet +and a totally from-scratch masonry gallery component that I will write a blog post about some day. + ![screenshot of website](static/screenshot-2.png) I use node-vibrant in the gatsby OnCreateNode hook to pull colors from the images and store them in the gatsby node structure. I query them in the client, then assign CSS custom properties with react-helmet. In my tailwind config, I define custom colors that use those properties. This gets me classes like `text-vibrant-light` that change colors to vibe with the selected image \ No newline at end of file diff --git a/src/utils.js b/src/utils.js index 98630ec..ae858ec 100644 --- a/src/utils.js +++ b/src/utils.js @@ -84,7 +84,7 @@ export const getGalleryPageUrl = ( { keyword, sortKey }, hash ) => { - const url = new URL(`${window.location.origin}/photogallery/`); + const url = new URL(`${window?.location.origin ?? 'https://chuckdries.com'}/photogallery/`); if (keyword !== undefined) { if (keyword === null) { url.searchParams.delete("filter");