diff --git a/src/Layout.tsx b/src/Layout.tsx index c957b9b..c643256 100644 --- a/src/Layout.tsx +++ b/src/Layout.tsx @@ -58,11 +58,13 @@ function Shell({ children }: { children: React.ReactNode }) {
{/* mobile */} -
-
-

- Katelynn & Thomas -

+
+
+ +

+ Katelynn & Thomas +

+
setMenu(!menu)} />
-
- -
{/* desktop */}
- - + +

Katelynn & Thomas

March 6, 2027 ยท Anchorage, AK

@@ -112,7 +106,7 @@ function Shell({ children }: { children: React.ReactNode }) { {/* mobile menu */}
diff --git a/src/Photos/Photos.tsx b/src/Photos/Photos.tsx index 1cc656c..b1e081d 100644 --- a/src/Photos/Photos.tsx +++ b/src/Photos/Photos.tsx @@ -20,7 +20,7 @@ export function Photos() { const { count } = useLoaderData(); let imgs = []; for (let i = 1; i < count + 1; i++) { - const name = "/public/us/img_" + i.toString().padStart(3, '0') + ".jpg"; + const name = "/public/us/img_" + i.toString().padStart(3, '0') + ".jpg?quality=60?size=1024"; const className = Math.floor(Math.random() * 3) ? "md:col-span-1" : "md:col-span-2"; imgs.push((
@@ -30,7 +30,10 @@ export function Photos() { transition-all duration-150 ease-in-out md:group-hover:scale-120 md:group-hover:z-50 md:group-hover:drop-shadow-2xl relative md:group-hover:absolute md:group-hover:inset-0" - src={name} /> + src={name} + height={1024} + width={1024} + />
)) } diff --git a/src/ThingsToDo/ThingsToDo.tsx b/src/ThingsToDo/ThingsToDo.tsx index 6cefb73..da314e3 100644 --- a/src/ThingsToDo/ThingsToDo.tsx +++ b/src/ThingsToDo/ThingsToDo.tsx @@ -30,13 +30,13 @@ export function ThingsToDo() {

~5 mins from downtown Anchorage

- +
- +
- +

@@ -50,7 +50,7 @@ export function ThingsToDo() {

~10 mins from downtown Anchorage

- +

@@ -63,10 +63,10 @@ export function ThingsToDo() {

~15 mins from downtown Anchorage

- +
- +

@@ -81,13 +81,13 @@ export function ThingsToDo() {

~20 mins from downtown Anchorage

- +
- +
- +

@@ -109,13 +109,13 @@ export function ThingsToDo() {

~45 mins from downtown Anchorage

- +
- +
- +

@@ -129,13 +129,13 @@ export function ThingsToDo() {

~1 hour from downtown Anchorage

- +
- +
- +

@@ -149,13 +149,13 @@ export function ThingsToDo() {

~1 hour from downtown Anchorage

- +
- +
- +

@@ -180,13 +180,13 @@ export function ThingsToDo() {

~1.25 hours from Anchorage

- +
- +
- +

@@ -205,13 +205,13 @@ export function ThingsToDo() {

~1.25 hours from Anchorage

- +
- +
- +

@@ -231,13 +231,13 @@ export function ThingsToDo() {

~1.5 hours from Anchorage

- +
- +
- +

@@ -255,13 +255,13 @@ export function ThingsToDo() {

~2 hours from Anchorage

- +
- +
- +

@@ -282,13 +282,13 @@ export function ThingsToDo() {

~2.5 hours from Anchorage

- +
- +
- +

@@ -310,13 +310,13 @@ export function ThingsToDo() {

~4 hours from Anchorage

- +
- +
- +

diff --git a/src/Travel/Travel.tsx b/src/Travel/Travel.tsx index 1ba81fc..ed455d6 100644 --- a/src/Travel/Travel.tsx +++ b/src/Travel/Travel.tsx @@ -18,7 +18,7 @@ export function Travel() { Servicing Anchorage is Ted Stevens International Airport, which has frequent flights from major US-based airlines.

- +
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 4532f62..774fccd 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,7 +1,7 @@ export function Sidebar() { return (
- +

MARCH

6th

diff --git a/src/index.ts b/src/index.ts index 5c6801f..07da443 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,18 +8,24 @@ const server = serve({ const url = new URL(req.url); const filePath = `./${url.pathname}`; + const raw = parseInt(url.searchParams.get("raw") ?? "0", 10); + const size = parseInt(url.searchParams.get("size") ?? "0", 10); + const quality = parseInt(url.searchParams.get("quality") ?? "0", 10); + const file = Bun.file(filePath); const exists = await file.exists(); - if (exists) { - return new Response( - await file.image() - .resize(1024) - .webp({ quality: 80 }) - .blob()); - } + if (raw > 0) + return new Response(file); - return Response.json({ error: 'File not found' }, { status: 404 }); + const img = file.image(); + if (size > 0) + img.resize(size) + if (quality > 0) + img.webp({ quality }) + return new Response(await img.blob()); + } + return Response.json({ error: "File not found" }, { status: 404 }); }, "/api/getpics": async (req) => {