Skip to content

Commit 7e63fc8

Browse files
committed
Merge branch 'docs/6.11.0' of github.com:prisma/docs into docs/6.11.0
2 parents d23e3f3 + 1cd202b commit 7e63fc8

8 files changed

Lines changed: 36 additions & 29 deletions

File tree

src/components/promo.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,55 @@ export const Promo = () => {
77

88
const promoOptions: PromoOptions = [
99
{
10-
text: `Running a serverless backend? You need a managed connection pool.`,
11-
link: "https://pris.ly/sidebar-promo/managed-connection-pool",
10+
text: `Get a Postgres db in 3 clicks →`,
11+
link: "https://pris.ly/sidebar-promo/pg-3-clicks",
1212
color: "teal",
1313
},
1414
{
15-
text: `Want to make your database perform globally?`,
16-
link: "https://pris.ly/sidebar-promo/make-your-db-global",
17-
color: "teal",
15+
text: `Try Prisma Postgres, our serverless db`,
16+
link: "https://pris.ly/sidebar-promo/pg-from-prisma",
17+
color: "indigo",
1818
},
1919
{
20-
text: `Need your database queries to be 1000x faster?`,
21-
link: "https://pris.ly/sidebar-promo/queries-1000x-faster",
20+
text: `Try Prisma Postgres. No cold starts, just hot queries.`,
21+
link: "https://pris.ly/sidebar-promo/hot-queries",
2222
color: "teal",
2323
},
2424
{
25-
text: `Interested in query caching in just a few lines of code?`,
26-
link: "https://pris.ly/sidebar-promo/caching-few-lines-of-code",
27-
color: "teal",
25+
text: `Yes, we have a database! Try Prisma Postgres →`,
26+
link: "https://pris.ly/sidebar-promo/yes-ppg",
27+
color: "indigo",
2828
},
2929
{
30-
text: `Easily identify and fix slow SQL queries in your app.`,
31-
link: "https://pris.ly/sidebar-promo/identify-fix-sql-queries",
30+
text: `Running a serverless backend? You need a managed connection pool.`,
31+
link: "https://pris.ly/sidebar-promo/managed-connection-pool",
3232
color: "teal",
3333
},
3434
{
35-
text: `Looking to uncover inefficient database operations?`,
36-
link: "https://pris.ly/sidebar-promo/inefficient-db-operations",
37-
color: "indigo",
38-
},
39-
{
40-
text: `Curious about the SQL queries Prisma ORM generates?`,
41-
link: "https://pris.ly/sidebar-promo/sql-queries-in-orm",
35+
text: `Want to decrease global latency for your db queries?`,
36+
link: "https://pris.ly/sidebar-promo/make-your-db-global",
4237
color: "teal",
4338
},
4439
{
45-
text: `Need to improve app performance? Get tailored recommendations.`,
46-
link: "https://pris.ly/sidebar-promo/tailored-recommendations",
40+
text: `Need your database queries to be 1000x faster?`,
41+
link: "https://pris.ly/sidebar-promo/queries-1000x-faster",
4742
color: "teal",
4843
},
4944
{
50-
text: `Your db queries could be faster? Let Optimize figure out why. `,
51-
link: "https://pris.ly/sidebar-promo/faster-db-queries",
45+
text: `Implement query caching in just a few lines of code →`,
46+
link: "https://pris.ly/sidebar-promo/caching-few-lines-of-code",
5247
color: "teal",
5348
},
5449
{
5550
text: `Using Raycast? Try our "docs search" extension. `,
5651
link: "https://pris.ly/sidebar-promo/raycast-extension",
5752
color: "indigo",
5853
},
54+
{
55+
text: `Try the MCP server with your favorite AI tool →`,
56+
link: "https://pris.ly/sidebar-promo/mcp",
57+
color: "indigo",
58+
},
5959
];
6060

6161
let promo = promoOptions[Math.floor(Math.random() * promoOptions.length)];

src/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pre {
164164
}
165165

166166
.theme-doc-sidebar-container {
167-
margin-top: -96px !important;
167+
margin-top: -80px !important;
168168
}
169169

170170
.menu__list-item-collapsible:hover,

src/theme/DocSidebar/Desktop/Content/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function useShowAnnouncementBar() {
2323
return isActive && showAnnouncementBar;
2424
}
2525

26-
export default function DocSidebarDesktopContent({ path, sidebar, className }: Props): JSX.Element {
26+
export default function DocSidebarDesktopContent({ path, sidebar, className, promo }: Props & { promo: boolean }): JSX.Element {
2727
const showAnnouncementBar = useShowAnnouncementBar();
2828

2929
return (
@@ -36,6 +36,7 @@ export default function DocSidebarDesktopContent({ path, sidebar, className }: P
3636
className={clsx(
3737
"menu thin-scrollbar",
3838
styles.menu,
39+
promo && styles.hasPromo,
3940
showAnnouncementBar && styles.menuWithAnnouncementBar,
4041
className
4142
)}

src/theme/DocSidebar/Desktop/Content/styles.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313
.menuWithAnnouncementBar {
1414
margin-bottom: var(--docusaurus-announcement-bar-height);
1515
}
16+
17+
.hasPromo {
18+
margin-top: -16px;
19+
}
1620
}

src/theme/DocSidebar/Desktop/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function DocSidebarDesktop({ path, sidebar, onCollapse, isHidden }: Props) {
1919
} = useThemeConfig();
2020

2121
let location = useLocation();
22-
22+
const hasPromo = (location.pathname.split("/")[1] == "orm" || location.pathname.split("/")[2] == "orm");
2323
return (
2424
<div
2525
className={clsx(
@@ -29,10 +29,10 @@ function DocSidebarDesktop({ path, sidebar, onCollapse, isHidden }: Props) {
2929
)}
3030
>
3131
{hideOnScroll && <Logo tabIndex={-1} className={styles.sidebarLogo} />}
32-
{(location.pathname.split("/")[1] == "orm" || location.pathname.split("/")[2] == "orm") && (
32+
{hasPromo && (
3333
<Promo />
3434
)}
35-
<Content path={path} sidebar={sidebar} />
35+
<Content path={path} sidebar={sidebar} promo={hasPromo} />
3636
{hideable && <CollapseButton onClick={onCollapse} />}
3737
</div>
3838
);

src/theme/Tabs/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ function TabContent({
9393
}
9494
return cloneElement(selectedTabItem, { className: "margin-top--md" });
9595
}
96+
console.log("code: " + code)
9697

9798
return (
9899
<div
99100
className={clsx(
100-
"margin-top--md",
101101
transparent && styles.transparent,
102102
code && styles.code,
103103
fullWidth && styles[`full-width`]
@@ -118,6 +118,7 @@ function TabContent({
118118

119119
function TabsComponent(props) {
120120
const tabs = useTabs(props);
121+
console.log(props)
121122
return (
122123
<div className={clsx("tabs-container", styles.tabList)}>
123124
<TabList {...props} {...tabs} />

src/theme/Tabs/styles.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
}
2020

2121
.code {
22+
margin-top: 0 !important;
2223
pre {
2324
border-top-left-radius: 0;
2425
padding-bottom: 0 !important;
-60.2 KB
Loading

0 commit comments

Comments
 (0)