diff --git a/package-lock.json b/package-lock.json index b50896e6..30a92680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "22.1.9", + "version": "22.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "22.1.9", + "version": "22.2.0", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index 96398ec0..aa0be743 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "22.1.9", + "version": "22.2.0", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/includes/partials/media/grid.liquid b/src/includes/partials/media/grid.liquid index 67b3a9b7..98236485 100644 --- a/src/includes/partials/media/grid.liquid +++ b/src/includes/partials/media/grid.liquid @@ -22,14 +22,13 @@ srcset=" 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=squarebase 800w, - https://cdn.coryd.dev{{ item.image }}?class=squarelg 1200w + https://cdn.coryd.dev{{ item.image }}?class=squarebase 800w " sizes="(max-width: 450px) 200px, (max-width: 850px) 400px, - (max-width: 100px) 800px, - 1200px" - src="https://cdn.coryd.dev{{ item.image }}?class=squarelg" + (max-width: 1000px) 800px, + 800px" + src="https://cdn.coryd.dev{{ item.image }}?class=squarebase" alt="{{ alt }}" loading="{{ loadingStrategy }}" decoding="async" @@ -41,14 +40,13 @@ srcset=" 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=verticalbase 800w, - https://cdn.coryd.dev{{ item.image }}?class=verticallg 1200w + https://cdn.coryd.dev{{ item.image }}?class=verticalbase 800w " sizes="(max-width: 450px) 200px, (max-width: 850px) 400px, (max-width: 1000px) 800px, - 1200px" - src="https://cdn.coryd.dev{{ item.image }}?class=verticallg" + 800px" + src="https://cdn.coryd.dev{{ item.image }}?class=verticalbase" alt="{{ alt }}" loading="{{ loadingStrategy }}" decoding="async" diff --git a/src/includes/partials/media/watching/grid.liquid b/src/includes/partials/media/watching/grid.liquid index b0a74a4b..2882fcec 100644 --- a/src/includes/partials/media/watching/grid.liquid +++ b/src/includes/partials/media/watching/grid.liquid @@ -24,14 +24,13 @@ srcset=" 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=bannerbase 1024w, - https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg 2048w + https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase 1024w " sizes="(max-width: 450px) 256px, (max-width: 850px) 512px, (max-width: 1000px) 1024px, - 2048px" - src="https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg" + 1024px" + src="https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase" alt="{{ alt }}" loading="{{ loadingStrategy }}" decoding="async" diff --git a/src/pages/static/search.html b/src/pages/static/search.html index c265d019..80e056ad 100644 --- a/src/pages/static/search.html +++ b/src/pages/static/search.html @@ -32,6 +32,7 @@ permalink: /search.html const query = $input.value const results = (query.length > 1) ? getSearchResults(query) : [] if (query === '') renderSearchResults([]) + if (query.length > 1 && window?.umami) umami.trackEvent('Search', { query: query }) renderSearchResults(results) }) diff --git a/workers/analytics/index.js b/workers/analytics/index.js index 660f33f2..1db9b0ca 100644 --- a/workers/analytics/index.js +++ b/workers/analytics/index.js @@ -20,5 +20,21 @@ async function handleRequest(request) { 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) } \ No newline at end of file diff --git a/workers/analytics/wrangler.template.toml b/workers/analytics/wrangler.template.toml index 7b93c26d..051bb3c9 100644 --- a/workers/analytics/wrangler.template.toml +++ b/workers/analytics/wrangler.template.toml @@ -8,5 +8,6 @@ workers_dev = true [env.production] name = "analytics-worker-production" 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}" } ] \ No newline at end of file