chore: misc cleanup

This commit is contained in:
Cory Dransfeldt 2024-08-12 14:01:39 -07:00
parent cab8b34832
commit 31b69ae565
No known key found for this signature in database
7 changed files with 32 additions and 17 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "22.1.9", "version": "22.2.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "22.1.9", "version": "22.2.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.5.0", "@cdransf/api-text": "^1.5.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "22.1.9", "version": "22.2.0",
"description": "The source for my personal site. Built using 11ty (and other tools).", "description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -22,14 +22,13 @@
srcset=" srcset="
https://cdn.coryd.dev{{ item.image }}?class=squaresm 200w, https://cdn.coryd.dev{{ item.image }}?class=squaresm 200w,
https://cdn.coryd.dev{{ item.image }}?class=squaremd 400w, https://cdn.coryd.dev{{ item.image }}?class=squaremd 400w,
https://cdn.coryd.dev{{ item.image }}?class=squarebase 800w, https://cdn.coryd.dev{{ item.image }}?class=squarebase 800w
https://cdn.coryd.dev{{ item.image }}?class=squarelg 1200w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 100px) 800px, (max-width: 1000px) 800px,
1200px" 800px"
src="https://cdn.coryd.dev{{ item.image }}?class=squarelg" src="https://cdn.coryd.dev{{ item.image }}?class=squarebase"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"
@ -41,14 +40,13 @@
srcset=" srcset="
https://cdn.coryd.dev{{ item.image }}?class=verticalsm 200w, https://cdn.coryd.dev{{ item.image }}?class=verticalsm 200w,
https://cdn.coryd.dev{{ item.image }}?class=verticalmd 400w, https://cdn.coryd.dev{{ item.image }}?class=verticalmd 400w,
https://cdn.coryd.dev{{ item.image }}?class=verticalbase 800w, https://cdn.coryd.dev{{ item.image }}?class=verticalbase 800w
https://cdn.coryd.dev{{ item.image }}?class=verticallg 1200w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 1000px) 800px, (max-width: 1000px) 800px,
1200px" 800px"
src="https://cdn.coryd.dev{{ item.image }}?class=verticallg" src="https://cdn.coryd.dev{{ item.image }}?class=verticalbase"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"

View file

@ -24,14 +24,13 @@
srcset=" srcset="
https://cdn.coryd.dev{{ item.backdrop }}?class=bannersm 256w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev{{ item.backdrop }}?class=bannermd 512w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase 1024w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase 1024w
https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 1024px"
src="https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg" src="https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"

View file

@ -32,6 +32,7 @@ permalink: /search.html
const query = $input.value const query = $input.value
const results = (query.length > 1) ? getSearchResults(query) : [] const results = (query.length > 1) ? getSearchResults(query) : []
if (query === '') renderSearchResults([]) if (query === '') renderSearchResults([])
if (query.length > 1 && window?.umami) umami.trackEvent('Search', { query: query })
renderSearchResults(results) renderSearchResults(results)
}) })

View file

@ -20,5 +20,21 @@ async function handleRequest(request) {
headers: newHeaders headers: newHeaders
}) })
} }
if (url.pathname === '/js/api/send') {
const targetUrl = 'https://dashboard.coryd.dev/api/send'
const response = await fetch(targetUrl, {
method: request.method,
headers: request.headers,
body: request.body
})
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers: response.headers
})
}
return fetch(request) return fetch(request)
} }

View file

@ -8,5 +8,6 @@ workers_dev = true
[env.production] [env.production]
name = "analytics-worker-production" name = "analytics-worker-production"
routes = [ routes = [
{ pattern = "coryd.dev/js/script.js", zone_id = "${CF_ZONE_ID}" } { pattern = "coryd.dev/js/script.js", zone_id = "${CF_ZONE_ID}" },
{ pattern = "coryd.dev/js/api/send", zone_id = "${CF_ZONE_ID}" }
] ]