From bf48a0cb60d2c8ff5efd821b4c4133489e33e1d5 Mon Sep 17 00:00:00 2001
From: PartyParrotGreg <2233348+partyparrotgreg@users.noreply.github.com>
Date: Wed, 10 Dec 2025 17:56:32 +0000
Subject: [PATCH 1/4] feat: Revamp Developer Hub homepage with new content
sections, cards, and shared components; fix Fuel SDK package type
definitions.
---
.../src/app/(homepage)/layout.tsx | 6 +-
.../Pages/Homepage/home-content-cards.tsx | 133 ++++++++++
.../Pages/Homepage/index.module.scss | 31 +--
.../src/components/Pages/Homepage/index.tsx | 227 +++++-------------
.../Pages/Homepage/section-card.module.scss | 20 +-
.../Pages/Homepage/section-card.tsx | 4 +-
.../Pages/Homepage/section.module.scss | 5 +-
.../src/components/Pages/Homepage/section.tsx | 6 +-
.../src/components/ProductCard/index.tsx | 37 +--
.../src/components/Root/global.css | 28 ++-
.../Shared/content-section.module.scss | 15 ++
.../src/components/Shared/content-section.tsx | 13 +
.../src/components/Shared/footer.tsx | 8 +
.../Shared/section-container.module.scss | 14 ++
.../components/Shared/section-container.tsx | 10 +
.../Shared/section-title.module.scss | 24 ++
.../src/components/Shared/section-title.tsx | 17 ++
target_chains/fuel/sdk/js/package.json | 12 +-
18 files changed, 368 insertions(+), 242 deletions(-)
create mode 100644 apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
create mode 100644 apps/developer-hub/src/components/Shared/content-section.module.scss
create mode 100644 apps/developer-hub/src/components/Shared/content-section.tsx
create mode 100644 apps/developer-hub/src/components/Shared/footer.tsx
create mode 100644 apps/developer-hub/src/components/Shared/section-container.module.scss
create mode 100644 apps/developer-hub/src/components/Shared/section-container.tsx
create mode 100644 apps/developer-hub/src/components/Shared/section-title.module.scss
create mode 100644 apps/developer-hub/src/components/Shared/section-title.tsx
diff --git a/apps/developer-hub/src/app/(homepage)/layout.tsx b/apps/developer-hub/src/app/(homepage)/layout.tsx
index 85274122b3..0d2e43c68a 100644
--- a/apps/developer-hub/src/app/(homepage)/layout.tsx
+++ b/apps/developer-hub/src/app/(homepage)/layout.tsx
@@ -2,7 +2,11 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
import type { ReactNode } from "react";
import { baseOptions } from "../../config/layout.config";
+import { PageFooter } from "../../components/Shared/footer";
export default function Layout({ children }: { children: ReactNode }) {
- return {children};
+ return (
+ {children}
+
+ );
}
diff --git a/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
new file mode 100644
index 0000000000..9e75290b70
--- /dev/null
+++ b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
@@ -0,0 +1,133 @@
+import { Book, ChartScatter, CodeBlock, CurrencyDollarSimple, Key, ListChecks, Wrench } from "@phosphor-icons/react/dist/ssr";
+
+
+export type ProductCardConfigType = {
+ title: string;
+ description: string;
+ href: string;
+ features: { label: string }[];
+ quickLinks: { label: string; href: string }[];
+};
+
+
+export const products: ProductCardConfigType[] = [
+ {
+ title: "Pyth Pro",
+ description:
+ "Subscription-based price data for institutions and advanced use cases. Previously known as Lazer.",
+ href: "/price-feeds/pro",
+ features: [
+ { label: "Ultra-low latency" },
+ { label: "Crypto, Equities & Indexes" },
+ { label: "Customizable channels and latency" },
+ { label: "Dedicated support" },
+ ],
+ quickLinks: [
+ {
+ label: "Get Pyth Pro Access Token",
+ href: "/price-feeds/pro/acquire-access-token",
+ },
+ {
+ label: "Browse Supported Feeds",
+ href: "/price-feeds/pro/price-feed-ids",
+ },
+ { label: "Pricing", href: "https://www.pyth.network/pricing" },
+ ],
+ },
+ {
+ title: "Pyth Core",
+ description:
+ "Decentralized price feeds for DeFi and TradFi builders with deterministic on-chain delivery.",
+ href: "/price-feeds/core",
+ features: [
+ { label: "400ms update frequency" },
+ { label: "100+ blockchains" },
+ { label: "Supports Pull and Push updates" },
+ { label: "Decentralized Oracle" },
+ ],
+ quickLinks: [
+ {
+ label: "Supported Blockchains",
+ href: "/price-feeds/core/contract-addresses",
+ },
+ {
+ label: "Browse Supported Feeds",
+ href: "/price-feeds/core/price-feeds",
+ },
+ { label: "API Reference", href: "/price-feeds/core/api-reference" },
+ ],
+ },
+ {
+ title: "Entropy",
+ description:
+ "Secure, Verifiable Random Number Generator for EVM-based smart contracts.",
+ href: "/entropy",
+ features: [
+ { label: "On-chain randomness" },
+ { label: "Verifiable results" },
+ { label: "Pay in native token" },
+ { label: "Supports 20+ EVM chains" },
+ ],
+ quickLinks: [
+ {
+ label: "Chainlist",
+ href: "/entropy/chainlist",
+ },
+ { label: "Protocol Design", href: "/entropy/protocol-design" },
+ {
+ label: "Entropy Explorer",
+ href: "https://entropy-explorer.pyth.network/",
+ },
+ ],
+ },
+];
+
+
+
+export const additionalResources = [
+ {
+ title: "Pyth Token",
+ description: "The native token powering governance and staking across the Pyth Network.",
+ href: "/pyth-token",
+ icon: ,
+ },
+ {
+ title: "Oracle Integrity Staking",
+ description: "Stake PYTH to support data publishers and secure the integrity of Pyth price feeds.",
+ href: "/oracle-integrity-staking",
+ icon: ,
+ },
+ {
+ title: "Pyth Metrics",
+ description: "Track network performance, feed activity, and ecosystem growth in real time.",
+ href: "/metrics",
+ icon: ,
+ },
+];
+
+export const developerResources = [
+ {
+ title: "Get Your Access Token",
+ description: "Request access for the Pyth Ultra Low Latency price feeds.",
+ href: "/access-token",
+ icon:
+ },
+ {
+ title: "Supported Feeds",
+ description: "Explore the complete list of supported price feeds for Pyth Pro.",
+ href: "/price-feeds/pro/price-feed-ids",
+ icon:
+ },
+ {
+ title: "Pyth API Documentation",
+ description: "Learn how to use the Pyth API to access real-time price data.",
+ href: "/api-documentation",
+ icon:
+ },
+ {
+ title: "API Reference",
+ description: "Explore the complete API reference for Pyth Pro.",
+ href: "https://pyth-lazer.dourolabs.app/docs",
+ icon:
+ }
+]
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.module.scss b/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
index 4a691f00d8..7abf4190af 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
@@ -8,24 +8,20 @@
}
.sectionHero {
- position: relative;
- border-bottom: 1px solid theme.color("border");
- background: linear-gradient(
- 180deg,
- theme.color("background", "primary") 0%,
- color-mix(in srgb, theme.color("background", "secondary") 70%, transparent)
- 100%
- );
+ border-bottom: 1px solid var(--color-fd-border);
+ background: var(--color-fd-card);
}
+
+
+
.sectionHeroContent {
display: flex;
flex-direction: column;
- gap: theme.spacing(10);
+ gap: theme.spacing(4);
padding-top: theme.spacing(18);
padding-bottom: theme.spacing(18);
- @include theme.max-width;
@include theme.breakpoint("lg") {
flex-direction: row;
@@ -37,10 +33,9 @@
.heroCopy {
display: flex;
flex-direction: column;
- gap: theme.spacing(6);
flex: 1;
max-width: 34rem;
- color: theme.color("foreground");
+ color: var(--color-fd-foreground);
@include theme.breakpoint("lg") {
max-width: 28rem;
@@ -52,15 +47,13 @@
line-height: 115%;
letter-spacing: theme.letter-spacing("tight");
- color: theme.color("heading");
margin: 0;
}
.heroSubtitle {
@include theme.text("2xl", "normal");
-
line-height: 140%;
- color: theme.color("paragraph");
+ opacity: 0.7;
margin: 0;
}
@@ -77,13 +70,7 @@
.sectionHeaderSubtitle {
@include theme.text("xl", "normal");
-
- color: light-dark(
- theme.pallette-color("stone", 500),
- theme.pallette-color("steel", 400)
- );
- margin-top: theme.spacing(4);
- margin-bottom: theme.spacing(12);
+ opacity: 0.7;
}
.productsGrid {
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.tsx b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
index 88abd19307..1c101dd8d6 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
@@ -1,14 +1,14 @@
import styles from "./index.module.scss";
-import ResourcesForBuildersImage from "./resources-for-builders.svg";
-import { Section } from "./section";
-import { SectionCards, SectionCard } from "./section-card";
-import SignalImage from "./signal.svg";
import { ProductCard } from "../../ProductCard";
+import { SectionTitle } from "../../Shared/section-title";
+import { Card, Cards } from "fumadocs-ui/components/card";
+import { additionalResources, developerResources, products } from "./home-content-cards";
+import { SectionContainer } from "../../Shared/section-container";
-export const Homepage = () => {
- return (
-
-
+export const Homepage = () => (
+
+
+
Developer Hub
@@ -17,15 +17,14 @@ export const Homepage = () => {
-
+
+
-
- Products
-
- Connect to the global market data and randomness layer.
-
+
+
+
- {products.map((product: ProductCardConfig) => (
+ {products.map((product) => (
{
features={product.features}
quickLinks={product.quickLinks}
buttonLabel="Get started"
- buttonHref={product.href}
- />
+ buttonHref={product.href} />
))}
-
+
+
-
}
- >
-
- }
- />
- }
- />
- }
- />
-
-
-
-
- }
- />
- }
- />
- }
- />
- }
- target="_blank"
- />
-
-
-
-
-
- );
-};
+
+
+
+
+
+ {additionalResources.map(({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ))}
+
+
+
+
-function GradientDivider() {
- return ;
-}
+
+
+
+
+
+ {developerResources.map(({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ))}
+
+
+
+
+
+);
-const products: ProductCardConfig[] = [
- {
- title: "Pyth Pro",
- description:
- "Subscription-based price data for institutions and advanced use cases. Previously known as Lazer.",
- href: "/price-feeds/pro",
- features: [
- { label: "Ultra-low latency" },
- { label: "Crypto, Equities & Indexes" },
- { label: "Customizable channels and latency" },
- { label: "Dedicated support" },
- ],
- quickLinks: [
- {
- label: "Get Pyth Pro Access Token",
- href: "/price-feeds/pro/acquire-access-token",
- },
- {
- label: "Browse Supported Feeds",
- href: "/price-feeds/pro/price-feed-ids",
- },
- { label: "Pricing", href: "https://www.pyth.network/pricing" },
- ],
- },
- {
- title: "Pyth Core",
- description:
- "Decentralized price feeds for DeFi and TradFi builders with deterministic on-chain delivery.",
- href: "/price-feeds/core",
- features: [
- { label: "400ms update frequency" },
- { label: "100+ blockchains" },
- { label: "Supports Pull and Push updates" },
- { label: "Decentralized Oracle" },
- ],
- quickLinks: [
- {
- label: "Supported Blockchains",
- href: "/price-feeds/core/contract-addresses",
- },
- {
- label: "Browse Supported Feeds",
- href: "/price-feeds/core/price-feeds",
- },
- { label: "API Reference", href: "/price-feeds/core/api-reference" },
- ],
- },
- {
- title: "Entropy",
- description:
- "Secure, Verifiable Random Number Generator for EVM-based smart contracts.",
- href: "/entropy",
- features: [
- { label: "On-chain randomness" },
- { label: "Verifiable results" },
- { label: "Pay in native token" },
- { label: "Supports 20+ EVM chains" },
- ],
- quickLinks: [
- {
- label: "Chainlist",
- href: "/entropy/chainlist",
- },
- { label: "Protocol Design", href: "/entropy/protocol-design" },
- {
- label: "Entropy Explorer",
- href: "https://entropy-explorer.pyth.network/",
- },
- ],
- },
-];
-type ProductCardConfig = {
- title: string;
- description: string;
- href: string;
- features: { label: string }[];
- quickLinks: { label: string; href: string }[];
-};
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss b/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
index db51efc840..8d29ed4db8 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
@@ -5,11 +5,15 @@
flex-direction: column;
gap: theme.spacing(2);
padding: theme.spacing(6);
- border: 1px solid theme.color("border");
+ border: 1px solid var(--color-fd-border);
border-radius: theme.border-radius("2xl");
- background-color: theme.color("background", "secondary");
- flex: 1;
+
+ .sectionCardImage {
+ position: absolute;
+ top: 8px;
+ right: 8px;
+ }
.sectionCardHeader {
display: flex;
flex-direction: row;
@@ -24,15 +28,7 @@
.sectionCardDescription {
line-height: 140%;
- color: light-dark(
- theme.pallette-color("stone", 500),
- theme.pallette-color("steel", 400)
- );
- }
-
- .sectionCardUrl {
- font-weight: theme.font-weight("medium");
- text-decoration: underline;
+ opacity: 0.7;
}
}
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx b/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
index 363029ad67..f99a601e43 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
@@ -21,7 +21,9 @@ export const SectionCard = ({
{title}
- {image}
+
+ {image}
+
{description}
{url && urlLabel && (
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section.module.scss b/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
index 727fabff5f..bc5a50b120 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
@@ -4,6 +4,7 @@
padding: theme.spacing(34) 0;
padding-left: theme.spacing(20);
padding-right: theme.spacing(20);
+ background: var(--color-fd-card);
.sectionContent {
margin: 0 auto;
@@ -36,7 +37,5 @@
);
}
- &[data-highlight] {
- background-color: theme.color("background", "secondary");
- }
+
}
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section.tsx b/apps/developer-hub/src/components/Pages/Homepage/section.tsx
index 5ec93f2e25..f04d86c123 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/section.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from "react";
import styles from "./section.module.scss";
+import { SectionTitle } from "../../Shared/section-title";
export const Section = ({
title,
@@ -18,10 +19,7 @@ export const Section = ({
{children}
diff --git a/apps/developer-hub/src/components/ProductCard/index.tsx b/apps/developer-hub/src/components/ProductCard/index.tsx
index b8c2043d70..ea0a0f2fb2 100644
--- a/apps/developer-hub/src/components/ProductCard/index.tsx
+++ b/apps/developer-hub/src/components/ProductCard/index.tsx
@@ -2,8 +2,9 @@
import { Lightning } from "@phosphor-icons/react/dist/ssr";
import { Button } from "@pythnetwork/component-library/Button";
+import { Link } from "@pythnetwork/component-library/Link";
import { clsx } from "clsx";
-import Link from "next/link";
+
import { useRouter } from "next/navigation";
import type { ReactNode } from "react";
@@ -62,8 +63,25 @@ export function ProductCard({
{title}
{description &&
{description}
}
{icon &&
{icon}
}
+ {buttonLabel && (
+
+
+
+ )}
+
+
{features && features.length > 0 && (
FEATURES
@@ -89,7 +107,6 @@ export function ProductCard({
{link.label}
@@ -99,21 +116,7 @@ export function ProductCard({
)}
- {buttonLabel && (
-
-
-
- )}
+
);
diff --git a/apps/developer-hub/src/components/Root/global.css b/apps/developer-hub/src/components/Root/global.css
index 7af62f670a..7c54017950 100644
--- a/apps/developer-hub/src/components/Root/global.css
+++ b/apps/developer-hub/src/components/Root/global.css
@@ -25,6 +25,13 @@
/* @import "./theme.css"; this overrides the default colors to match the pyth branding */
/* @import "./fumadocs-global-style-overrides.css"; */
+
+
+table {
+ border-color: var(--color-gray-200, #e5e7eb);
+}
+
+
.light {
--color-fd-background: hsla(0, 16%, 96%, 1);
--color-fd-foreground: hsla(0, 16%, 5%, 1);
@@ -45,6 +52,8 @@
}
.dark {
+ /*
+ OLD COLORS
--color-fd-background: hsl(240, 4%, 11%);
--color-fd-foreground: hsl(250, 18%, 87%);
--color-fd-muted: hsl(0, 3%, 6%);
@@ -60,5 +69,22 @@
--color-fd-secondary-foreground: hsl(250, 18%, 87%);
--color-fd-accent: hsla(0, 0%, 100%, 0.079);
--color-fd-accent-foreground: hsl(250, 18%, 87%);
- --color-fd-ring: hsla(262, 83%, 58%, 1);
+ --color-fd-ring: hsla(262, 83%, 58%, 1); */
+ --color-fd-background: hsl(0, 0%, 7.04%);
+ --color-fd-foreground: hsl(0, 0%, 92%);
+ --color-fd-muted: hsl(0, 0%, 12.9%);
+ --color-fd-muted-foreground: hsla(0, 0%, 70%, 0.8);
+ --color-fd-popover: hsl(0, 0%, 11.6%);
+ --color-fd-popover-foreground: hsl(0, 0%, 86.9%);
+ --color-fd-card: hsl(0, 0%, 9.8%);
+ --color-fd-card-foreground: hsl(0, 0%, 98%);
+ --color-fd-border: hsla(0, 0%, 40%, 20%);
+ --color-fd-primary: hsla(263, 81%, 67%, 1);
+ --color-fd-primary-foreground: hsl(204, 90%, 51%);
+ --color-fd-secondary: hsl(0, 0%, 12.9%);
+ --color-fd-secondary-foreground: hsl(0, 0%, 92%);
+ --color-fd-accent: hsla(0, 0%, 40.9%, 30%);
+ --color-fd-accent-foreground: hsl(0, 0%, 90%);
+ --color-fd-ring: hsl(0, 0%, 54.9%);
+
}
diff --git a/apps/developer-hub/src/components/Shared/content-section.module.scss b/apps/developer-hub/src/components/Shared/content-section.module.scss
new file mode 100644
index 0000000000..1eba1c88b7
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/content-section.module.scss
@@ -0,0 +1,15 @@
+@use "@pythnetwork/component-library/theme";
+
+.section {
+ display: flex;
+ flex-direction: column;
+ gap: theme.spacing(8);
+}
+
+.container {
+ max-width: var(--spacing-fd-container);
+ margin: 0 auto;
+ > *:not(:last-child) {
+ margin-bottom: theme.spacing(20);
+ }
+}
diff --git a/apps/developer-hub/src/components/Shared/content-section.tsx b/apps/developer-hub/src/components/Shared/content-section.tsx
new file mode 100644
index 0000000000..7bf2fbb02e
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/content-section.tsx
@@ -0,0 +1,13 @@
+import { SectionTitle } from "./section-title"
+import styles from "./content-section.module.scss"
+
+export const Section = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/footer.tsx b/apps/developer-hub/src/components/Shared/footer.tsx
new file mode 100644
index 0000000000..ce0e9fa808
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/footer.tsx
@@ -0,0 +1,8 @@
+export const PageFooter = () => {
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/section-container.module.scss b/apps/developer-hub/src/components/Shared/section-container.module.scss
new file mode 100644
index 0000000000..8b2fcea815
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/section-container.module.scss
@@ -0,0 +1,14 @@
+@use "@pythnetwork/component-library/theme";
+
+.container {
+ max-width: var(--spacing-fd-container);
+ margin: 0 auto;
+ padding: 0 theme.spacing(4);
+ > *:not(:last-child) {
+ margin-bottom: theme.spacing(20);
+ }
+
+ @include theme.breakpoint("sm") {
+ padding: 0 theme.spacing(6);
+ }
+}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/section-container.tsx b/apps/developer-hub/src/components/Shared/section-container.tsx
new file mode 100644
index 0000000000..7fac34dfbe
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/section-container.tsx
@@ -0,0 +1,10 @@
+
+import styles from './section-container.module.scss';
+
+export const SectionContainer = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+ {children}
+
+ )
+}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/section-title.module.scss b/apps/developer-hub/src/components/Shared/section-title.module.scss
new file mode 100644
index 0000000000..32f428171e
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/section-title.module.scss
@@ -0,0 +1,24 @@
+@use "@pythnetwork/component-library/theme";
+
+.sectionTitle {
+ display: flex;
+ flex-direction: row;
+ gap: theme.spacing(8);
+ justify-content: space-between;
+}
+
+.title {
+ @include theme.text("3xl", "medium");
+
+ color: theme.color("heading");
+ margin-bottom: theme.spacing(2);
+}
+
+.subtitle {
+ @include theme.text("xl", "normal");
+ opacity: 0.7;
+}
+
+.slot {
+ // placeholder for children
+}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/section-title.tsx b/apps/developer-hub/src/components/Shared/section-title.tsx
new file mode 100644
index 0000000000..b53d1aea4d
--- /dev/null
+++ b/apps/developer-hub/src/components/Shared/section-title.tsx
@@ -0,0 +1,17 @@
+import styles from "./section-title.module.scss";
+
+export const SectionTitle = ({ title, subtitle, children }: {
+ title: string;
+ subtitle: string;
+ children?: React.ReactNode;
+}) => {
+ return (
+
+
+ {children &&
{children}
}
+
+ );
+}
\ No newline at end of file
diff --git a/target_chains/fuel/sdk/js/package.json b/target_chains/fuel/sdk/js/package.json
index 1f318a2b4f..a282d16890 100644
--- a/target_chains/fuel/sdk/js/package.json
+++ b/target_chains/fuel/sdk/js/package.json
@@ -7,7 +7,7 @@
"name": "Pyth Data Association"
},
"main": "./dist/cjs/index.cjs",
- "types": "./dist/cjs/index.d.ts",
+ "types": "./dist/cjs/src/index.d.ts",
"files": [
"dist/**/*"
],
@@ -59,51 +59,41 @@
"exports": {
".": {
"require": {
- "types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.cjs"
},
"import": {
- "types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.mjs"
}
},
"./types/PythContract": {
"require": {
- "types": "./dist/cjs/types/PythContract.d.ts",
"default": "./dist/cjs/types/PythContract.cjs"
},
"import": {
- "types": "./dist/esm/types/PythContract.d.ts",
"default": "./dist/esm/types/PythContract.mjs"
}
},
"./types/PythContractFactory": {
"require": {
- "types": "./dist/cjs/types/PythContractFactory.d.ts",
"default": "./dist/cjs/types/PythContractFactory.cjs"
},
"import": {
- "types": "./dist/esm/types/PythContractFactory.d.ts",
"default": "./dist/esm/types/PythContractFactory.mjs"
}
},
"./types/common": {
"require": {
- "types": "./dist/cjs/types/common.d.ts",
"default": "./dist/cjs/types/common.cjs"
},
"import": {
- "types": "./dist/esm/types/common.d.ts",
"default": "./dist/esm/types/common.mjs"
}
},
"./types": {
"require": {
- "types": "./dist/cjs/types/index.d.ts",
"default": "./dist/cjs/types/index.cjs"
},
"import": {
- "types": "./dist/esm/types/index.d.ts",
"default": "./dist/esm/types/index.mjs"
}
},
From cebc3192e4a8c55f9f0632ecc38b028acc922278 Mon Sep 17 00:00:00 2001
From: PartyParrotGreg <2233348+partyparrotgreg@users.noreply.github.com>
Date: Wed, 10 Dec 2025 19:16:59 +0000
Subject: [PATCH 2/4] feat: Add new BoxSVG component and integrate it into
homepage content and styling.
---
.../src/components/Pages/Homepage/BoxSVG.tsx | 441 ++++++++++++++++++
.../Pages/Homepage/home-content-cards.tsx | 60 ++-
.../src/components/Pages/Homepage/index.tsx | 103 ++--
.../src/components/ProductCard/index.tsx | 140 ++----
.../src/components/Shared/footer.tsx | 12 +-
.../Shared/section-container.module.scss | 1 +
.../Shared/section-title.module.scss | 12 +-
7 files changed, 585 insertions(+), 184 deletions(-)
create mode 100644 apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
diff --git a/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx b/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
new file mode 100644
index 0000000000..c6c398737f
--- /dev/null
+++ b/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
@@ -0,0 +1,441 @@
+import * as React from "react";
+
+export const BoxSVG = (props: React.SVGProps) => (
+
+);
+
diff --git a/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
index 9e75290b70..3e9ba72538 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
@@ -1,26 +1,45 @@
-import { Book, ChartScatter, CodeBlock, CurrencyDollarSimple, Key, ListChecks, Wrench } from "@phosphor-icons/react/dist/ssr";
+import { ArrowsDownUp, Book, ChartScatter, CheckCircle, CodeBlock, Coin, CurrencyBtc, CurrencyDollarSimple, DiceFive, GlobeSimple, Key, Lightning, ListChecks, Network, SlidersHorizontal, Wrench } from "@phosphor-icons/react/dist/ssr";
+import type { ReactNode } from "react";
-export type ProductCardConfigType = {
- title: string;
- description: string;
+
+
+
+type Feature = {
+ label: string;
+ icon?: ReactNode | undefined;
+};
+
+type QuickLink = {
+ label: string;
href: string;
- features: { label: string }[];
- quickLinks: { label: string; href: string }[];
};
+export type ProductCardConfigType = {
+ title: string;
+ badge?: string | undefined;
+ description?: string | undefined;
+ icon?: ReactNode | undefined;
+ features?: Feature[] | undefined;
+ quickLinks?: QuickLink[] | undefined;
+ buttonLabel?: string | undefined;
+ href?: string | undefined;
+ external?: boolean | undefined;
+ className?: string | undefined;
+};
export const products: ProductCardConfigType[] = [
{
- title: "Pyth Pro",
+ title: "Pyth",
+ badge: "PRO",
description:
"Subscription-based price data for institutions and advanced use cases. Previously known as Lazer.",
href: "/price-feeds/pro",
features: [
- { label: "Ultra-low latency" },
- { label: "Crypto, Equities & Indexes" },
- { label: "Customizable channels and latency" },
- { label: "Dedicated support" },
+ { label: "Ultra-low latency", icon: },
+ { label: "Crypto, Equities & Indexes", icon: },
+ { label: "Customizable channels and latency", icon: },
+ { label: "Dedicated support", icon: },
],
quickLinks: [
{
@@ -35,15 +54,16 @@ export const products: ProductCardConfigType[] = [
],
},
{
- title: "Pyth Core",
+ title: "Pyth",
+ badge: "CORE",
description:
"Decentralized price feeds for DeFi and TradFi builders with deterministic on-chain delivery.",
href: "/price-feeds/core",
features: [
- { label: "400ms update frequency" },
- { label: "100+ blockchains" },
- { label: "Supports Pull and Push updates" },
- { label: "Decentralized Oracle" },
+ { label: "400ms update frequency", icon: },
+ { label: "100+ blockchains", icon: },
+ { label: "Supports Pull and Push updates", icon: },
+ { label: "Decentralized Oracle", icon: },
],
quickLinks: [
{
@@ -63,10 +83,10 @@ export const products: ProductCardConfigType[] = [
"Secure, Verifiable Random Number Generator for EVM-based smart contracts.",
href: "/entropy",
features: [
- { label: "On-chain randomness" },
- { label: "Verifiable results" },
- { label: "Pay in native token" },
- { label: "Supports 20+ EVM chains" },
+ { label: "On-chain randomness", icon: },
+ { label: "Verifiable results", icon: },
+ { label: "Pay in native token", icon: },
+ { label: "Supports 20+ EVM chains", icon: },
],
quickLinks: [
{
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.tsx b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
index 1c101dd8d6..bf74fe677b 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
@@ -4,81 +4,78 @@ import { SectionTitle } from "../../Shared/section-title";
import { Card, Cards } from "fumadocs-ui/components/card";
import { additionalResources, developerResources, products } from "./home-content-cards";
import { SectionContainer } from "../../Shared/section-container";
+import { BoxSVG } from "./BoxSVG";
export const Homepage = () => (
-
-
+ <>
+
-
-
-
Developer Hub
-
- Integrate with the global price layer.
-
-
+
+
Developer Hub
+
+ Integrate with the global price layer.
+
-
+
-
+
{products.map((product) => (
-
+
))}
-
+
-
-
-
- {additionalResources.map(({ title, description, href, icon }, index) => (
-
- {description}
-
- ))}
-
-
+
+
+
+
+ {additionalResources.map(({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ))}
+
-
+
-
-
-
- {developerResources.map(({ title, description, href, icon }, index) => (
-
- {description}
-
- ))}
-
-
+
+
+ {developerResources.map(({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ))}
+
-
+ >
);
diff --git a/apps/developer-hub/src/components/ProductCard/index.tsx b/apps/developer-hub/src/components/ProductCard/index.tsx
index ea0a0f2fb2..4f1346256e 100644
--- a/apps/developer-hub/src/components/ProductCard/index.tsx
+++ b/apps/developer-hub/src/components/ProductCard/index.tsx
@@ -1,123 +1,61 @@
"use client";
-
-import { Lightning } from "@phosphor-icons/react/dist/ssr";
+import type { ProductCardConfigType } from "../Pages/Homepage/home-content-cards";
import { Button } from "@pythnetwork/component-library/Button";
import { Link } from "@pythnetwork/component-library/Link";
-import { clsx } from "clsx";
-
-import { useRouter } from "next/navigation";
-import type { ReactNode } from "react";
-
-import styles from "./index.module.scss";
-type Feature = {
- label: string;
- icon?: ReactNode;
-};
-type QuickLink = {
- label: string;
- href: string;
-};
-type ProductCardProps = {
- title: string;
- description?: string;
- icon?: ReactNode;
- features?: Feature[];
- quickLinks?: QuickLink[];
- buttonLabel?: string;
- buttonHref?: string;
- external?: boolean;
- className?: string;
-};
export function ProductCard({
title,
description,
- icon,
features,
quickLinks,
buttonLabel,
- buttonHref,
- external,
- className,
-}: ProductCardProps) {
- const router = useRouter();
-
- const handleButtonClick = () => {
- if (!buttonHref) return;
-
- if (external) {
- window.open(buttonHref, "_blank", "noopener,noreferrer");
- } else {
- router.push(buttonHref);
- }
- };
+ href,
+ badge,
+}: ProductCardConfigType) {
return (
-
-
-
-
-
{title}
- {description &&
{description}
}
- {icon &&
{icon}
}
- {buttonLabel && (
-
-
-
- )}
+
+
+
+
+ {description &&
{description}
}
-
-
- {features && features.length > 0 && (
-
-
FEATURES
-
- {features.map((feature) => (
-
-
- {feature.icon ?? }
-
-
{feature.label}
-
-
- ))}
-
-
- )}
-
- {quickLinks && quickLinks.length > 0 && (
-
-
QUICK LINKS
-
- {quickLinks.map((link) => (
-
- {link.label}
-
- ))}
-
-
- )}
-
-
+
+
+
+
+
Features
+
+ {features?.map((feature, index) => (
+ - {feature.icon && {feature.icon}} {feature.label}
+ ))}
+
+
+
+
Quick Links
+
+ {quickLinks?.map((link, index) => (
+ -
+ {link.label}
+
+ ))}
+
+
);
}
+
+const ProductBadge = ({ badge }: { badge: string }) => {
+ return (
+
{badge}
+ )
+}
+
diff --git a/apps/developer-hub/src/components/Shared/footer.tsx b/apps/developer-hub/src/components/Shared/footer.tsx
index ce0e9fa808..d39e18dc30 100644
--- a/apps/developer-hub/src/components/Shared/footer.tsx
+++ b/apps/developer-hub/src/components/Shared/footer.tsx
@@ -1,8 +1,10 @@
export const PageFooter = () => {
return (
-
- )
+ <>
+
+
+ >)
}
\ No newline at end of file
diff --git a/apps/developer-hub/src/components/Shared/section-container.module.scss b/apps/developer-hub/src/components/Shared/section-container.module.scss
index 8b2fcea815..148cf06cbb 100644
--- a/apps/developer-hub/src/components/Shared/section-container.module.scss
+++ b/apps/developer-hub/src/components/Shared/section-container.module.scss
@@ -3,6 +3,7 @@
.container {
max-width: var(--spacing-fd-container);
margin: 0 auto;
+ width: 100%;
padding: 0 theme.spacing(4);
> *:not(:last-child) {
margin-bottom: theme.spacing(20);
diff --git a/apps/developer-hub/src/components/Shared/section-title.module.scss b/apps/developer-hub/src/components/Shared/section-title.module.scss
index 32f428171e..e0ac6de0d8 100644
--- a/apps/developer-hub/src/components/Shared/section-title.module.scss
+++ b/apps/developer-hub/src/components/Shared/section-title.module.scss
@@ -5,20 +5,22 @@
flex-direction: row;
gap: theme.spacing(8);
justify-content: space-between;
+ max-height: theme.spacing(16);
+ align-items: center;
}
.title {
- @include theme.text("3xl", "medium");
-
+ @include theme.text("2xl", "medium");
color: theme.color("heading");
margin-bottom: theme.spacing(2);
}
.subtitle {
- @include theme.text("xl", "normal");
- opacity: 0.7;
+ @include theme.text("2xl", "normal");
+ opacity: 0.65;
}
.slot {
- // placeholder for children
+ position: relative;
+ z-index: 1;
}
\ No newline at end of file
From 3c6c41d4f5362b64be6c0600353b333943a6d63f Mon Sep 17 00:00:00 2001
From: PartyParrotGreg <2233348+partyparrotgreg@users.noreply.github.com>
Date: Thu, 11 Dec 2025 09:27:25 +0000
Subject: [PATCH 3/4] refactor: Improve code formatting across components and
remove redundant image container from homepage section cards.
---
.../src/app/(homepage)/layout.tsx | 10 +-
.../src/components/Pages/Homepage/BoxSVG.tsx | 441 ------------------
.../src/components/Pages/Homepage/box-svg.tsx | 440 +++++++++++++++++
.../Pages/Homepage/home-content-cards.tsx | 57 ++-
.../Pages/Homepage/index.module.scss | 6 +-
.../src/components/Pages/Homepage/index.tsx | 76 +--
.../Pages/Homepage/section-card.module.scss | 2 +-
.../Pages/Homepage/section-card.tsx | 4 +-
.../Pages/Homepage/section.module.scss | 2 -
.../src/components/ProductCard/index.tsx | 40 +-
.../src/components/Root/global.css | 4 -
.../Shared/content-section.module.scss | 7 +-
.../src/components/Shared/content-section.tsx | 26 +-
.../src/components/Shared/footer.tsx | 21 +-
.../Shared/section-container.module.scss | 3 +-
.../components/Shared/section-container.tsx | 17 +-
.../Shared/section-title.module.scss | 20 +-
.../src/components/Shared/section-title.tsx | 32 +-
18 files changed, 630 insertions(+), 578 deletions(-)
delete mode 100644 apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
create mode 100644 apps/developer-hub/src/components/Pages/Homepage/box-svg.tsx
diff --git a/apps/developer-hub/src/app/(homepage)/layout.tsx b/apps/developer-hub/src/app/(homepage)/layout.tsx
index 0d2e43c68a..0b407c3572 100644
--- a/apps/developer-hub/src/app/(homepage)/layout.tsx
+++ b/apps/developer-hub/src/app/(homepage)/layout.tsx
@@ -5,8 +5,10 @@ import { baseOptions } from "../../config/layout.config";
import { PageFooter } from "../../components/Shared/footer";
export default function Layout({ children }: { children: ReactNode }) {
- return (
- {children}
-
- );
+ return (
+
+ {children}
+
+
+ );
}
diff --git a/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx b/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
deleted file mode 100644
index c6c398737f..0000000000
--- a/apps/developer-hub/src/components/Pages/Homepage/BoxSVG.tsx
+++ /dev/null
@@ -1,441 +0,0 @@
-import * as React from "react";
-
-export const BoxSVG = (props: React.SVGProps
) => (
-
-);
-
diff --git a/apps/developer-hub/src/components/Pages/Homepage/box-svg.tsx b/apps/developer-hub/src/components/Pages/Homepage/box-svg.tsx
new file mode 100644
index 0000000000..91eaff6069
--- /dev/null
+++ b/apps/developer-hub/src/components/Pages/Homepage/box-svg.tsx
@@ -0,0 +1,440 @@
+import * as React from "react";
+
+export const BoxSVG = (props: React.SVGProps) => (
+
+);
diff --git a/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
index 3e9ba72538..b9d6c920c4 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/home-content-cards.tsx
@@ -1,10 +1,23 @@
-import { ArrowsDownUp, Book, ChartScatter, CheckCircle, CodeBlock, Coin, CurrencyBtc, CurrencyDollarSimple, DiceFive, GlobeSimple, Key, Lightning, ListChecks, Network, SlidersHorizontal, Wrench } from "@phosphor-icons/react/dist/ssr";
+import {
+ ArrowsDownUp,
+ Book,
+ ChartScatter,
+ CheckCircle,
+ CodeBlock,
+ Coin,
+ CurrencyBtc,
+ CurrencyDollarSimple,
+ DiceFive,
+ GlobeSimple,
+ Key,
+ Lightning,
+ ListChecks,
+ Network,
+ SlidersHorizontal,
+ Wrench,
+} from "@phosphor-icons/react/dist/ssr";
import type { ReactNode } from "react";
-
-
-
-
type Feature = {
label: string;
icon?: ReactNode | undefined;
@@ -38,7 +51,10 @@ export const products: ProductCardConfigType[] = [
features: [
{ label: "Ultra-low latency", icon: },
{ label: "Crypto, Equities & Indexes", icon: },
- { label: "Customizable channels and latency", icon: },
+ {
+ label: "Customizable channels and latency",
+ icon: ,
+ },
{ label: "Dedicated support", icon: },
],
quickLinks: [
@@ -102,24 +118,25 @@ export const products: ProductCardConfigType[] = [
},
];
-
-
export const additionalResources = [
{
title: "Pyth Token",
- description: "The native token powering governance and staking across the Pyth Network.",
+ description:
+ "The native token powering governance and staking across the Pyth Network.",
href: "/pyth-token",
icon: ,
},
{
title: "Oracle Integrity Staking",
- description: "Stake PYTH to support data publishers and secure the integrity of Pyth price feeds.",
+ description:
+ "Stake PYTH to support data publishers and secure the integrity of Pyth price feeds.",
href: "/oracle-integrity-staking",
icon: ,
},
{
title: "Pyth Metrics",
- description: "Track network performance, feed activity, and ecosystem growth in real time.",
+ description:
+ "Track network performance, feed activity, and ecosystem growth in real time.",
href: "/metrics",
icon: ,
},
@@ -130,24 +147,26 @@ export const developerResources = [
title: "Get Your Access Token",
description: "Request access for the Pyth Ultra Low Latency price feeds.",
href: "/access-token",
- icon:
+ icon: ,
},
{
title: "Supported Feeds",
- description: "Explore the complete list of supported price feeds for Pyth Pro.",
+ description:
+ "Explore the complete list of supported price feeds for Pyth Pro.",
href: "/price-feeds/pro/price-feed-ids",
- icon:
+ icon: ,
},
{
title: "Pyth API Documentation",
- description: "Learn how to use the Pyth API to access real-time price data.",
+ description:
+ "Learn how to use the Pyth API to access real-time price data.",
href: "/api-documentation",
- icon:
+ icon: ,
},
{
title: "API Reference",
description: "Explore the complete API reference for Pyth Pro.",
href: "https://pyth-lazer.dourolabs.app/docs",
- icon:
- }
-]
\ No newline at end of file
+ icon: ,
+ },
+];
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.module.scss b/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
index 7abf4190af..b0b58241cf 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.module.scss
@@ -12,9 +12,6 @@
background: var(--color-fd-card);
}
-
-
-
.sectionHeroContent {
display: flex;
flex-direction: column;
@@ -22,7 +19,6 @@
padding-top: theme.spacing(18);
padding-bottom: theme.spacing(18);
-
@include theme.breakpoint("lg") {
flex-direction: row;
align-items: flex-start;
@@ -52,6 +48,7 @@
.heroSubtitle {
@include theme.text("2xl", "normal");
+
line-height: 140%;
opacity: 0.7;
margin: 0;
@@ -70,6 +67,7 @@
.sectionHeaderSubtitle {
@include theme.text("xl", "normal");
+
opacity: 0.7;
}
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.tsx b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
index bf74fe677b..fbbfa8786c 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
@@ -1,10 +1,14 @@
-import styles from "./index.module.scss";
+import { Card, Cards } from "fumadocs-ui/components/card";
import { ProductCard } from "../../ProductCard";
import { SectionTitle } from "../../Shared/section-title";
-import { Card, Cards } from "fumadocs-ui/components/card";
-import { additionalResources, developerResources, products } from "./home-content-cards";
+import styles from "./index.module.scss";
+import {
+ additionalResources,
+ developerResources,
+ products,
+} from "./home-content-cards";
import { SectionContainer } from "../../Shared/section-container";
-import { BoxSVG } from "./BoxSVG";
+import { BoxSVG } from "./box-svg";
export const Homepage = () => (
<>
@@ -21,7 +25,10 @@ export const Homepage = () => (
-
+
{products.map((product) => (
(
quickLinks={product.quickLinks}
badge={product.badge}
buttonLabel="Get started"
- href={product.href} />
+ href={product.href}
+ />
))}
@@ -40,42 +48,50 @@ export const Homepage = () => (
-
+
- {additionalResources.map(({ title, description, href, icon }, index) => (
-
- {description}
-
- ))}
+ {additionalResources.map(
+ ({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ),
+ )}
-
+
- {developerResources.map(({ title, description, href, icon }, index) => (
-
- {description}
-
- ))}
+ {developerResources.map(
+ ({ title, description, href, icon }, index) => (
+
+ {description}
+
+ ),
+ )}
>
);
-
-
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss b/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
index 8d29ed4db8..2d168bd1d4 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/section-card.module.scss
@@ -7,13 +7,13 @@
padding: theme.spacing(6);
border: 1px solid var(--color-fd-border);
border-radius: theme.border-radius("2xl");
-
.sectionCardImage {
position: absolute;
top: 8px;
right: 8px;
}
+
.sectionCardHeader {
display: flex;
flex-direction: row;
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx b/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
index f99a601e43..e50aac6a58 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/section-card.tsx
@@ -21,9 +21,7 @@ export const SectionCard = ({
{title}
-
- {image}
-
+
{image}
{description}
{url && urlLabel && (
diff --git a/apps/developer-hub/src/components/Pages/Homepage/section.module.scss b/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
index bc5a50b120..1c757c7130 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
+++ b/apps/developer-hub/src/components/Pages/Homepage/section.module.scss
@@ -36,6 +36,4 @@
theme.pallette-color("steel", 400)
);
}
-
-
}
diff --git a/apps/developer-hub/src/components/ProductCard/index.tsx b/apps/developer-hub/src/components/ProductCard/index.tsx
index 4f1346256e..37e70c6ffa 100644
--- a/apps/developer-hub/src/components/ProductCard/index.tsx
+++ b/apps/developer-hub/src/components/ProductCard/index.tsx
@@ -1,10 +1,8 @@
"use client";
-import type { ProductCardConfigType } from "../Pages/Homepage/home-content-cards";
import { Button } from "@pythnetwork/component-library/Button";
import { Link } from "@pythnetwork/component-library/Link";
-
-
+import type { ProductCardConfigType } from "../Pages/Homepage/home-content-cards";
export function ProductCard({
title,
@@ -15,7 +13,6 @@ export function ProductCard({
href,
badge,
}: ProductCardConfigType) {
-
return (
@@ -24,22 +21,34 @@ export function ProductCard({
{title}
{badge &&
}
- {description &&
{description}
}
-
+ {description && (
+
{description}
+ )}
-
+
-
Features
+
+ Features
+
{features?.map((feature, index) => (
- - {feature.icon && {feature.icon}} {feature.label}
+ -
+ {feature.icon && (
+ {feature.icon}
+ )}{" "}
+ {feature.label}
+
))}
-
Quick Links
+
+ Quick Links
+
{quickLinks?.map((link, index) => (
-
@@ -55,7 +64,10 @@ export function ProductCard({
const ProductBadge = ({ badge }: { badge: string }) => {
return (
-
{badge}
- )
-}
-
+
+ {badge}
+
+ );
+};
diff --git a/apps/developer-hub/src/components/Root/global.css b/apps/developer-hub/src/components/Root/global.css
index 7c54017950..a42cb6aefe 100644
--- a/apps/developer-hub/src/components/Root/global.css
+++ b/apps/developer-hub/src/components/Root/global.css
@@ -25,13 +25,10 @@
/* @import "./theme.css"; this overrides the default colors to match the pyth branding */
/* @import "./fumadocs-global-style-overrides.css"; */
-
-
table {
border-color: var(--color-gray-200, #e5e7eb);
}
-
.light {
--color-fd-background: hsla(0, 16%, 96%, 1);
--color-fd-foreground: hsla(0, 16%, 5%, 1);
@@ -86,5 +83,4 @@ table {
--color-fd-accent: hsla(0, 0%, 40.9%, 30%);
--color-fd-accent-foreground: hsl(0, 0%, 90%);
--color-fd-ring: hsl(0, 0%, 54.9%);
-
}
diff --git a/apps/developer-hub/src/components/Shared/content-section.module.scss b/apps/developer-hub/src/components/Shared/content-section.module.scss
index 1eba1c88b7..0bd9a5d0c9 100644
--- a/apps/developer-hub/src/components/Shared/content-section.module.scss
+++ b/apps/developer-hub/src/components/Shared/content-section.module.scss
@@ -1,14 +1,15 @@
@use "@pythnetwork/component-library/theme";
.section {
- display: flex;
- flex-direction: column;
- gap: theme.spacing(8);
+ display: flex;
+ flex-direction: column;
+ gap: theme.spacing(8);
}
.container {
max-width: var(--spacing-fd-container);
margin: 0 auto;
+
> *:not(:last-child) {
margin-bottom: theme.spacing(20);
}
diff --git a/apps/developer-hub/src/components/Shared/content-section.tsx b/apps/developer-hub/src/components/Shared/content-section.tsx
index 7bf2fbb02e..e84ffe5b5d 100644
--- a/apps/developer-hub/src/components/Shared/content-section.tsx
+++ b/apps/developer-hub/src/components/Shared/content-section.tsx
@@ -1,13 +1,17 @@
-import { SectionTitle } from "./section-title"
-import styles from "./content-section.module.scss"
+import styles from "./content-section.module.scss";
+
+import { SectionTitle } from "./section-title";
export const Section = ({ children }: { children: React.ReactNode }) => {
- return (
-
- )
-}
\ No newline at end of file
+ return (
+
+ );
+};
diff --git a/apps/developer-hub/src/components/Shared/footer.tsx b/apps/developer-hub/src/components/Shared/footer.tsx
index d39e18dc30..9413d78293 100644
--- a/apps/developer-hub/src/components/Shared/footer.tsx
+++ b/apps/developer-hub/src/components/Shared/footer.tsx
@@ -1,10 +1,13 @@
export const PageFooter = () => {
- return (
- <>
-
-
- >)
-}
\ No newline at end of file
+ return (
+ <>
+
+
+ >
+ );
+};
diff --git a/apps/developer-hub/src/components/Shared/section-container.module.scss b/apps/developer-hub/src/components/Shared/section-container.module.scss
index 148cf06cbb..0a41c27618 100644
--- a/apps/developer-hub/src/components/Shared/section-container.module.scss
+++ b/apps/developer-hub/src/components/Shared/section-container.module.scss
@@ -5,6 +5,7 @@
margin: 0 auto;
width: 100%;
padding: 0 theme.spacing(4);
+
> *:not(:last-child) {
margin-bottom: theme.spacing(20);
}
@@ -12,4 +13,4 @@
@include theme.breakpoint("sm") {
padding: 0 theme.spacing(6);
}
-}
\ No newline at end of file
+}
diff --git a/apps/developer-hub/src/components/Shared/section-container.tsx b/apps/developer-hub/src/components/Shared/section-container.tsx
index 7fac34dfbe..368a2dcd04 100644
--- a/apps/developer-hub/src/components/Shared/section-container.tsx
+++ b/apps/developer-hub/src/components/Shared/section-container.tsx
@@ -1,10 +1,9 @@
+import styles from "./section-container.module.scss";
-import styles from './section-container.module.scss';
-
-export const SectionContainer = ({ children }: { children: React.ReactNode }) => {
- return (
-
- {children}
-
- )
-}
\ No newline at end of file
+export const SectionContainer = ({
+ children,
+}: {
+ children: React.ReactNode;
+}) => {
+ return {children}
;
+};
diff --git a/apps/developer-hub/src/components/Shared/section-title.module.scss b/apps/developer-hub/src/components/Shared/section-title.module.scss
index e0ac6de0d8..842be9ad2e 100644
--- a/apps/developer-hub/src/components/Shared/section-title.module.scss
+++ b/apps/developer-hub/src/components/Shared/section-title.module.scss
@@ -1,26 +1,28 @@
@use "@pythnetwork/component-library/theme";
.sectionTitle {
- display: flex;
- flex-direction: row;
- gap: theme.spacing(8);
- justify-content: space-between;
- max-height: theme.spacing(16);
- align-items: center;
+ display: flex;
+ flex-direction: row;
+ gap: theme.spacing(8);
+ justify-content: space-between;
+ max-height: theme.spacing(16);
+ align-items: center;
}
.title {
@include theme.text("2xl", "medium");
+
color: theme.color("heading");
margin-bottom: theme.spacing(2);
}
.subtitle {
@include theme.text("2xl", "normal");
+
opacity: 0.65;
}
.slot {
- position: relative;
- z-index: 1;
-}
\ No newline at end of file
+ position: relative;
+ z-index: 1;
+}
diff --git a/apps/developer-hub/src/components/Shared/section-title.tsx b/apps/developer-hub/src/components/Shared/section-title.tsx
index b53d1aea4d..b3d6eae4cb 100644
--- a/apps/developer-hub/src/components/Shared/section-title.tsx
+++ b/apps/developer-hub/src/components/Shared/section-title.tsx
@@ -1,17 +1,21 @@
import styles from "./section-title.module.scss";
-export const SectionTitle = ({ title, subtitle, children }: {
- title: string;
- subtitle: string;
- children?: React.ReactNode;
+export const SectionTitle = ({
+ title,
+ subtitle,
+ children,
+}: {
+ title: string;
+ subtitle: string;
+ children?: React.ReactNode;
}) => {
- return (
-
-
- {children &&
{children}
}
-
- );
-}
\ No newline at end of file
+ return (
+
+
+ {children &&
{children}
}
+
+ );
+};
From e9a5f9defe8d9461f0bd620e2b280db1fb7e9435 Mon Sep 17 00:00:00 2001
From: PartyParrotGreg <2233348+partyparrotgreg@users.noreply.github.com>
Date: Thu, 11 Dec 2025 09:33:09 +0000
Subject: [PATCH 4/4] fixed eslint errors
---
.../developer-hub/src/app/(homepage)/layout.tsx | 2 +-
.../src/components/Pages/Homepage/index.tsx | 17 +++++++++--------
.../src/components/ProductCard/index.tsx | 1 +
.../src/components/Shared/content-section.tsx | 1 -
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/apps/developer-hub/src/app/(homepage)/layout.tsx b/apps/developer-hub/src/app/(homepage)/layout.tsx
index 0b407c3572..0757b7bf9a 100644
--- a/apps/developer-hub/src/app/(homepage)/layout.tsx
+++ b/apps/developer-hub/src/app/(homepage)/layout.tsx
@@ -1,8 +1,8 @@
import { HomeLayout } from "fumadocs-ui/layouts/home";
import type { ReactNode } from "react";
-import { baseOptions } from "../../config/layout.config";
import { PageFooter } from "../../components/Shared/footer";
+import { baseOptions } from "../../config/layout.config";
export default function Layout({ children }: { children: ReactNode }) {
return (
diff --git a/apps/developer-hub/src/components/Pages/Homepage/index.tsx b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
index fbbfa8786c..7354fdb264 100644
--- a/apps/developer-hub/src/components/Pages/Homepage/index.tsx
+++ b/apps/developer-hub/src/components/Pages/Homepage/index.tsx
@@ -1,14 +1,15 @@
import { Card, Cards } from "fumadocs-ui/components/card";
-import { ProductCard } from "../../ProductCard";
-import { SectionTitle } from "../../Shared/section-title";
-import styles from "./index.module.scss";
+
+import { BoxSVG } from "./box-svg";
import {
additionalResources,
developerResources,
products,
} from "./home-content-cards";
+import styles from "./index.module.scss";
+import { ProductCard } from "../../ProductCard";
import { SectionContainer } from "../../Shared/section-container";
-import { BoxSVG } from "./box-svg";
+import { SectionTitle } from "../../Shared/section-title";
export const Homepage = () => (
<>
@@ -56,9 +57,9 @@ export const Homepage = () => (
{additionalResources.map(
- ({ title, description, href, icon }, index) => (
+ ({ title, description, href, icon }) => (
(
/>
{developerResources.map(
- ({ title, description, href, icon }, index) => (
+ ({ title, description, href, icon }) => (
{