Skip to content

Commit 52a04ba

Browse files
authored
fix(site): minor nits (#7771)
1 parent 34ad32b commit 52a04ba

File tree

7 files changed

+28
-22
lines changed

7 files changed

+28
-22
lines changed

apps/site/src/app/layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ export default function Layout({ children }: { children: React.ReactNode }) {
149149
<html lang="en" className={`${inter.variable}`} suppressHydrationWarning>
150150
<head>
151151
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
152-
<Script src={WebFA} crossOrigin="anonymous" />
153-
152+
<script
153+
src={WebFA}
154+
crossOrigin="anonymous"
155+
data-auto-add-css="false" />
154156
<Script
155157
id="cookieyes"
156158
type="text/javascript"

apps/site/src/app/orm/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const twoCol = [
9595
other: (
9696
<YouTubePlayer
9797
autoplay={false}
98+
loading="eager"
9899
video="EEDGwLB55bI"
99100
thumbnail={"/illustrations/orm/thumbnail.png"}
100101
/>

apps/site/src/components/ecosystem/grid.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const EcosystemGrid = () => {
3333
<div>
3434
{filters.slice(0, -1).map((filter) => (
3535
<div
36+
key={filter}
3637
className={cn(
3738
"flex flex-col gap-12 my-12",
3839
activeFilter !== filter &&
@@ -69,7 +70,7 @@ export const EcosystemGrid = () => {
6970
label={box.type}
7071
></Badge>
7172

72-
<div className="relative after:content-[''] after:absolute after:w-full after:h-full after:z-[10000] after:left-0 after:top-0">
73+
<div className="relative after:content-[''] after:absolute after:w-full after:h-full after:z-10000 after:left-0 after:top-0">
7374
<GitHubButton
7475
href={`https://github.com/${box.githubRepo}`}
7576
data-color-scheme="no-preference: light; light: light; dark: dark;"

apps/site/src/components/homepage/bento.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const Card = ({ card, color }: CardProps) => {
203203
alt={card.title}
204204
width={1200}
205205
height={800}
206-
loading="lazy"
206+
loading="eager"
207207
className="px-4 z-2 pt-0 pb-0 min-w-full min-h-[60%] object-fill object-[top_left] [mask-image:linear-gradient(to_bottom,rgba(0,0,0,1)_60%,transparent_90%)] [-webkit-mask-image:linear-gradient(to_bottom,rgba(0,0,0,1)_60%,transparent_90%)]"
208208
/>
209209
)}

apps/site/src/components/orm/info-stats.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
"use client";
2-
import { FunctionComponent } from "react";
3-
import AnimatedNumbers from "react-animated-numbers";
2+
import { type CSSProperties, FunctionComponent } from "react";
43
import { cn } from "@/lib/cn";
4+
5+
const numberStyle = {
6+
fontStyle: "normal",
7+
fontWeight: 700,
8+
lineHeight: "100%",
9+
letterSpacing: "-0.02em",
10+
} satisfies CSSProperties;
11+
512
export const InfoStats: FunctionComponent<{
613
icon?: any;
714
number?: string;
@@ -12,7 +19,7 @@ export const InfoStats: FunctionComponent<{
1219

1320
return (
1421
match && (
15-
<div className="relative flex items-center cursor-default text-foreground-orm-strong w-full sm:w-fit sm:mx-auto [&>div]:first:flex [&>div]:first:justify-center [&>div]:first:items-center [&>div]:first:mb-[10px] font-sans-display flex-col justify-center items-center">
22+
<div className="relative flex cursor-default text-foreground-orm-strong w-full sm:w-fit sm:mx-auto [&>div]:first:flex [&>div]:first:justify-center [&>div]:first:items-center [&>div]:first:mb-[10px] font-sans-display flex-col justify-center items-center">
1623
{link && (
1724
<a
1825
href={link}
@@ -28,15 +35,7 @@ export const InfoStats: FunctionComponent<{
2835
marginTop: `4px`,
2936
}}
3037
/>
31-
<AnimatedNumbers
32-
animateToNumber={Number(match[1])}
33-
fontStyle={{
34-
fontStyle: "normal",
35-
fontWeight: 700,
36-
lineHeight: "100%",
37-
letterSpacing: "-0.02em",
38-
}}
39-
/>
38+
<span style={numberStyle}>{match[1]}</span>
4039
<span className="-translate-y-1">{match[2]}</span>
4140
</div>
4241
<span className="font-mono text-foreground-neutral-weak text-sm">

apps/site/src/components/postgres.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,23 @@ export function PostgresTabs({ data }: { data: HowSectionData }) {
6969
alt={body.title}
7070
width={1200}
7171
height={800}
72-
loading="lazy"
72+
loading="eager"
7373
className="hidden lg:dark:block md:max-h-83"
7474
/>
7575
<Image
7676
src={`${body.image}_tablet.svg`}
7777
alt={body.title}
7878
width={1200}
7979
height={800}
80-
loading="lazy"
80+
loading="eager"
8181
className="hidden sm:dark:block lg:dark:hidden md:max-h-83"
8282
/>
8383
<Image
8484
src={`${body.image}_mobile.svg`}
8585
alt={body.title}
8686
width={1200}
8787
height={800}
88-
loading="lazy"
88+
loading="eager"
8989
className="hidden dark:block sm:dark:hidden md:max-h-83"
9090
/>
9191

@@ -95,23 +95,23 @@ export function PostgresTabs({ data }: { data: HowSectionData }) {
9595
alt={body.title}
9696
width={1200}
9797
height={800}
98-
loading="lazy"
98+
loading="eager"
9999
className="hidden lg:block dark:hidden md:max-h-83"
100100
/>
101101
<Image
102102
src={`${body.image}_tablet_light.svg`}
103103
alt={body.title}
104104
width={1200}
105105
height={800}
106-
loading="lazy"
106+
loading="eager"
107107
className="hidden sm:block lg:hidden dark:hidden md:max-h-83"
108108
/>
109109
<Image
110110
src={`${body.image}_mobile_light.svg`}
111111
alt={body.title}
112112
width={1200}
113113
height={800}
114-
loading="lazy"
114+
loading="eager"
115115
className="block sm:hidden dark:hidden md:max-h-83"
116116
/>
117117
</>

packages/ui/src/components/youtube-player.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const YouTubePlayer = ({
1111
autoplay = false,
1212
overlay,
1313
playOnView = false,
14+
loading = "lazy",
1415
}: {
1516
className?: string;
1617
serverlessTalk?: boolean;
@@ -19,6 +20,7 @@ export const YouTubePlayer = ({
1920
playOnView?: boolean;
2021
autoplay?: boolean;
2122
overlay?: string;
23+
loading?: "eager" | "lazy";
2224
}) => {
2325
const [playing, setPlaying] = useState(false);
2426
const [shouldAutoplay, setShouldAutoplay] = useState(autoplay);
@@ -97,6 +99,7 @@ export const YouTubePlayer = ({
9799
serverlessTalk && "absolute top-0 left-0 w-full h-full",
98100
)}
99101
height="287"
102+
loading={loading}
100103
src={`https://www.youtube.com/embed/${video}${getAutoplayParams()}`}
101104
title="YouTube Video"
102105
allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; autoplay"

0 commit comments

Comments
 (0)