Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
32 changes: 31 additions & 1 deletion fern/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ h1, h2, h3 {
gap: 1.5rem;
padding: 1.25rem;
height: 248px;
position: relative;

> a {
max-width: 320px;
Expand All @@ -133,6 +134,20 @@ h1, h2, h3 {

}

/* Divider between row 2 (Docs / CLI Generator) and row 3 (Fern CLI /
Dashboard), spanning the left two columns. The spec column on the
right stacks tightly via translateY, so we do not draw across it. */
&::after {
content: '';
position: absolute;
top: calc(1.25rem + (248px - 2.5rem - 3rem) * 2 / 3 + 2.25rem);
left: 1.25rem;
width: calc((100% - 2.5rem - 3rem) * 2 / 3 + 1.5rem);
height: 1px;
background-color: var(--grayscale-5, rgba(128, 128, 128, 0.15));
pointer-events: none;
}

> a[href*="home"] {
grid-column: 1;
grid-row: 1;
Expand All @@ -148,7 +163,7 @@ h1, h2, h3 {
grid-row: 2;
}

> a[href*="dashboard"] {
> a[href*="cli-generator"] {
grid-column: 2;
grid-row: 2;
}
Expand All @@ -158,6 +173,11 @@ h1, h2, h3 {
grid-row: 3;
}

> a[href*="dashboard"] {
grid-column: 2;
grid-row: 3;
}

> a[href*="openapi"],
> a[href*="asyncapi"],
> a[href*="openrpc"],
Expand Down Expand Up @@ -242,6 +262,16 @@ h1, h2, h3 {
}
}

/* Stacked layout (mobile and tablet, below desktop grid): mirror the desktop
divider by drawing a thin rule above the Fern CLI entry. */
@media (max-width: 1023px) {
.fern-product-selector-radio-group > a[href*="cli-api-reference"] {
border-top: 1px solid var(--grayscale-5, rgba(128, 128, 128, 0.15));
margin-top: 0.5rem;
padding-top: 0.5rem;
}
}

:is(.dark) .fern-product-selector-radio-group a[href*="home"] img {
content: url("https://fern-docs.s3.us-east-2.amazonaws.com/product-switcher/product-switcher-home-dark.png") !important;
}
Expand Down
26 changes: 13 additions & 13 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,19 @@ products:
slug: sdks
subtitle: Generate client libraries in multiple languages

- display-name: CLI Generator
path: ./products/cli-generator/cli-generator.yml
icon: fa-regular fa-rectangle-terminal
image: ./images/product-switcher/product-switcher-cli-generator-light.png
slug: cli-generator
subtitle: Generate a CLI from your API definition

- display-name: Docs
path: ./products/docs/docs.yml
icon: fa-regular fa-browser
image: ./images/product-switcher/product-switcher-docs-light.png
slug: docs
subtitle: Generate beautiful, interactive documentation websites

- display-name: Dashboard
path: ./products/dashboard/dashboard.yml
icon: fa-regular fa-grid-2
image: ./images/product-switcher/product-switcher-dashboard-light.png
slug: dashboard
subtitle: Manage your Fern projects and settings
- display-name: CLI Generator
path: ./products/cli-generator/cli-generator.yml
icon: fa-regular fa-rectangle-terminal
image: ./images/product-switcher/product-switcher-cli-generator-light.png
slug: cli-generator
subtitle: Generate a CLI from your API definition

- display-name: Fern CLI
subtitle: Manage and configure your Fern projects
Expand All @@ -72,6 +65,13 @@ products:
image: ./images/product-switcher/product-switcher-cliapi-light.png
slug: cli-api-reference

- display-name: Dashboard
path: ./products/dashboard/dashboard.yml
icon: fa-regular fa-grid-2
image: ./images/product-switcher/product-switcher-dashboard-light.png
slug: dashboard
subtitle: Manage your Fern projects and settings

- display-name: API Definitions
path: ./products/api-def/api-def.yml
icon: fa-regular fa-book
Expand Down
Loading