From 2b22eec3c5bf058f34febb807810ef514c57d283 Mon Sep 17 00:00:00 2001 From: pyrossh Date: Sun, 3 Dec 2023 19:14:31 +0530 Subject: [PATCH] finish remaining pages --- components/Header.tsx | 11 +- components/icons/HardwareIcon.tsx | 15 ++ components/icons/SoftwareIcon.tsx | 20 +++ fresh.gen.ts | 8 +- routes/_404.tsx | 17 +- routes/api/joke.ts | 21 --- routes/cv.tsx | 274 ++++++++++++++++++++++++++++++ routes/greet/[name].tsx | 5 - routes/index.tsx | 144 ++++++++++++---- routes/posts.tsx | 13 ++ tailwind.config.ts | 2 - 11 files changed, 452 insertions(+), 78 deletions(-) create mode 100644 components/icons/HardwareIcon.tsx create mode 100644 components/icons/SoftwareIcon.tsx delete mode 100644 routes/api/joke.ts create mode 100644 routes/cv.tsx delete mode 100644 routes/greet/[name].tsx create mode 100644 routes/posts.tsx diff --git a/components/Header.tsx b/components/Header.tsx index 504442d..ab4a394 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -12,16 +12,13 @@ export default function Header() { pyros.sh
- - dev -
|
- - ref + + cv
|
- - blog + + posts
diff --git a/components/icons/HardwareIcon.tsx b/components/icons/HardwareIcon.tsx new file mode 100644 index 0000000..77b9aae --- /dev/null +++ b/components/icons/HardwareIcon.tsx @@ -0,0 +1,15 @@ +export default function HardwareIcon({ size = "32" }) { + return ( + + + + ); +} diff --git a/components/icons/SoftwareIcon.tsx b/components/icons/SoftwareIcon.tsx new file mode 100644 index 0000000..3d0a87a --- /dev/null +++ b/components/icons/SoftwareIcon.tsx @@ -0,0 +1,20 @@ +export default function SoftwareIcon({ size = "32" }) { + return ( + + + + + + ); +} diff --git a/fresh.gen.ts b/fresh.gen.ts index 10b4ea1..f6359bf 100644 --- a/fresh.gen.ts +++ b/fresh.gen.ts @@ -5,9 +5,9 @@ import * as $_404 from "./routes/_404.tsx"; import * as $_app from "./routes/_app.tsx"; import * as $_middleware from "./routes/_middleware.ts"; -import * as $api_joke from "./routes/api/joke.ts"; -import * as $greet_name_ from "./routes/greet/[name].tsx"; +import * as $cv from "./routes/cv.tsx"; import * as $index from "./routes/index.tsx"; +import * as $posts from "./routes/posts.tsx"; import * as $Counter from "./islands/Counter.tsx"; import * as $LemonDrop from "./islands/LemonDrop.tsx"; import { type Manifest } from "$fresh/server.ts"; @@ -17,9 +17,9 @@ const manifest = { "./routes/_404.tsx": $_404, "./routes/_app.tsx": $_app, "./routes/_middleware.ts": $_middleware, - "./routes/api/joke.ts": $api_joke, - "./routes/greet/[name].tsx": $greet_name_, + "./routes/cv.tsx": $cv, "./routes/index.tsx": $index, + "./routes/posts.tsx": $posts, }, islands: { "./islands/Counter.tsx": $Counter, diff --git a/routes/_404.tsx b/routes/_404.tsx index c63ae2e..eec27c6 100644 --- a/routes/_404.tsx +++ b/routes/_404.tsx @@ -1,12 +1,14 @@ import { Head } from "$fresh/runtime.ts"; +import { PageProps } from "$fresh/server.ts"; -export default function Error404() { +export default function Error404({ url }: PageProps) { return ( <> - 404 - Page not found + pyros.sh | Page Not Found + -
+
the Fresh logo: a sliced lemon dripping with juice

404 - Page not found

-

- The page you were looking for doesn't exist. -

- Go back home +

The page you were looking for doesn't exist.

+
Path: {url.pathname}
+ + Go back home +
diff --git a/routes/api/joke.ts b/routes/api/joke.ts deleted file mode 100644 index a3f4243..0000000 --- a/routes/api/joke.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { HandlerContext } from "$fresh/server.ts"; - -// Jokes courtesy of https://punsandoneliners.com/randomness/programmer-jokes/ -const JOKES = [ - "Why do Java developers often wear glasses? They can't C#.", - "A SQL query walks into a bar, goes up to two tables and says “can I join you?”", - "Wasn't hard to crack Forrest Gump's password. 1forrest1.", - "I love pressing the F5 key. It's refreshing.", - "Called IT support and a chap from Australia came to fix my network connection. I asked “Do you come from a LAN down under?”", - "There are 10 types of people in the world. Those who understand binary and those who don't.", - "Why are assembly programmers often wet? They work below C level.", - "My favourite computer based band is the Black IPs.", - "What programme do you use to predict the music tastes of former US presidential candidates? An Al Gore Rhythm.", - "An SEO expert walked into a bar, pub, inn, tavern, hostelry, public house.", -]; - -export const handler = (_req: Request, _ctx: HandlerContext): Response => { - const randomIndex = Math.floor(Math.random() * JOKES.length); - const body = JOKES[randomIndex]; - return new Response(body); -}; diff --git a/routes/cv.tsx b/routes/cv.tsx new file mode 100644 index 0000000..6bd0d65 --- /dev/null +++ b/routes/cv.tsx @@ -0,0 +1,274 @@ +import { asset, Head } from "$fresh/runtime.ts"; + +export default function CV() { + return ( +
+ + pyros.sh | CV + + +