Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run prettier #6261

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,7 @@ const config: Config = {
block: { start: "add-start", end: "add-end" },
},
{
className:
"theme-code-block-deleted-line deleted-line code-highlight",
className: "theme-code-block-deleted-line deleted-line code-highlight",
line: "delete-next-line",
block: { start: "delete-start", end: "delete-end" },
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/newsletter/FooterNewsletterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from "./styles.module.scss";
import { Icon } from "../Icon";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";

namespace S { }
namespace S {}

const icon = (name: string) => <Icon size="1.125rem" color="rgb(113, 128, 150)" icon={name} />;
type ColorType = "indigo" | "teal" | "white" | undefined;
Expand Down
3 changes: 1 addition & 2 deletions src/components/promo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ export const Promo = () => {
link: "https://pris.ly/sidebar-promo/tailored-recommendations",
color: "teal",
},
{
{
text: `Your db queries could be faster? Let Optimize figure out why. `,
link: "https://pris.ly/sidebar-promo/faster-db-queries",
color: "teal",
},

];

let promo = promoOptions[Math.floor(Math.random() * promoOptions.length)];
Expand Down
7 changes: 3 additions & 4 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ hr {
font-size: 24px !important;
}

.internal>i {
.internal > i {
display: none;
}

Expand Down Expand Up @@ -965,7 +965,6 @@ hr {
transition: background-size 0.7s ease 0s;
}


.table-of-contents__link--active {
background-size: 100% 2px;
}
Expand Down Expand Up @@ -1036,11 +1035,11 @@ hr {
color: white !important;
}

:root[data-theme="light"] .table-of-contents__link:hover{
:root[data-theme="light"] .table-of-contents__link:hover {
color: rgb(26, 32, 44) !important;
}

:root[data-theme="dark"] .table-of-contents__link:hover{
:root[data-theme="dark"] .table-of-contents__link:hover {
color: #f7fafc !important;
}

Expand Down
38 changes: 19 additions & 19 deletions src/css/theming.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
--community-bgd-color: var(--gray-100);
--shadow-card-bg: #fff;
--badge-bg-color: rgb(237, 242, 247);
--badge-color: #4A5568;
--badge-color: #4a5568;

--main-bgd-color: #f7fafc;
--header-bg-color: #ffffff;
Expand All @@ -93,7 +93,7 @@
--brand-primary: rgb(90, 103, 216);
--ifm-hover-overlay: var(--indigo-700);
/* Code blocks */
--code-inner-color: #A0AEC0;
--code-inner-color: #a0aec0;
--code-token1-color: #d5408c;
--code-token2-color: #805ad5;
--code-token3-color: #319795;
Expand Down Expand Up @@ -126,7 +126,7 @@
background-color: var(--white-color);

--homepage-header-bg: rgb(247, 250, 252);
--menu-link-code: #4A5568;
--menu-link-code: #4a5568;
/* Colors */
--indigo-100: #ebf4ff;
--indigo-200: #c3dafe;
Expand Down Expand Up @@ -164,7 +164,7 @@
/* PRIMITES WITH THEME DEFINED BY TOGGLER */
html[data-theme="dark"] {
--docsearch-searchbox-background: var(--gray-900) !important;
--table-of-contents-link: #A0AEC0;
--table-of-contents-link: #a0aec0;
--ifm-blockquote-border-color: transparent;
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
Expand Down Expand Up @@ -211,8 +211,8 @@ html[data-theme="dark"] {
--header-bg-color: #1a202c;
--selection-bgd-color: #0c344b;
--white-color: #ffffff;
--ifm-link-color: #43BAEC;
--code-bgd-color: #1A202C;
--ifm-link-color: #43baec;
--code-bgd-color: #1a202c;
--code-inline-bgd-color: #2d3748;
--list-bullet-color: #a0aec0;
--search-highlight-bg-color: #ebf8ff;
Expand All @@ -227,7 +227,7 @@ html[data-theme="dark"] {
--ifm-navbar-background-color: var(--gray-1000);
--ifm-navbar-link-color: #e2e8f0;
/* Code blocks */
--code-inner-color: #4A5568;
--code-inner-color: #4a5568;
--code-token1-color: #d5408c;
--code-token2-color: #805ad5;
--code-token3-color: #319795;
Expand All @@ -251,7 +251,7 @@ html[data-theme="dark"] {
--grey-bg-color: #8fa6b2;
--dark-color: rgb(12, 52, 75);
--homepage-header-bg: var(--gray-900);
--menu-link-code: #E2E8F0;
--menu-link-code: #e2e8f0;
}

/* PRIMITES WITH THEME DEFINED */
Expand Down Expand Up @@ -309,14 +309,14 @@ html[data-theme="dark"] {
--community-bgd-color: var(--gray-100);
--shadow-card-bg: #fff;
--badge-bg-color: rgb(237, 242, 247);
--badge-color: #4A5568;
--badge-color: #4a5568;

--main-bgd-color: #f7fafc;
--header-bg-color: #ffffff;
--selection-bgd-color: #0c344b;
--white-color: #ffffff;
--ifm-link-color: #3182ce;
--ifm-menu-color-active: #3182ce;
--ifm-menu-color-active: #3182ce;
--border-color: #e2e8f0;
--code-bgd-color: #f6f8fa;
--code-inline-bgd-color: #edf2f7;
Expand All @@ -332,7 +332,7 @@ html[data-theme="dark"] {
--brand-primary: rgb(90, 103, 216);
--ifm-hover-overlay: var(--indigo-700);
/* Code blocks */
--code-inner-color: #A0AEC0;
--code-inner-color: #a0aec0;
--code-token1-color: #d5408c;
--code-token2-color: #805ad5;
--code-token3-color: #319795;
Expand Down Expand Up @@ -364,7 +364,7 @@ html[data-theme="dark"] {
color: var(--main-font-color);
background-color: var(--white-color);
--homepage-header-bg: rgb(247, 250, 252);
--menu-link-code: #4A5568;
--menu-link-code: #4a5568;
/* Colors */
--indigo-100: #ebf4ff;
--indigo-200: #c3dafe;
Expand All @@ -389,7 +389,7 @@ html[data-theme="dark"] {

:root[data-theme="dark"] {
--docsearch-searchbox-background: var(--gray-900) !important;
--table-of-contents-link: #A0AEC0;
--table-of-contents-link: #a0aec0;
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
Expand Down Expand Up @@ -434,10 +434,10 @@ html[data-theme="dark"] {
--header-bg-color: #1a202c;
--selection-bgd-color: #0c344b;
--white-color: #ffffff;
--ifm-link-color: #43BAEC;
--ifm-menu-color-active: #43BAEC;
--ifm-link-color: #43baec;
--ifm-menu-color-active: #43baec;
--ifm-link-hover-color: #5196d7;
--code-bgd-color: #1A202C;
--code-bgd-color: #1a202c;
--code-inline-bgd-color: #2d3748;
--list-bullet-color: #a0aec0;
--search-highlight-bg-color: #ebf8ff;
Expand All @@ -452,7 +452,7 @@ html[data-theme="dark"] {
--ifm-navbar-background-color: var(--gray-1000);
--ifm-navbar-link-color: #e2e8f0;
/* Code blocks */
--code-inner-color: #4A5568;
--code-inner-color: #4a5568;
--code-token1-color: #d5408c;
--code-token2-color: #805ad5;
--code-token3-color: #319795;
Expand All @@ -477,7 +477,7 @@ html[data-theme="dark"] {
--dark-color: rgb(12, 52, 75);

--homepage-header-bg: var(--gray-900);
--menu-link-code: #E2E8F0;
--menu-link-code: #e2e8f0;
}
}

Expand All @@ -490,4 +490,4 @@ html[data-theme="dark"] {

html[data-theme="dark"] .external-link {
fill: pink;
}
}
22 changes: 12 additions & 10 deletions src/data/indexData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const ProductLinkData = {
poptimize: {
title: "Optimize your database queries",
//eyebrow: "Fortify",
description: "Use <b>Prisma Optimize</b> to generate insights and get recommendations to improve your database queries, making your application run faster.",
description:
"Use <b>Prisma Optimize</b> to generate insights and get recommendations to improve your database queries, making your application run faster.",
links: [
{
url: "/optimize",
Expand Down Expand Up @@ -86,13 +87,14 @@ export const ORMCardLinkData = {

reference: {
title: "Platform Reference",
description: "Understand the usage and API surface of our platform products built on top of Prisma ORM.",
description:
"Understand the usage and API surface of our platform products built on top of Prisma ORM.",
links: [
{
url: "/accelerate/api-reference",
title: "Accelerate API reference",
},

{
url: "/pulse/api-reference",
title: "Pulse API reference",
Expand Down Expand Up @@ -145,7 +147,7 @@ export const GeneralLinks_Build = [
url: "/orm/prisma-client/queries/crud",
icon: "fa-solid fa-arrow-right-arrow-left",
},
{
{
title: `Adopting Prisma ORM`,
description: "Migrate to Prisma ORM from other ORMs.",
url: "/orm/more/migrating-to-prisma",
Expand All @@ -158,8 +160,6 @@ export const GeneralLinks_Build = [
url: "/orm/prisma-client/deployment",
icon: "fa-solid fa-book",
},


];

export const GeneralLinks_Fortify = [
Expand All @@ -171,7 +171,8 @@ export const GeneralLinks_Fortify = [
},
{
title: `Recommendations`,
description: "Explore the different recommendations such as indexing issues, excessive data retrieval, and inefficient query patterns.",
description:
"Explore the different recommendations such as indexing issues, excessive data retrieval, and inefficient query patterns.",
url: "/optimize/recommendations",
icon: "fa-solid fa-chart-simple",
},
Expand All @@ -183,17 +184,18 @@ export const GeneralLinks_Fortify = [
},
];


export const GeneralLinks_Grow = [
{
title: `Connection pooling`,
description: "Adjust pool size, configure timeouts, and enable autoscaling to improve performance.",
description:
"Adjust pool size, configure timeouts, and enable autoscaling to improve performance.",
url: "/accelerate/connection-pooling",
icon: "fa-solid fa-bolt",
},
{
title: `Database caching`,
description: "How to improve query performance by configuring cache behavior using TTL and SWR.",
description:
"How to improve query performance by configuring cache behavior using TTL and SWR.",
url: "/accelerate/caching",
icon: "fa-solid fa-bolt",
},
Expand Down
15 changes: 10 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ function HomepageProductCards() {
{Object.keys(ProductLinkData).map((e: keyof typeof ProductLinkData) => {
const cardHeader = (
<>
<h5 className={styles.eyebrow}>{ProductLinkData[e].eyebrow}</h5>
<Heading as="h3" className={styles.h3}>
{ProductLinkData[e].title}
</Heading>
<h5 className={styles.eyebrow}>{ProductLinkData[e].eyebrow}</h5>
<Heading as="h3" className={styles.h3}>
{ProductLinkData[e].title}
</Heading>
</>
);
const cardBody = <div className={styles.body} dangerouslySetInnerHTML={{ __html: ProductLinkData[e].description}}></div>;
const cardBody = (
<div
className={styles.body}
dangerouslySetInnerHTML={{ __html: ProductLinkData[e].description }}
></div>
);
const cardLinks = ProductLinkData[e].links.map((link) => (
<Link to={link.url}>
{link.title} {link.external ? <>&#8599;</> : <>&#8594;</>}
Expand Down
4 changes: 2 additions & 2 deletions src/theme/CodeBlock/Line/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ the background in custom CSS file due bug https://github.com/facebook/docusaurus
position: relative;
}
:global(.theme-code-block-stronger-line.theme-code-block-added-line) {
background-color: rgba(71, 187, 120, 0.30);
background-color: rgba(71, 187, 120, 0.3);
display: block;
position: relative;
}
:global(.theme-code-block-stronger-line.theme-code-block-deleted-line) {
background-color: rgba(229, 62, 62, 0.30);
background-color: rgba(229, 62, 62, 0.3);
display: block;
position: relative;
}
Expand Down
13 changes: 2 additions & 11 deletions src/theme/DarkImg/DarkImg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ import React from "react";
import styles from "./darkimg.module.scss";
import clsx from "clsx";


export default function DarkImg(props) {
return (
<>
<img
{...props}
src={props.icon}
className={clsx(props.className, styles.lightImg)}
/>
<img
{...props}
src={props.darkIcon}
className={clsx(props.className, styles.darkImg)}
/>
<img {...props} src={props.icon} className={clsx(props.className, styles.lightImg)} />
<img {...props} src={props.darkIcon} className={clsx(props.className, styles.darkImg)} />
</>
);
}
26 changes: 13 additions & 13 deletions src/theme/DarkImg/darkimg.module.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[data-theme="light"] {
.lightImg {
display: block;
}
.darkImg {
display: none;
}
.lightImg {
display: block;
}
.darkImg {
display: none;
}
}
[data-theme="dark"] {
.lightImg {
display: none;
}
.darkImg {
display: block;
}
}
.lightImg {
display: none;
}
.darkImg {
display: block;
}
}
2 changes: 1 addition & 1 deletion src/theme/DarkImg/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import DarkImg from "./DarkImg";

export default DarkImg;
export default DarkImg;
Loading
Loading