Skip to content

Commit f72216e

Browse files
committed
Tweak static and dynamic links in getting started
1 parent 07a5d8c commit f72216e

File tree

3 files changed

+149
-26
lines changed

3 files changed

+149
-26
lines changed

src/css/custom.css

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,141 @@ code {
12031203
border-width: 1px;
12041204
}
12051205

1206+
.featured-actions > ul {
1207+
list-style: none;
1208+
padding-left: 0;
1209+
1210+
li + li {
1211+
margin-top: var(--ifm-spacing-horizontal);
1212+
}
1213+
1214+
li {
1215+
--featured-actions-chevron-size: 1.125rem;
1216+
--featured-actions-chevron-offset: 1.25rem;
1217+
1218+
position: relative;
1219+
margin: 0;
1220+
padding: 1rem
1221+
calc(
1222+
var(--featured-actions-chevron-offset) +
1223+
var(--featured-actions-chevron-size) + 0.5rem
1224+
)
1225+
1rem 1.25rem;
1226+
border-radius: var(--ifm-alert-border-radius);
1227+
overflow: hidden;
1228+
background-color: var(--ifm-background-surface-color);
1229+
box-shadow: var(--ifm-global-shadow-lw);
1230+
transition: var(--ifm-transition-fast) var(--ifm-transition-timing-default);
1231+
1232+
&::before {
1233+
content: '';
1234+
position: absolute;
1235+
inset: 0;
1236+
border-radius: inherit;
1237+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
1238+
pointer-events: none;
1239+
}
1240+
1241+
&::after {
1242+
position: absolute;
1243+
top: 50%;
1244+
right: var(--featured-actions-chevron-offset);
1245+
z-index: 1;
1246+
width: var(--featured-actions-chevron-size);
1247+
height: var(--featured-actions-chevron-size);
1248+
content: '';
1249+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")
1250+
no-repeat center;
1251+
mask-size: 100% 100%;
1252+
background-color: var(--ifm-color-emphasis-800);
1253+
transform: translateY(-50%);
1254+
transition:
1255+
transform var(--ifm-transition-fast)
1256+
var(--ifm-transition-timing-default),
1257+
background-color var(--ifm-transition-fast)
1258+
var(--ifm-transition-timing-default);
1259+
pointer-events: none;
1260+
}
1261+
1262+
&:hover,
1263+
&:focus-within {
1264+
box-shadow: var(--ifm-global-shadow-md);
1265+
1266+
&::before {
1267+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
1268+
}
1269+
1270+
&::after {
1271+
background-color: var(--ifm-color-primary);
1272+
}
1273+
}
1274+
}
1275+
1276+
li > p {
1277+
margin: 0;
1278+
}
1279+
1280+
li > p + p {
1281+
margin-top: calc(var(--ifm-spacing-vertical) / 2);
1282+
}
1283+
1284+
li:has(> .recommended-badge) {
1285+
display: flex;
1286+
flex-wrap: wrap;
1287+
align-items: center;
1288+
column-gap: 0.75rem;
1289+
row-gap: calc(var(--ifm-spacing-vertical) / 2);
1290+
}
1291+
1292+
li:has(> .recommended-badge) > p:first-child {
1293+
min-width: 0;
1294+
}
1295+
1296+
li:has(> .recommended-badge) > .recommended-badge + p {
1297+
flex-basis: 100%;
1298+
margin-top: 0;
1299+
}
1300+
1301+
li > p:first-child a {
1302+
color: inherit;
1303+
text-decoration: none;
1304+
}
1305+
1306+
li > p:first-child a::before {
1307+
content: '';
1308+
position: absolute;
1309+
inset: 0;
1310+
}
1311+
1312+
.recommended-badge {
1313+
--alert-accent-color: var(--ifm-color-info-dark);
1314+
--recommended-badge-background: hsl(var(--ifm-color-info-hue), 70%, 96.8%);
1315+
--recommended-badge-border: hsl(var(--ifm-color-info-hue), 56%, 85.5%);
1316+
1317+
[data-theme='dark'] & {
1318+
--recommended-badge-background: hsl(
1319+
var(--ifm-color-info-hue),
1320+
46%,
1321+
11.5%
1322+
);
1323+
--recommended-badge-border: hsl(var(--ifm-color-info-hue), 40%, 36%);
1324+
}
1325+
1326+
position: relative;
1327+
z-index: 1;
1328+
display: inline-block;
1329+
padding: 0rem 0.5rem;
1330+
border: 1px solid var(--recommended-badge-border);
1331+
border-radius: 999px;
1332+
background: var(--recommended-badge-background);
1333+
color: var(--alert-accent-color);
1334+
font-size: 0.8125rem;
1335+
font-weight: 600;
1336+
white-space: nowrap;
1337+
pointer-events: none;
1338+
}
1339+
}
1340+
12061341
.image-grid > p {
12071342
display: grid;
12081343
grid-template-columns: repeat(

versioned_docs/version-7.x/getting-started.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,24 +166,18 @@ In `AndroidManifest.xml`, set `android:enableOnBackInvokedCallback` to `false` i
166166

167167
When using React Navigation, you configure [**navigators**](glossary-of-terms.md#navigator) in your app. Navigators handle transitions between screens and provide UI such as headers, tab bars, etc.
168168

169-
:::info
170-
171-
When you use a navigator (such as stack navigator), you'll need to follow that navigator's installation instructions for any additional dependencies.
172-
173-
:::
174-
175169
There are 2 ways to configure navigators:
176170

177-
### Static configuration
171+
<div class="featured-actions">
178172

179-
The static configuration API lets you write your navigation configuration in an object. This reduces boilerplate and simplifies TypeScript types and deep linking. Some aspects can still be changed dynamically.
173+
- **[Static configuration](hello-react-navigation.md?config=static)**
180174

181-
This is the **recommended way** to set up your app. If you need more flexibility later, you can mix and match with the dynamic configuration.
175+
<span class="recommended-badge">Recommended</span>
182176

183-
Continue to ["Hello React Navigation"](hello-react-navigation.md?config=static) to start writing some code with the static API.
177+
Object-based configuration with automatic TypeScript types and deep linking. Supports static screen lists with dynamic navigator options.
184178

185-
### Dynamic configuration
179+
- **[Dynamic configuration](hello-react-navigation.md?config=dynamic)**
186180

187-
The dynamic configuration API lets you write your navigation configuration using React components that can change at runtime based on state or props. This offers more flexibility but requires significantly more boilerplate for TypeScript types, deep linking, etc.
181+
Component-based configuration with significantly more boilerplate. Supports dynamic screen lists and navigator options.
188182

189-
Continue to ["Hello React Navigation"](hello-react-navigation.md?config=dynamic) to start writing some code with the dynamic API.
183+
</div>

versioned_docs/version-8.x/getting-started.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,24 +153,18 @@ In `AndroidManifest.xml`, set `android:enableOnBackInvokedCallback` to `false` i
153153

154154
When using React Navigation, you configure [**navigators**](glossary-of-terms.md#navigator) in your app. Navigators handle transitions between screens and provide UI such as headers, tab bars, etc.
155155

156-
:::info
157-
158-
When you use a navigator (such as stack navigator), you'll need to follow that navigator's installation instructions for any additional dependencies.
159-
160-
:::
161-
162156
There are 2 ways to configure navigators:
163157

164-
### Static configuration
158+
<div class="featured-actions">
165159

166-
The static configuration API lets you write your navigation configuration in an object. This reduces boilerplate and simplifies TypeScript types and deep linking. Some aspects can still be changed dynamically.
160+
- **[Static configuration](hello-react-navigation.md?config=static)**
167161

168-
This is the **recommended way** to set up your app. If you need more flexibility later, you can mix and match with the dynamic configuration.
162+
<span class="recommended-badge">Recommended</span>
169163

170-
Continue to ["Hello React Navigation"](hello-react-navigation.md?config=static) to start writing some code with the static API.
164+
Object-based configuration with automatic TypeScript types and deep linking. Supports static screen lists with dynamic navigator options.
171165

172-
### Dynamic configuration
166+
- **[Dynamic configuration](hello-react-navigation.md?config=dynamic)**
173167

174-
The dynamic configuration API lets you write your navigation configuration using React components that can change at runtime based on state or props. This offers more flexibility but requires significantly more boilerplate for TypeScript types, deep linking, etc.
168+
Component-based configuration with significantly more boilerplate. Supports dynamic screen lists and navigator options.
175169

176-
Continue to ["Hello React Navigation"](hello-react-navigation.md?config=dynamic) to start writing some code with the dynamic API.
170+
</div>

0 commit comments

Comments
 (0)