Skip to content

Commit fa64325

Browse files
Various fixes (#275)
Co-authored-by: TomuHirata <[email protected]>
1 parent 0b9860f commit fa64325

File tree

11 files changed

+149
-118
lines changed

11 files changed

+149
-118
lines changed

website/src/components/ExpandableGrid/ExpandableGrid.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState } from "react";
2+
import { flushSync } from "react-dom";
23
import styles from "./styles.module.css";
34

45
const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => {
@@ -21,7 +22,17 @@ const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => {
2122
{items.length > defaultVisibleCount && (
2223
<div className={styles.buttonContainer}>
2324
<button
24-
onClick={() => setIsExpanded(!isExpanded)}
25+
onClick={(event) => {
26+
if (isExpanded) {
27+
flushSync(() => setIsExpanded(false));
28+
event.currentTarget.scrollIntoView({
29+
behavior: "smooth",
30+
block: "center",
31+
});
32+
} else {
33+
setIsExpanded(true);
34+
}
35+
}}
2536
className={styles.toggleButton}
2637
>
2738
{isExpanded ? "See Less ∧" : "See All ∨"}

website/src/components/Grid/Grid.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ export const Grid = ({
6060
<div className={grid({ columns, className })}>
6161
{children}
6262
{Array.from({ length: missingSlots }, (_, i) => (
63-
<GridItem key={i} />
63+
<GridItem key={i} filler />
6464
))}
6565
</div>
6666
</div>
6767
);
6868
};
6969

7070
const gridItemVariants = cva(
71-
["flex flex-col items-start p-10 gap-20 justify-between w-full bg-[#0E1416]"],
71+
["flex-col items-start p-10 gap-20 justify-between w-full bg-[#0E1416]"],
7272
{
7373
variants: {
7474
width: {
@@ -78,6 +78,10 @@ const gridItemVariants = cva(
7878
direction: {
7979
reverse: "md:flex-col-reverse",
8080
},
81+
filler: {
82+
true: "hidden md:flex",
83+
false: "flex",
84+
},
8185
},
8286
compoundVariants: [
8387
{
@@ -99,6 +103,9 @@ export const GridItem = ({
99103
children,
100104
width,
101105
direction,
106+
filler = false,
102107
}: PropsWithChildren<VariantProps<typeof gridItem>>) => {
103-
return <div className={gridItem({ width, direction })}>{children}</div>;
108+
return (
109+
<div className={gridItem({ width, direction, filler })}>{children}</div>
110+
);
104111
};

website/src/components/Layout/AboveTheFold.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export function AboveTheFold({
1919
}: Props) {
2020
const bodyParts = Array.isArray(body) ? body : [body];
2121
return (
22-
<div className="flex flex-col min-h-screen">
23-
<div className="flex flex-col justify-center items-center flex-1 gap-6 w-full max-w-5xl mx-auto px-4">
22+
<div className="flex flex-col min-h-screen gap-6">
23+
<div className="flex flex-col justify-center items-center flex-1 gap-6 w-full max-w-5xl mx-auto md:px-4">
2424
{sectionLabel && <SectionLabel label={sectionLabel} />}
2525
<div className="max-w-4xl mx-auto">
2626
<Heading level={1}>{title}</Heading>

website/src/components/Layout/Layout.tsx

Lines changed: 56 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,70 +7,67 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
77

88
type Props = PropsWithChildren;
99

10-
const wrapper = cva(
11-
"flex flex-col gap-20 bg-no-repeat w-full pt-42 pb-20 py-20",
12-
{
13-
variants: {
14-
variant: {
15-
red: "",
16-
blue: "",
17-
colorful: "",
18-
},
19-
direction: {
20-
down: "bg-size-[auto_1000px] 2xl:bg-size-[100%_1000px] bg-[center_top]",
21-
up: "bg-size-[auto_820px] 2xl:bg-size-[100%_820px] bg-[center_top]",
22-
},
10+
const wrapper = cva("flex flex-col gap-20 bg-no-repeat w-full py-10", {
11+
variants: {
12+
variant: {
13+
red: "",
14+
blue: "",
15+
colorful: "",
2316
},
24-
compoundVariants: [
25-
{
26-
variant: "red",
27-
direction: "down",
28-
className: [
29-
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-2.png')]",
30-
],
31-
},
32-
{
33-
variant: "blue",
34-
direction: "down",
35-
className: [
36-
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-3.png')]",
37-
],
38-
},
39-
{
40-
variant: "colorful",
41-
direction: "down",
42-
className: [
43-
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-1.png')]",
44-
],
45-
},
46-
{
47-
variant: "red",
48-
direction: "up",
49-
className: [
50-
"bg-[linear-gradient(to_top,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-2-flipped.png')]",
51-
],
52-
},
53-
{
54-
variant: "blue",
55-
direction: "up",
56-
className: [
57-
"bg-[linear-gradient(to_top,rgba(11,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-3-flipped.png')]",
58-
],
59-
},
60-
{
61-
variant: "colorful",
62-
direction: "up",
63-
className: [
64-
"bg-[linear-gradient(to_top,rgba(11,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-1-flipped.png')]",
65-
],
66-
},
67-
],
68-
defaultVariants: {
17+
direction: {
18+
down: "bg-size-[auto_1000px] 2xl:bg-size-[100%_1000px] bg-[center_top]",
19+
up: "bg-size-[auto_820px] 2xl:bg-size-[100%_820px] bg-[center_top]",
20+
},
21+
},
22+
compoundVariants: [
23+
{
24+
variant: "red",
25+
direction: "down",
26+
className: [
27+
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-2.png')]",
28+
],
29+
},
30+
{
31+
variant: "blue",
32+
direction: "down",
33+
className: [
34+
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-3.png')]",
35+
],
36+
},
37+
{
6938
variant: "colorful",
7039
direction: "down",
40+
className: [
41+
"bg-[linear-gradient(to_bottom,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_50%,rgba(14,20,20,100)_75%),url('/img/background-image-1.png')]",
42+
],
7143
},
44+
{
45+
variant: "red",
46+
direction: "up",
47+
className: [
48+
"bg-[linear-gradient(to_top,rgba(12,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-2-flipped.png')]",
49+
],
50+
},
51+
{
52+
variant: "blue",
53+
direction: "up",
54+
className: [
55+
"bg-[linear-gradient(to_top,rgba(11,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-3-flipped.png')]",
56+
],
57+
},
58+
{
59+
variant: "colorful",
60+
direction: "up",
61+
className: [
62+
"bg-[linear-gradient(to_top,rgba(11,20,20,0)_0%,rgba(12,20,20,0)_10%,rgba(14,20,20,100)_40%),url('/img/background-image-1-flipped.png')]",
63+
],
64+
},
65+
],
66+
defaultVariants: {
67+
variant: "colorful",
68+
direction: "down",
7269
},
73-
);
70+
});
7471

7572
export const LayoutContext = createContext<"red" | "blue" | "colorful">(
7673
"colorful",

website/src/components/Typography/Heading.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { cva, type VariantProps } from "class-variance-authority";
22
import type { PropsWithChildren } from "react";
33

4-
const styles = cva("", {
4+
const styles = cva("hyphens-auto break-word", {
55
variants: {
66
level: {
7-
1: "text-balance font-light text-[64px] leading-[100%] tracking-[-3%] text-center",
8-
2: "text-wrap font-light text-[52px] leading-[120%] tracking-[-1%] text-center text-white",
9-
3: "text-wrap font-regular text-[40px] leading-[120%] tracking-[-1%]",
10-
4: "text-wrap font-regular text-[32px] leading-[120%] tracking-[0%]",
7+
1: "text-balance font-light text-[40px] xxs:text-[52px] xs:text-[64px] leading-[100%] tracking-[-3%] text-center",
8+
2: "text-wrap font-light text-[32px] xxs:text-[40px] xs:text-[52px] leading-[120%] tracking-[-1%] text-center text-white",
9+
3: "text-wrap font-regular text-[24px] xxs:text-[32px] xs:text-[40px] leading-[120%] tracking-[-1%]",
10+
4: "text-wrap font-regular text-[24px] xxs:text-[32px] leading-[120%] tracking-[0%]",
1111
5: "text-wrap font-medium text-[24px] leading-[120%] tracking-[0%]",
1212
},
1313
},
@@ -23,7 +23,12 @@ export const Heading = ({
2323
"aria-level": ariaLevel = level, // use stylistic level by default, but allow aria-level override
2424
}: Props) => {
2525
return (
26-
<div role="heading" aria-level={ariaLevel} className={styles({ level })}>
26+
<div
27+
role="heading"
28+
aria-level={ariaLevel}
29+
className={styles({ level })}
30+
lang="en"
31+
>
2732
{children}
2833
</div>
2934
);

website/src/css/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
--color-brand-teal: #44edbc;
2727

2828
--font-weight-regular: 400;
29+
30+
--breakpoint-xxs: 4rem;
31+
--breakpoint-xs: 32rem;
32+
}
33+
34+
@utility break-word {
35+
word-break: break-word;
2936
}
3037

3138
html {
@@ -66,6 +73,10 @@ a {
6673
color: rgba(255, 255, 255, 0.6) !important;
6774
}
6875

76+
.markdown a {
77+
color: var(--color-brand-teal) !important;
78+
}
79+
6980
a:hover {
7081
text-decoration: none !important;
7182
color: white !important;

website/src/pages/classical-ml/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export default function GenAi(): JSX.Element {
2222
body="From experiment to production, MLflow streamlines your complete machine learning journey with end-to-end tracking, model management, and deployment."
2323
hasGetStartedButton={MLFLOW_DOCS_URL}
2424
bodyColor="white"
25-
>
26-
<div className="md:h-40 lg:h-80" />
27-
</AboveTheFold>
25+
/>
2826

2927
<StickyGrid
3028
cards={[

website/src/pages/genai/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ export default function GenAi(): JSX.Element {
2323
]}
2424
hasGetStartedButton={MLFLOW_DOCS_URL}
2525
bodyColor="white"
26-
>
27-
<div className="md:h-40 lg:h-80" />
28-
</AboveTheFold>
26+
/>
2927

3028
<StickyGrid
3129
cards={[

website/src/pages/index.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,42 @@ export default function Home(): JSX.Element {
1919
<AboveTheFold
2020
title="Deliver production-ready AI"
2121
body="The open source developer platform to build AI applications and models with confidence."
22-
>
23-
<GlossyCardContainer>
24-
<GlossyCard>
25-
<Card
26-
title="GenAI Apps & Agents"
27-
bodySize="m"
28-
body="Enhance your GenAI applications with end-to-end tracking, observability, and evaluations, all in one integrated platform."
29-
padded
30-
rounded={false}
31-
cta={{
32-
href: "/genai",
33-
text: "Learn more",
34-
prominent: true,
35-
}}
36-
image={<img src={GenAI} alt="" className="hidden md:block" />}
37-
/>
38-
</GlossyCard>
39-
<GlossyCard>
40-
<Card
41-
title="Model Training"
42-
bodySize="m"
43-
body="Streamline your machine learning workflows with end-to-end tracking, model management, and deployment."
44-
padded
45-
rounded={false}
46-
cta={{
47-
href: "/classical-ml",
48-
text: "Learn more",
49-
prominent: true,
50-
}}
51-
image={
52-
<img src={ModelTraining} alt="" className="hidden md:block" />
53-
}
54-
/>
55-
</GlossyCard>
56-
</GlossyCardContainer>
57-
</AboveTheFold>
22+
/>
23+
24+
<GlossyCardContainer>
25+
<GlossyCard>
26+
<Card
27+
title="GenAI Apps & Agents"
28+
bodySize="m"
29+
body="Enhance your GenAI applications with end-to-end tracking, observability, and evaluations, all in one integrated platform."
30+
padded
31+
rounded={false}
32+
cta={{
33+
href: "/genai",
34+
text: "Learn more",
35+
prominent: true,
36+
}}
37+
image={<img src={GenAI} alt="" className="hidden md:block" />}
38+
/>
39+
</GlossyCard>
40+
<GlossyCard>
41+
<Card
42+
title="Model Training"
43+
bodySize="m"
44+
body="Streamline your machine learning workflows with end-to-end tracking, model management, and deployment."
45+
padded
46+
rounded={false}
47+
cta={{
48+
href: "/classical-ml",
49+
text: "Learn more",
50+
prominent: true,
51+
}}
52+
image={
53+
<img src={ModelTraining} alt="" className="hidden md:block" />
54+
}
55+
/>
56+
</GlossyCard>
57+
</GlossyCardContainer>
5858

5959
<Customers />
6060
<EcosystemList />

website/src/theme/BlogPostItems/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@ export default function BlogPostItems({
1919

2020
return (
2121
<div className="flex flex-col mb-10 max-w-7xl mx-auto gap-20">
22-
<div className="flex flex-col-reverse md:flex-row gap-10">
22+
<div className="flex flex-col-reverse items-center md:flex-row gap-10">
2323
<Link
2424
href={firstBlogPost.content.metadata.permalink}
25-
className="flex flex-col justify-center items-start gap-4 w-1/2"
25+
className="flex flex-col justify-center items-start gap-4 md:w-1/2"
2626
>
2727
<SectionLabel label="Featured" />
2828
<Heading level={2}>{firstBlogPost.content.metadata.title}</Heading>
2929
<Body size="l">{firstBlogPost.content.metadata.description}</Body>
3030
</Link>
3131
<Link
3232
href={firstBlogPost.content.metadata.permalink}
33-
className="w-1/2"
33+
className="md:w-1/2"
3434
>
3535
<img
3636
src={useBaseUrl(firstBlogPost.content.frontMatter.thumbnail)}
3737
alt={firstBlogPost.content.frontMatter.title}
38-
className="w-full h-full object-cover rounded-md"
38+
className="w-full aspect-video object-cover rounded-md"
3939
/>
4040
</Link>
4141
</div>

0 commit comments

Comments
 (0)