@primer/doctocat-nextjs 0.5.3-rc.1ab2f8f → 0.5.3-rc.796691c

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.
@@ -1,38 +1,42 @@
1
1
  .Article {
2
2
  display: grid;
3
- grid-template-areas: 'main';
4
- grid-template-columns: 1fr;
5
3
  }
6
4
 
7
5
  .Article--withToc {
8
6
  gap: var(--base-size-48);
9
- grid-template-areas: 'main aside';
10
- grid-template-columns: 1fr 200px;
11
7
  }
12
8
 
13
9
  .main {
14
- grid-area: main;
15
- max-width: 100%;
16
- overflow-x: hidden;
10
+ order: 1;
17
11
  }
18
12
 
19
13
  .aside {
20
- grid-area: aside;
21
- position: relative;
14
+ order: 0;
22
15
  }
23
16
 
24
- @media screen and (max-width: 1023px) {
17
+ @media screen and (max-width: 48rem) {
25
18
  .Article--withToc {
26
- grid-template-areas:
27
- 'aside'
28
- 'main';
29
- grid-template-columns: 1fr;
19
+ display: flex; /* Prevents column overflow */
20
+ flex-direction: column;
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;
30
35
  }
31
36
  }
32
37
 
33
38
  @media screen and (min-width: 2048px) {
34
39
  .Article--withToc {
35
- grid-template-areas: 'main';
36
40
  grid-template-columns: 1fr;
37
41
  }
38
42
  }
@@ -88,16 +88,15 @@ export function IndexCards({route, folderData}: IndexCardsProps) {
88
88
 
89
89
  const thumbnailUrl =
90
90
  colorMode === 'dark'
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) ||
91
+ ? `${basePath ? basePath : ''}${item.frontMatter.thumbnail_darkMode}` ||
92
+ getNextPlaceholderIndex(darkModePlaceholderThumbs).src
93
+ : `${basePath ? basePath : ''}${item.frontMatter.thumbnail}` ||
95
94
  getNextPlaceholderIndex(lightModePlaceholderThumbs).src
96
95
 
97
96
  return (
98
97
  <Grid.Column span={{xsmall: 12, small: 12, medium: 12, large: 6, xlarge: 4}} key={item.frontMatter.title}>
99
98
  <Link legacyBehavior passHref href={item.route}>
100
- <Card href="#" hasBorder fullWidth>
99
+ <Card href="#" hasBorder>
101
100
  <Card.Image src={thumbnailUrl} alt="" aspectRatio="4:3" />
102
101
  <Card.Heading>{item.frontMatter.title}</Card.Heading>
103
102
  {item.frontMatter.description && <Card.Description>{item.frontMatter.description}</Card.Description>}
@@ -26,6 +26,7 @@
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  min-width: 280px;
29
+ right: 0;
29
30
  overflow: auto;
30
31
  padding: var(--base-size-40) var(--base-size-40) var(--base-size-40) 0;
31
32
  top: 65px;
package/css/global.css CHANGED
@@ -18,8 +18,7 @@ body {
18
18
  margin-block-start: 0 !important;
19
19
  }
20
20
 
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 {
21
+ pre {
23
22
  background-color: var(--brand-color-canvas-subtle);
24
23
  border-radius: var(--brand-borderRadius-large);
25
24
  padding-top: 1rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/doctocat-nextjs",
3
- "version": "0.5.3-rc.1ab2f8f",
3
+ "version": "0.5.3-rc.796691c",
4
4
  "description": "A Next.js theme for building Primer documentation sites",
5
5
  "main": "index.js",
6
6
  "type": "module",