From 3dea32828f3f9c8f4004aa62a8a539600241640a Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Thu, 15 Jun 2023 23:17:11 +0200 Subject: [PATCH 1/3] refactor: simplify tailwind breakpoint indicator --- components/tailwind-indicator.tsx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/components/tailwind-indicator.tsx b/components/tailwind-indicator.tsx index 5644c1b..5d2e150 100644 --- a/components/tailwind-indicator.tsx +++ b/components/tailwind-indicator.tsx @@ -1,16 +1,25 @@ export function TailwindIndicator() { if (process.env.NODE_ENV === "production") return null; + const breakpoints = [ + { name: "xs", css: "block sm:hidden" }, + { + name: "sm", + css: "hidden sm:block md:hidden lg:hidden xl:hidden 2xl:hidden", + }, + { name: "md", css: "hidden md:block lg:hidden xl:hidden 2xl:hidden" }, + { name: "lg", css: "hidden lg:block xl:hidden 2xl:hidden" }, + { name: "xl", css: "hidden xl:block 2xl:hidden" }, + { name: "2xl", css: "hidden 2xl:block" }, + ]; + return (
-
xs
-
- sm -
-
md
-
lg
-
xl
-
2xl
+ {breakpoints.map((breakpoint) => ( +
+ {breakpoint.name} +
+ ))}
); } From 4e870b76c9b811386f11a9197aeac9d5a81f051f Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Thu, 15 Jun 2023 23:17:50 +0200 Subject: [PATCH 2/3] chore: rework metadata fields --- app/layout.tsx | 14 ++++++++------ config/site.ts | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index effd69e..7ac3090 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,7 +3,7 @@ import localFont from "next/font/local"; import "@/styles/globals.css"; import { siteConfig } from "@/config/site"; -import { absoluteUrl, cn } from "@/lib/utils"; +import { cn } from "@/lib/utils"; import { Analytics } from "@/components/analytics"; import { TailwindIndicator } from "@/components/tailwind-indicator"; import { ThemeProvider } from "@/components/theme-provider"; @@ -13,13 +13,16 @@ export const metadata = { default: siteConfig.name, template: `%s | ${siteConfig.name}`, }, + metadataBase: new URL(`https://${siteConfig.url}}`), description: siteConfig.description, keywords: [ + "Portfolio", "Next.js", "React", - "Tailwind CSS", - "Server Components", - "Radix UI", + "Azure", + "Kubernetes", + "DevOps", + "Python", ], authors: [ { @@ -27,7 +30,7 @@ export const metadata = { url: siteConfig.url, }, ], - creator: "shadcn", + creator: "bartvdbraak", themeColor: [ { media: "(prefers-color-scheme: light)", color: "white" }, { media: "(prefers-color-scheme: dark)", color: "black" }, @@ -64,7 +67,6 @@ const fontSans = FontSans({ variable: "--font-sans", }); -// Font files can be colocated inside of `pages` const fontHeading = localFont({ src: "../assets/fonts/CalSans-SemiBold.woff2", variable: "--font-heading", diff --git a/config/site.ts b/config/site.ts index 1076851..b4c6a2f 100644 --- a/config/site.ts +++ b/config/site.ts @@ -1,7 +1,9 @@ +import { env } from "@/env.mjs"; + export const siteConfig = { name: "hellob.art", description: "a simple portfolio made by bart van der braak.", - url: "https://hellob.art", + url: env.NEXT_PUBLIC_APP_URL || "https://hellob.art", ogImage: "https://hellob.art/og.jpg", links: { linkedIn: "https://linkedin.com/in/bartvdbraak", From e062b81e26b6ab687f294361f9cf862496e18a8c Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Thu, 15 Jun 2023 23:20:34 +0200 Subject: [PATCH 3/3] refactor: move analytics --- app/layout.tsx | 4 ++-- components/analytics.tsx | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 components/analytics.tsx diff --git a/app/layout.tsx b/app/layout.tsx index 7ac3090..5819a7f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,7 +4,7 @@ import localFont from "next/font/local"; import "@/styles/globals.css"; import { siteConfig } from "@/config/site"; import { cn } from "@/lib/utils"; -import { Analytics } from "@/components/analytics"; +import { Analytics } from "@vercel/analytics/react"; import { TailwindIndicator } from "@/components/tailwind-indicator"; import { ThemeProvider } from "@/components/theme-provider"; @@ -89,9 +89,9 @@ export default function RootLayout({ children }: RootLayoutProps) { > {children} - + ); diff --git a/components/analytics.tsx b/components/analytics.tsx deleted file mode 100644 index 52e59d2..0000000 --- a/components/analytics.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client"; - -import { Analytics as VercelAnalytics } from "@vercel/analytics/react"; - -export function Analytics() { - return ; -}