Skip to content

Various fixes #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion website/src/components/ExpandableGrid/ExpandableGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from "react";
import { flushSync } from "react-dom";
import styles from "./styles.module.css";

const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => {
Expand All @@ -21,7 +22,17 @@ const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => {
{items.length > defaultVisibleCount && (
<div className={styles.buttonContainer}>
<button
onClick={() => setIsExpanded(!isExpanded)}
onClick={(event) => {
if (isExpanded) {
flushSync(() => setIsExpanded(false));
event.currentTarget.scrollIntoView({
behavior: "smooth",
block: "center",
});
} else {
setIsExpanded(true);
}
}}
className={styles.toggleButton}
>
{isExpanded ? "See Less ∧" : "See All ∨"}
Expand Down
13 changes: 10 additions & 3 deletions website/src/components/Grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ export const Grid = ({
<div className={grid({ columns, className })}>
{children}
{Array.from({ length: missingSlots }, (_, i) => (
<GridItem key={i} />
<GridItem key={i} filler />
))}
</div>
</div>
);
};

const gridItemVariants = cva(
["flex flex-col items-start p-10 gap-20 justify-between w-full bg-[#0E1416]"],
["flex-col items-start p-10 gap-20 justify-between w-full bg-[#0E1416]"],
{
variants: {
width: {
Expand All @@ -78,6 +78,10 @@ const gridItemVariants = cva(
direction: {
reverse: "md:flex-col-reverse",
},
filler: {
true: "hidden md:flex",
false: "flex",
},
},
compoundVariants: [
{
Expand All @@ -99,6 +103,9 @@ export const GridItem = ({
children,
width,
direction,
filler = false,
}: PropsWithChildren<VariantProps<typeof gridItem>>) => {
return <div className={gridItem({ width, direction })}>{children}</div>;
return (
<div className={gridItem({ width, direction, filler })}>{children}</div>
);
};
4 changes: 2 additions & 2 deletions website/src/components/Layout/AboveTheFold.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function AboveTheFold({
}: Props) {
const bodyParts = Array.isArray(body) ? body : [body];
return (
<div className="flex flex-col min-h-screen">
<div className="flex flex-col justify-center items-center flex-1 gap-6 w-full max-w-5xl mx-auto px-4">
<div className="flex flex-col min-h-screen gap-6">
<div className="flex flex-col justify-center items-center flex-1 gap-6 w-full max-w-5xl mx-auto md:px-4">
{sectionLabel && <SectionLabel label={sectionLabel} />}
<div className="max-w-4xl mx-auto">
<Heading level={1}>{title}</Heading>
Expand Down
17 changes: 11 additions & 6 deletions website/src/components/Typography/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { cva, type VariantProps } from "class-variance-authority";
import type { PropsWithChildren } from "react";

const styles = cva("", {
const styles = cva("hyphens-auto break-word", {
variants: {
level: {
1: "text-balance font-light text-[64px] leading-[100%] tracking-[-3%] text-center",
2: "text-wrap font-light text-[52px] leading-[120%] tracking-[-1%] text-center text-white",
3: "text-wrap font-regular text-[40px] leading-[120%] tracking-[-1%]",
4: "text-wrap font-regular text-[32px] leading-[120%] tracking-[0%]",
1: "text-balance font-light text-[40px] xxs:text-[52px] xs:text-[64px] leading-[100%] tracking-[-3%] text-center",
2: "text-wrap font-light text-[32px] xxs:text-[40px] xs:text-[52px] leading-[120%] tracking-[-1%] text-center text-white",
3: "text-wrap font-regular text-[24px] xxs:text-[32px] xs:text-[40px] leading-[120%] tracking-[-1%]",
4: "text-wrap font-regular text-[24px] xxs:text-[32px] leading-[120%] tracking-[0%]",
5: "text-wrap font-medium text-[24px] leading-[120%] tracking-[0%]",
},
},
Expand All @@ -23,7 +23,12 @@ export const Heading = ({
"aria-level": ariaLevel = level, // use stylistic level by default, but allow aria-level override
}: Props) => {
return (
<div role="heading" aria-level={ariaLevel} className={styles({ level })}>
<div
role="heading"
aria-level={ariaLevel}
className={styles({ level })}
lang="en"
>
{children}
</div>
);
Expand Down
11 changes: 11 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
--color-brand-teal: #44edbc;

--font-weight-regular: 400;

--breakpoint-xxs: 4rem;
--breakpoint-xs: 32rem;
}

@utility break-word {
word-break: break-word;
}

html {
Expand Down Expand Up @@ -66,6 +73,10 @@ a {
color: rgba(255, 255, 255, 0.6) !important;
}

.markdown a {
color: var(--color-brand-teal) !important;
}

a:hover {
text-decoration: none !important;
color: white !important;
Expand Down
8 changes: 4 additions & 4 deletions website/src/theme/BlogPostItems/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ export default function BlogPostItems({

return (
<div className="flex flex-col mb-10 max-w-7xl mx-auto gap-20">
<div className="flex flex-col-reverse md:flex-row gap-10">
<div className="flex flex-col-reverse items-center md:flex-row gap-10">
<Link
href={firstBlogPost.content.metadata.permalink}
className="flex flex-col justify-center items-start gap-4 w-1/2"
className="flex flex-col justify-center items-start gap-4 md:w-1/2"
>
<SectionLabel label="Featured" />
<Heading level={2}>{firstBlogPost.content.metadata.title}</Heading>
<Body size="l">{firstBlogPost.content.metadata.description}</Body>
</Link>
<Link
href={firstBlogPost.content.metadata.permalink}
className="w-1/2"
className="md:w-1/2"
>
<img
src={useBaseUrl(firstBlogPost.content.frontMatter.thumbnail)}
alt={firstBlogPost.content.frontMatter.title}
className="w-full h-full object-cover rounded-md"
className="w-full aspect-video object-cover rounded-md"
/>
</Link>
</div>
Expand Down
6 changes: 5 additions & 1 deletion website/src/theme/ReleaseLayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default function ReleaseLayout(props) {
<div className="contents text-white **:[nav_ul]:!mb-6">
<BlogSidebar sidebar={sidebar} />
</div>
<main itemScope itemType="https://schema.org/Blog">
<main
itemScope
itemType="https://schema.org/Blog"
className="hyphens-auto break-word"
>
{children}
</main>
{toc && <div className="col col--2">{toc}</div>}
Expand Down