@primer/doctocat-nextjs 0.0.0-20251124212930 → 0.0.0-20251124214113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/components/layout/root-layout/Theme.tsx +10 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,6 @@ import '@primer/primitives/dist/css/functional/themes/dark.css'
|
|
|
10
10
|
import {
|
|
11
11
|
Animate,
|
|
12
12
|
AnimationProvider,
|
|
13
|
-
Box,
|
|
14
13
|
ButtonGroup,
|
|
15
14
|
ThemeProvider as BrandThemeProvider,
|
|
16
15
|
Button,
|
|
@@ -38,6 +37,7 @@ import {RelatedContentLinks} from '../related-content-links/RelatedContentLinks'
|
|
|
38
37
|
import {getRelatedPages} from '../related-content-links/getRelatedPages'
|
|
39
38
|
import {hasChildren} from '../../../helpers/hasChildren'
|
|
40
39
|
import {Footer} from '../footer/Footer'
|
|
40
|
+
import styles from './Theme.module.css'
|
|
41
41
|
|
|
42
42
|
const repoSrcPath = process.env.NEXT_PUBLIC_REPO_SRC_PATH || ''
|
|
43
43
|
const repoURL = process.env.NEXT_PUBLIC_REPO || ''
|
|
@@ -119,7 +119,7 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
119
119
|
</Head>
|
|
120
120
|
|
|
121
121
|
<ContentWrapper disableAnimations={disablePageAnimation}>
|
|
122
|
-
<div
|
|
122
|
+
<div className={styles.StickyHeader}>
|
|
123
123
|
<SkipToMainContent href="#main">Skip to main content</SkipToMainContent>
|
|
124
124
|
<Header flatDocsDirectories={flatDocsDirectories} siteTitle={siteTitle} pageMap={pageMap} />
|
|
125
125
|
</div>
|
|
@@ -144,13 +144,9 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
144
144
|
{!isHomePage && (
|
|
145
145
|
<>
|
|
146
146
|
{activePath.length > 0 && (
|
|
147
|
-
<Breadcrumbs>
|
|
147
|
+
<Breadcrumbs className={styles.BreadcrumbRoot}>
|
|
148
148
|
{(activeHeaderLink || siteTitle) && (
|
|
149
|
-
<Breadcrumbs.Item
|
|
150
|
-
as={NextLink}
|
|
151
|
-
href="/"
|
|
152
|
-
style={{color: 'var(--brand-InlineLink-color-rest)'}}
|
|
153
|
-
>
|
|
149
|
+
<Breadcrumbs.Item as={NextLink} href="/">
|
|
154
150
|
{activeHeaderLink ? activeHeaderLink.title : siteTitle}
|
|
155
151
|
</Breadcrumbs.Item>
|
|
156
152
|
)}
|
|
@@ -158,6 +154,8 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
158
154
|
.filter((item, index, array) => {
|
|
159
155
|
const nextItem = array[index + 1]
|
|
160
156
|
|
|
157
|
+
// Skip when current item is a folder followed by its index page
|
|
158
|
+
// or when it is an index page with a tabbed navigation
|
|
161
159
|
return !(
|
|
162
160
|
(index < array.length - 1 &&
|
|
163
161
|
nextItem.name === 'index' &&
|
|
@@ -182,10 +180,7 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
182
180
|
key={item.name}
|
|
183
181
|
href={item.route}
|
|
184
182
|
selected={isLastItem}
|
|
185
|
-
|
|
186
|
-
textTransform: 'capitalize',
|
|
187
|
-
color: 'var(--brand-InlineLink-color-rest)',
|
|
188
|
-
}}
|
|
183
|
+
className={styles.BreadcrumbItem}
|
|
189
184
|
>
|
|
190
185
|
{itemTitle.replace(/-/g, ' ')}
|
|
191
186
|
</Breadcrumbs.Item>
|
|
@@ -207,12 +202,12 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
207
202
|
</Text>
|
|
208
203
|
)}
|
|
209
204
|
{activeMetadata.image && (
|
|
210
|
-
<div
|
|
205
|
+
<div className={styles.HeroImageWrapper}>
|
|
211
206
|
<Hero.Image src={activeMetadata.image} alt={activeMetadata['image-alt']} />
|
|
212
207
|
</div>
|
|
213
208
|
)}
|
|
214
209
|
{activeMetadata['action-1-text'] && (
|
|
215
|
-
<div
|
|
210
|
+
<div className={styles.ActionsWrapper}>
|
|
216
211
|
<ButtonGroup>
|
|
217
212
|
<Button as="a" href={activeMetadata['action-1-link']}>
|
|
218
213
|
{activeMetadata['action-1-text']}
|
|
@@ -238,7 +233,7 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
238
233
|
<>{children}</>
|
|
239
234
|
|
|
240
235
|
{relatedLinks.length > 0 && (
|
|
241
|
-
<div
|
|
236
|
+
<div className={styles.RelatedLinks}>
|
|
242
237
|
<RelatedContentLinks links={relatedLinks} />
|
|
243
238
|
</div>
|
|
244
239
|
)}
|