@primer/doctocat-nextjs 0.0.0-20250620104108 → 0.0.0-20250624173308
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
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# @primer/doctocat-nextjs
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20250624173308
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Fake entry to force publishing
|
|
8
8
|
|
|
9
|
-
## 0.
|
|
9
|
+
## 0.5.3
|
|
10
10
|
|
|
11
11
|
### Patch Changes
|
|
12
12
|
|
|
13
|
-
- [#43](https://github.com/primer/doctocat-nextjs/pull/43) [`
|
|
13
|
+
- [#43](https://github.com/primer/doctocat-nextjs/pull/43) [`1b15bdf`](https://github.com/primer/doctocat-nextjs/commit/1b15bdfcf4b54996f38d20f1da711def23c636bd) Thanks [@rezrah](https://github.com/rezrah)! - Fix lack of `basePath` support on index cards. `href` now prepends the `basePath`.
|
|
14
14
|
|
|
15
|
-
- [#46](https://github.com/primer/doctocat-nextjs/pull/46) [`
|
|
15
|
+
- [#46](https://github.com/primer/doctocat-nextjs/pull/46) [`2b99ba6`](https://github.com/primer/doctocat-nextjs/commit/2b99ba614d1bfe8f1c478b10a61c52df479901c9) Thanks [@rezrah](https://github.com/rezrah)! - Prepend `basePath` from `next.config.js` to paths in Doctocat UI components, where it would previously not resolve correctly.
|
|
16
16
|
|
|
17
17
|
## 0.5.2
|
|
18
18
|
|
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
.Article {
|
|
2
2
|
display: grid;
|
|
3
|
+
grid-template-areas: 'main';
|
|
4
|
+
grid-template-columns: 1fr;
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
.Article--withToc {
|
|
6
8
|
gap: var(--base-size-48);
|
|
9
|
+
grid-template-areas: 'main aside';
|
|
10
|
+
grid-template-columns: 1fr 200px;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
.main {
|
|
10
|
-
|
|
14
|
+
grid-area: main;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
overflow-x: hidden;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
.aside {
|
|
14
|
-
|
|
20
|
+
grid-area: aside;
|
|
21
|
+
position: relative;
|
|
15
22
|
}
|
|
16
23
|
|
|
17
|
-
@media screen and (max-width:
|
|
24
|
+
@media screen and (max-width: 1023px) {
|
|
18
25
|
.Article--withToc {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@media screen and (min-width: 1023px) {
|
|
25
|
-
.main {
|
|
26
|
-
order: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.aside {
|
|
30
|
-
order: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.Article--withToc {
|
|
34
|
-
grid-template-columns: 1fr 200px;
|
|
26
|
+
grid-template-areas:
|
|
27
|
+
'aside'
|
|
28
|
+
'main';
|
|
29
|
+
grid-template-columns: 1fr;
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
@media screen and (min-width: 2048px) {
|
|
39
34
|
.Article--withToc {
|
|
35
|
+
grid-template-areas: 'main';
|
|
40
36
|
grid-template-columns: 1fr;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -88,15 +88,16 @@ export function IndexCards({route, folderData}: IndexCardsProps) {
|
|
|
88
88
|
|
|
89
89
|
const thumbnailUrl =
|
|
90
90
|
colorMode === 'dark'
|
|
91
|
-
?
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
? (item.frontMatter.thumbnail_darkMode
|
|
92
|
+
? `${basePath || ''}${item.frontMatter.thumbnail_darkMode}`
|
|
93
|
+
: null) || getNextPlaceholderIndex(darkModePlaceholderThumbs).src
|
|
94
|
+
: (item.frontMatter.thumbnail ? `${basePath || ''}${item.frontMatter.thumbnail}` : null) ||
|
|
94
95
|
getNextPlaceholderIndex(lightModePlaceholderThumbs).src
|
|
95
96
|
|
|
96
97
|
return (
|
|
97
98
|
<Grid.Column span={{xsmall: 12, small: 12, medium: 12, large: 6, xlarge: 4}} key={item.frontMatter.title}>
|
|
98
99
|
<Link legacyBehavior passHref href={item.route}>
|
|
99
|
-
<Card href="#" hasBorder>
|
|
100
|
+
<Card href="#" hasBorder fullWidth>
|
|
100
101
|
<Card.Image src={thumbnailUrl} alt="" aspectRatio="4:3" />
|
|
101
102
|
<Card.Heading>{item.frontMatter.title}</Card.Heading>
|
|
102
103
|
{item.frontMatter.description && <Card.Description>{item.frontMatter.description}</Card.Description>}
|
package/css/global.css
CHANGED
|
@@ -18,7 +18,8 @@ body {
|
|
|
18
18
|
margin-block-start: 0 !important;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
/* Pre styles are scoped to Nextra code blocks to prevent unintended styling of other code blocks (e.g., ReactCodeBlock previews). */
|
|
22
|
+
.nextra-code pre {
|
|
22
23
|
background-color: var(--brand-color-canvas-subtle);
|
|
23
24
|
border-radius: var(--brand-borderRadius-large);
|
|
24
25
|
padding-top: 1rem;
|