diff --git a/content/docs/introduction.md b/content/docs/introduction.md index dc3a3c59b1..102e41111f 100644 --- a/content/docs/introduction.md +++ b/content/docs/introduction.md @@ -3,7 +3,9 @@ title: Neon documentation updatedOn: '2024-11-28T11:50:49.805Z' --- - +Neon is a serverless Postgres platform designed to help you build reliable and scalable applications faster. We separate compute and storage to offer modern developer features such as autoscaling, branching, point-in-time restore, and more. Get started today with our [generous free plan](https://console.neon.tech). + + ## Get started diff --git a/public/inkeep/css/base.css b/public/inkeep/css/base.css new file mode 100644 index 0000000000..e36359e6a0 --- /dev/null +++ b/public/inkeep/css/base.css @@ -0,0 +1,55 @@ +.ikp-ai-chat-footer__footer { + align-items: center; +} + +.ikp-tagline { + align-items: center; + position: relative; +} + +.ikp-tagline > div { + display: none; +} + +.ikp-tagline > a > div:before { + content: 'Powered by'; + font-weight: normal; +} + +.ikp-tagline:after { + content: ''; + margin-left: 1.5rem; + width: 64px; + height: 18px; + background: url('/inkeep/images/neon-logo.svg'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + filter: grayscale(1); +} + +.ikp-tagline:before { + content: '&'; + position: absolute; + right: 64px; + color: #889096; + margin-left: 0.5rem; + margin-right: 0.5rem; + font-size: 0.875rem; + font-weight: 600; +} + +[data-theme='dark'] { + .ikp-tagline:before { + color: #ffffff7a; + } + + .ikp-tagline:after { + background: url('/inkeep/images/neon-white-logo.svg'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + filter: grayscale(1); + opacity: 0.48; + } +} \ No newline at end of file diff --git a/public/inkeep/css/chat.css b/public/inkeep/css/chat.css new file mode 100644 index 0000000000..5def2ee4d2 --- /dev/null +++ b/public/inkeep/css/chat.css @@ -0,0 +1,13 @@ +.ikp-message-header{ + display: none; +} + +.chat-title { + display: block; + width: 100%; + text-align: center; + font-size: 36px; + font-weight: 500; + line-height: 125%; + letter-spacing: -0.04em; +} \ No newline at end of file diff --git a/public/inkeep/css/inkeep-chat.css b/public/inkeep/css/modal.css similarity index 86% rename from public/inkeep/css/inkeep-chat.css rename to public/inkeep/css/modal.css index 1fec3a06f1..c8d67a3681 100644 --- a/public/inkeep/css/inkeep-chat.css +++ b/public/inkeep/css/modal.css @@ -1,6 +1,7 @@ :where(.inkeep-widget-vars){ font-family: inherit; } + .ikp-modal__backdrop { backdrop-filter: blur(0px); background: rgba(12, 13, 13, 0.3); @@ -10,6 +11,7 @@ padding: 0; width: 28px; margin-right: 12px; + display: none; } .ikp-message-header__avatar-box{ @@ -228,48 +230,6 @@ opacity: 0.9; } -.ikp-ai-chat-footer__footer { - align-items: center; -} - -.ikp-tagline { - align-items: center; - position: relative; -} - -.ikp-tagline > div { - display: none; -} - -.ikp-tagline > a > div:before { - content: 'Powered by'; - font-weight: normal; -} - - -.ikp-tagline:after { - content: ''; - margin-left: 1.5rem; - width: 64px; - height: 18px; - background: url('/inkeep/images/neon-logo.svg'); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - filter: grayscale(1); -} - -.ikp-tagline:before { - content: '&'; - position: absolute; - right: 64px; - color: #889096; - margin-left: 0.5rem; - margin-right: 0.5rem; - font-size: 0.875rem; - font-weight: 600; -} - [data-theme='dark'] { .ikp-modal__backdrop { background: rgba(12, 13, 13, 0.8); @@ -336,19 +296,6 @@ .ikp-modal__closeTrigger{ opacity: 1; } - - .ikp-tagline:before { - color: #ffffff7a; - } - - .ikp-tagline:after { - background: url('/inkeep/images/neon-white-logo.svg'); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - filter: grayscale(1); - opacity: 0.48; - } } @media (max-width: 1024px) { diff --git a/src/app/docs/chat/page.jsx b/src/app/docs/chat/page.jsx new file mode 100644 index 0000000000..790be23c44 --- /dev/null +++ b/src/app/docs/chat/page.jsx @@ -0,0 +1,16 @@ +import InkeepEmbedded from 'components/shared/inkeep-embedded'; +import SEO_DATA from 'constants/seo-data'; +import getMetadata from 'utils/get-metadata'; + +export const metadata = getMetadata(SEO_DATA.docsChat); + +const DocsChat = () => ( +
+

Neon AI Chat

+
+ +
+
+); + +export default DocsChat; diff --git a/src/app/docs/layout.jsx b/src/app/docs/layout.jsx index 19c221eab5..6487ddbdb9 100644 --- a/src/app/docs/layout.jsx +++ b/src/app/docs/layout.jsx @@ -34,7 +34,7 @@ const NeonDocsLayout = async ({ children }) => { basePath={DOCS_BASE_PATH} /> -
+
{isDocPage ? (
- + { + const { theme, systemTheme } = useTheme(); + + let themeMode; + switch (true) { + case isDarkTheme: + themeMode = 'dark'; + break; + case theme === 'system': + themeMode = systemTheme; + break; + default: + themeMode = theme; + } + + const inkeepEmbeddedChatProps = { + baseSettings: { + ...baseSettings, + colorMode: { + forcedColorMode: themeMode, }, - tokens: { - fonts: { - body: 'var(--font-inter), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', + theme: { + stylesheetUrls: ['/inkeep/css/base.css', '/inkeep/css/chat.css'], + components: { + AIChatPageWrapper: { + defaultProps: { + size: 'expand', // 'shrink-vertically' 'expand', 'default', 'full-viewport' + variant: 'no-shadow', // 'no-shadow' or 'container-with-shadow' + }, + }, }, - colors: { - 'gray.800': '#000', + tokens: { + fonts: { + body: 'var(--font-inter), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', + }, + colors: { + 'grayDark.900': '#000', + }, }, }, }, - }, - aiChatSettings: { - ...aiChatSettings, - introMessage: - "Neon is a serverless Postgres platform designed to help you build reliable and scalable applications faster. We separate compute and storage to offer modern developer features such as autoscaling, branching, point-in-time restore, and more.

How can I help you today?
", - }, + aiChatSettings: { + ...aiChatSettings, + introMessage: "What do you want to know?", + }, + }; + + return ( +
+ +
+ ); }; -const InkeepEmbedded = () => ( -
- -
-); +InkeepEmbedded.propTypes = { + isDarkTheme: PropTypes.bool, +}; export default InkeepEmbedded; diff --git a/src/components/shared/inkeep-trigger/inkeep-trigger.jsx b/src/components/shared/inkeep-trigger/inkeep-trigger.jsx index d75f923896..ab464d01dd 100644 --- a/src/components/shared/inkeep-trigger/inkeep-trigger.jsx +++ b/src/components/shared/inkeep-trigger/inkeep-trigger.jsx @@ -61,12 +61,14 @@ const InkeepTrigger = ({ const inkeepCustomTriggerProps = { isOpen, onClose: handleClose, - stylesheetUrls: ['/inkeep/css/inkeep-chat.css'], baseSettings: { ...baseSettings, colorMode: { forcedColorMode: themeMode, }, + theme: { + stylesheetUrls: ['/inkeep/css/base.css', '/inkeep/css/modal.css'], + }, }, modalSettings: { defaultView: defaultModalView, diff --git a/src/constants/links.js b/src/constants/links.js index 1cf5177442..38a038bd97 100644 --- a/src/constants/links.js +++ b/src/constants/links.js @@ -30,6 +30,7 @@ export default { // Docs docs: '/docs', docsHome: '/docs/introduction', + docsChat: '/docs/chat', ai: '/docs/ai/ai-intro', api: '/docs/reference/api-reference', authorize: '/docs/guides/neon-authorize', diff --git a/src/constants/seo-data.js b/src/constants/seo-data.js index 4b88839182..09c9ba2785 100644 --- a/src/constants/seo-data.js +++ b/src/constants/seo-data.js @@ -9,13 +9,6 @@ export default { 'The database you love, on a serverless platform designed to help you build reliable and scalable applications faster.', pathname: '', }, - ai: { - title: 'Powering next gen AI apps with Postgres — Neon', - description: - 'Scale your transformative LLM applications to millions of users with vector indexes and similarity search in Neon.', - imagePath: '/images/social-previews/ai.jpg', - pathname: LINKS.ai, - }, awsIsrael: { title: 'AWS Launches in Israel — Neon', description: 'Neon is delighted to support the 2023 launch of AWS in Israel.', @@ -80,6 +73,11 @@ export default { imagePath: '/images/social-previews/developer-days-1.jpg', pathname: LINKS.developerDays1, }, + docsChat: { + title: 'Neon AI Chat', + description: 'AI assistant trained on documentation, help articles, and other content', + pathname: LINKS.docsChat, + }, enterprise: { title: 'Neon for Enterprises: Postgres Fleets - Neon', description: