Skip to content

Commit dae1984

Browse files
Kapil GowruKapil Gowru
authored andcommitted
fix: changed component bg colors and updated product switcher
1 parent 5cfe180 commit dae1984

File tree

18 files changed

+343
-298
lines changed

18 files changed

+343
-298
lines changed

fern/assets/styles.css

Lines changed: 44 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ h1, h2, h3 {
214214
}
215215
}
216216

217-
> a[href*="fern-def"] {
217+
> a[href*="ferndef"] {
218218
grid-column: 3;
219219
grid-row: 5;
220220
transform: translateY(-96px);
@@ -225,7 +225,7 @@ h1, h2, h3 {
225225
}
226226
}
227227

228-
> a[href*="api-definitions"] {
228+
> a[href="/learn/api-definitions"] {
229229
display: none;
230230
}
231231
}
@@ -1109,86 +1109,58 @@ h1, h2, h3 {
11091109
}
11101110

11111111
/*** START -- HIGHLIGHTED FRAME STYLING ***/
1112-
@keyframes gradient-animation {
1113-
0% {
1114-
background-image:
1115-
radial-gradient(at 40% 20%, hsla(109,80%,78%,1) 0px, transparent 50%),
1116-
radial-gradient(at 0% 100%, hsla(222,83%,81%,1) 0px, transparent 50%),
1117-
radial-gradient(at 0% 50%, hsla(108,91%,90%,1) 0px, transparent 50%),
1118-
radial-gradient(at 80% 100%, hsla(222,75%,72%,1) 0px, transparent 50%),
1119-
radial-gradient(at 35% 74%, hsla(108,91%,90%,1) 0px, transparent 50%),
1120-
radial-gradient(at 85% 14%, hsla(108,91%,90%,1) 0px, transparent 50%),
1121-
radial-gradient(at 25% 10%, hsla(222,83%,81%,1) 0px, transparent 50%);
1122-
}
1123-
25% {
1124-
background-image:
1125-
radial-gradient(at 60% 30%, hsla(109,80%,78%,1) 0px, transparent 50%),
1126-
radial-gradient(at 20% 80%, hsla(222,83%,81%,1) 0px, transparent 50%),
1127-
radial-gradient(at 10% 60%, hsla(108,91%,90%,1) 0px, transparent 50%),
1128-
radial-gradient(at 70% 90%, hsla(222,75%,72%,1) 0px, transparent 50%),
1129-
radial-gradient(at 45% 84%, hsla(108,91%,90%,1) 0px, transparent 50%),
1130-
radial-gradient(at 75% 24%, hsla(108,91%,90%,1) 0px, transparent 50%),
1131-
radial-gradient(at 35% 20%, hsla(222,83%,81%,1) 0px, transparent 50%);
1112+
/* @keyframes gradient-shift {
1113+
0%, 100% {
1114+
background-position: 0% 50%;
11321115
}
11331116
50% {
1134-
background-image:
1135-
radial-gradient(at 50% 40%, hsla(109,80%,78%,1) 0px, transparent 50%),
1136-
radial-gradient(at 10% 90%, hsla(222,83%,81%,1) 0px, transparent 50%),
1137-
radial-gradient(at 20% 40%, hsla(108,91%,90%,1) 0px, transparent 50%),
1138-
radial-gradient(at 90% 80%, hsla(222,75%,72%,1) 0px, transparent 50%),
1139-
radial-gradient(at 25% 64%, hsla(108,91%,90%,1) 0px, transparent 50%),
1140-
radial-gradient(at 95% 34%, hsla(108,91%,90%,1) 0px, transparent 50%),
1141-
radial-gradient(at 15% 30%, hsla(222,83%,81%,1) 0px, transparent 50%);
1142-
}
1143-
75% {
1144-
background-image:
1145-
radial-gradient(at 30% 10%, hsla(109,80%,78%,1) 0px, transparent 50%),
1146-
radial-gradient(at 5% 105%, hsla(222,83%,81%,1) 0px, transparent 50%),
1147-
radial-gradient(at 5% 45%, hsla(108,91%,90%,1) 0px, transparent 50%),
1148-
radial-gradient(at 85% 95%, hsla(222,75%,72%,1) 0px, transparent 50%),
1149-
radial-gradient(at 40% 69%, hsla(108,91%,90%,1) 0px, transparent 50%),
1150-
radial-gradient(at 80% 19%, hsla(108,91%,90%,1) 0px, transparent 50%),
1151-
radial-gradient(at 20% 15%, hsla(222,83%,81%,1) 0px, transparent 50%);
1152-
}
1153-
100% {
1154-
background-image:
1155-
radial-gradient(at 45% 25%, hsla(109,80%,78%,1) 0px, transparent 50%),
1156-
radial-gradient(at 5% 95%, hsla(222,83%,81%,1) 0px, transparent 50%),
1157-
radial-gradient(at 15% 55%, hsla(108,91%,90%,1) 0px, transparent 50%),
1158-
radial-gradient(at 75% 105%, hsla(222,75%,72%,1) 0px, transparent 50%),
1159-
radial-gradient(at 50% 80%, hsla(108,91%,90%,1) 0px, transparent 50%),
1160-
radial-gradient(at 90% 20%, hsla(108,91%,90%,1) 0px, transparent 50%),
1161-
radial-gradient(at 30% 5%, hsla(222,83%,81%,1) 0px, transparent 50%);
1117+
background-position: 100% 50%;
11621118
}
1163-
}
1119+
} */
11641120

11651121
.highlight-frame {
11661122
/* background-color: var(--accent-a2); */
11671123
background-color:hsla(222,58%,66%,1);
1168-
background-image:
1169-
radial-gradient(at 40% 20%, hsla(109,80%,78%,1) 0px, transparent 50%),
1170-
radial-gradient(at 0% 100%, hsla(222,83%,81%,1) 0px, transparent 50%),
1171-
radial-gradient(at 0% 50%, hsla(108,91%,90%,1) 0px, transparent 50%),
1172-
radial-gradient(at 80% 100%, hsla(222,75%,72%,1) 0px, transparent 50%),
1173-
radial-gradient(at 35% 74%, hsla(108,91%,90%,1) 0px, transparent 50%),
1174-
radial-gradient(at 85% 14%, hsla(108,91%,90%,1) 0px, transparent 50%),
1175-
radial-gradient(at 25% 10%, hsla(222,83%,81%,1) 0px, transparent 50%);
1176-
border-radius: 0.75rem;
1177-
padding: 1rem;
1124+
background:
1125+
radial-gradient(circle at 20% 50%, hsla(109,80%,78%,0.8) 0%, transparent 50%),
1126+
radial-gradient(circle at 80% 50%, hsla(222,83%,81%,0.8) 0%, transparent 50%),
1127+
radial-gradient(circle at 50% 20%, hsla(108,91%,90%,0.7) 0%, transparent 50%),
1128+
radial-gradient(circle at 50% 80%, hsla(222,75%,72%,0.7) 0%, transparent 50%),
1129+
hsla(222,58%,66%,1);
1130+
background-size: 100% 100%;
1131+
border-radius: 1rem;
1132+
padding: 0.5rem;
11781133
margin: 1rem 0;
1179-
animation: gradient-animation 15s ease-in-out infinite alternate;
1180-
background-size: 200% 200%;
1181-
}
1134+
/* animation: gradient-shift 20s ease-in-out infinite; */
11821135

1183-
.highlight-frame > *:first-child {
1184-
margin-top: 0;
1185-
}
1136+
.highlight-frame-content {
1137+
padding: 1rem;
1138+
background-color: var(--background, lightdark(#fff,#000));
1139+
border-radius: 0.5rem;
1140+
overflow: hidden;
11861141

1187-
.highlight-frame > *:last-child {
1188-
margin-bottom: 0;
1189-
}
1142+
> *:first-child {
1143+
margin-top: 0;
1144+
}
1145+
1146+
> *:last-child {
1147+
margin-bottom: 0;
1148+
}
1149+
}
1150+
1151+
.highlight-frame-content-not-prose {
1152+
padding: 0.5rem;
1153+
background-color: var(--background, lightdark(#fff,#000));
1154+
border-radius: 0.5rem;
1155+
overflow: hidden;
1156+
}
11901157

1191-
:is(.dark) .highlight-frame {
1192-
background-color: var(--accent-a3);
1158+
> *:first-child {
1159+
margin-top: 0;
1160+
}
1161+
1162+
> *:last-child {
1163+
margin-bottom: 0;
1164+
}
11931165
}
11941166
/*** END -- HIGHLIGHTED FRAME STYLING ***/

fern/docs.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,34 +61,29 @@ products:
6161
slug: api-definitions
6262

6363
- display-name: OpenAPI
64-
path: ./products/api-def/openapi-def.yml
64+
href: /learn/api-definitions/openapi/overview
6565
icon: fa-regular fa-book
6666
image: ./images/product-switcher/openapi-definition-light.png
67-
slug: openapi-definition
6867

6968
- display-name: AsyncAPI
70-
path: ./products/api-def/asyncapi-def.yml
69+
href: /learn/api-definitions/asyncapi/overview
7170
icon: fa-regular fa-bolt
7271
image: ./images/product-switcher/asyncapi-light.png
73-
slug: asyncapi-definition
7472

7573
- display-name: OpenRPC
76-
path: ./products/api-def/openrpc-def.yml
74+
href: /learn/api-definitions/openrpc/overview
7775
icon: fa-regular fa-code
7876
image: ./images/product-switcher/openrpc-light.png
79-
slug: openrpc-definition
8077

8178
- display-name: gRPC
82-
path: ./products/api-def/grpc-def.yml
79+
href: /learn/api-definitions/grpc/overview
8380
icon: fa-regular fa-plug
8481
image: ./images/product-switcher/grpc-light.png
85-
slug: grpc-definition
8682

8783
- display-name: Fern Definition
88-
path: ./products/api-def/ferndef-def.yml
84+
href: /learn/api-definitions/ferndef/overview
8985
icon: fa-regular fa-seedling
9086
image: ./images/product-switcher/fern-definition-light.png
91-
slug: fern-definition
9287

9388
css: ./assets/styles.css
9489

fern/fern.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization": "fern",
3-
"version": "0.95.0"
4-
}
3+
"version": "0.107.3"
4+
}

fern/products/docs/pages/component-library/default-components/anchor.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ The `<Anchor>` component creates direct links to specific content like paragraph
1414
Wrap your content with the `<Anchor>` tag and assign it a custom anchor ID, which you can link to in URLs using the hash symbol (example: `https://website.com/page#data`).
1515

1616
<div className="highlight-frame">
17-
<Anchor id="data">This sentence has a custom anchor named `#data`</Anchor>. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data.
17+
<div className="highlight-frame-content">
18+
<Anchor id="data">This sentence has a custom anchor named `#data`</Anchor>. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data.
19+
</div>
1820
</div>
1921

2022
```jsx Markdown
@@ -26,17 +28,18 @@ Wrap your content with the `<Anchor>` tag and assign it a custom anchor ID, whic
2628
### Anchor a table
2729

2830
<div className="highlight-frame">
31+
<div className="highlight-frame-content">
2932
<Anchor id="api-endpoints">
30-
3133
| Endpoint | Method | Description |
3234
|----------|--------|-------------|
3335
| `/plants` | GET | Retrieve all plants |
3436
| `/plants/:id` | GET | Retrieve a specific plant |
3537
| `/plants` | POST | Create a new plant |
3638

3739
</Anchor>
40+
<p>You can link directly to the [API endpoints table](#api-endpoints).</p>
41+
</div>
3842

39-
You can link directly to the [API endpoints table](#api-endpoints).
4043
</div>
4144

4245
```jsx Markdown
@@ -56,8 +59,8 @@ You can link directly to the [API endpoints table](#api-endpoints).
5659
### Anchor a code block
5760

5861
<div className="highlight-frame">
62+
<div className="highlight-frame-content">
5963
<Anchor id="example-code">
60-
6164
```python
6265
def water_plant(plant_id, amount):
6366
"""Water a plant with specified amount"""
@@ -68,6 +71,7 @@ You can link directly to the [API endpoints table](#api-endpoints).
6871
```
6972
Reference the [watering code example](#example-code) in your implementation.
7073
</Anchor>
74+
</div>
7175
</div>
7276

7377
````jsx Markdown

fern/products/docs/pages/component-library/default-components/badges.mdx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Use the `<Badge>` component to display small pieces of information, such as stat
88
## Usage
99

1010
<div className="highlight-frame">
11-
### Plant Care API <Badge intent="info">v2.1.0</Badge> <Badge intent="launch" minimal>New</Badge>
11+
<div className="highlight-frame-content">
12+
### Plant Care API <Badge intent="info">v2.1.0</Badge> <Badge intent="launch" minimal>New</Badge>
13+
</div>
1214
</div>
1315

1416
```jsx Markdown
@@ -20,14 +22,18 @@ Use the `<Badge>` component to display small pieces of information, such as stat
2022
### Intents
2123

2224
<div className="highlight-frame">
23-
<Badge intent="success">Success</Badge>
24-
<Badge intent="note">Note</Badge>
25-
<Badge intent="tip">Tip</Badge>
26-
<Badge intent="warning">Warning</Badge>
27-
<Badge intent="error">Error</Badge>
28-
<Badge intent="info">Info</Badge>
29-
<Badge intent="launch">Launch</Badge>
30-
<Badge intent="check">Check</Badge>
25+
<div className="highlight-frame-content">
26+
<div className="flex flex-wrap gap-2">
27+
<Badge intent="success">Success</Badge>
28+
<Badge intent="note">Note</Badge>
29+
<Badge intent="tip">Tip</Badge>
30+
<Badge intent="warning">Warning</Badge>
31+
<Badge intent="error">Error</Badge>
32+
<Badge intent="info">Info</Badge>
33+
<Badge intent="launch">Launch</Badge>
34+
<Badge intent="check">Check</Badge>
35+
</div>
36+
</div>
3137
</div>
3238

3339
```jsx Markdown
@@ -44,10 +50,14 @@ Use the `<Badge>` component to display small pieces of information, such as stat
4450
### Styles
4551

4652
<div className="highlight-frame">
47-
<Badge intent="success" minimal>Success badge, minimal style</Badge>
48-
<Badge intent="error" minimal>Error badge, minimal style</Badge>
49-
<Badge intent="success" outlined>Success badge, outlined style</Badge>
50-
<Badge intent="error" minimal outlined>Error badge, outlined and minimal style</Badge>
53+
<div className="highlight-frame-content">
54+
<div className="flex flex-wrap gap-2">
55+
<Badge intent="success" minimal>Success badge, minimal style</Badge>
56+
<Badge intent="error" minimal>Error badge, minimal style</Badge>
57+
<Badge intent="success" outlined>Success badge, outlined style</Badge>
58+
<Badge intent="error" minimal outlined>Error badge, outlined and minimal style</Badge>
59+
</div>
60+
</div>
5161
</div>
5262

5363
```jsx Markdown

0 commit comments

Comments
 (0)