Skip to content
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
47 changes: 25 additions & 22 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,43 @@ const config = {
logoLink: '/',
title: 'Prisma',
products: [
{ name: 'Prisma Client', link: '/' },
{ name: 'Prisma Migrate', link: '/' },
{ name: 'Prisma Admin', link: '/' },
{ name: 'Prisma Cloud', link: '/' },
{ name: 'Prisma Enterprise', link: '/' },
{ name: 'Prisma Client', link: '/reference/tools-and-interfaces/prisma-client/crud' },
{ name: 'Prisma 1 Cloud', link: 'https://app.prisma.io/login' },
{ name: 'Nexus', link: 'https://www.nexusjs.org/' },
// { name: 'Prisma Admin', link: '/' },
// { name: 'Prisma Enterprise', link: '/' },
],
community: [
{ name: 'Meet the community', link: '/' },
{ name: 'Prisma Day', link: '/' },
{ name: 'Slack', link: '/' },
{ name: 'Spectrum', link: '/' },
{ name: 'GraphQL Conf', link: '/' },
{ name: 'Meet the community', link: '/community' },
{ name: 'Slack', link: 'https://slack.prisma.io/' },
{ name: 'Github', link: 'https://github.com/prisma' },
{ name: 'Discussions', link: 'https://github.com/prisma/prisma2/discussions' },
{ name: 'GraphQL Meetup', link: 'https://www.meetup.com/graphql-berlin/' },
{ name: 'TypeScript Meetup', link: 'https://www.meetup.com/TypeScript-Berlin/' },
],
resources: [
{ name: 'Docs', link: '/' },
{ name: 'Get started', link: '/' },
{ name: 'Tutorials', link: '/' },
{ name: 'Examples', link: '/' },
{ name: 'Get started', link: '/getting-started/quickstart' },
{ name: 'API Reference', link: '/reference/tools-and-interfaces/prisma-client/generating-prisma-client' },
{ name: 'Examples', link: 'https://github.com/prisma/prisma-examples' },
{ name: 'How to GraphQL', link: 'https://www.howtographql.com/' },
{ name: 'PostgreSQL Tutorial', link: '/tutorials/?tag=postgresql' },
],
company: [
{ name: 'About', link: '/' },
{ name: 'Jobs', link: '/' },
{ name: 'Blog', link: '/' },
{ name: 'TOS', link: '/' },
{ name: 'About', link: '/about' },
{ name: 'Jobs', link: '/jobs' },
{ name: 'Blog', link: '/blog' },
{ name: 'Terms & Privacy', link: 'https://gist.github.com/nikolasburk/c0f34b0cc50d3403e2e0d40c0e6510aa' },
],
newsletter: {
text: 'Stay up to date with the latest features and changes to Prisma',
},
findus: {
twitterLink: '/',
youtubeLink: '/',
fbLink: '/',
slackLink: '/',
gitLink: '/',
twitterLink: 'https://twitter.com/prisma',
youtubeLink: 'https://www.youtube.com/channel/UCptAHlN1gdwD89tFM3ENb6w',
fbLink: 'https://www.facebook.com/prisma.io',
slackLink: 'https://slack.prisma.io/',
gitLink: 'https://github.com/prisma',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Field selection'
metaTitle: 'Field selection (Reference)'
metaDescription: "This page explains how to select only a subset of a model's fields and/or include relations (\"eager loading\") in a Prisma Client query."
metaDescription: 'This page explains how to select only a subset of a model''s fields and/or include relations ("eager loading") in a Prisma Client query.'
---

## Overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ With **Prisma Migrate**, the workflow looks slightly different:
1. (Re-)generate Prisma Client
1. Use Prisma Client in your application code to access your database

![](https://imgur.com/OImder6.png)
![](https://imgur.com/OImder6.png)
20 changes: 20 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
description: config.siteMetadata.description,
keywords: config.siteMetadata.keywords,
header: config.header,
siteUrl: "https://prisma2.netlify.com",
// logo: { link: config.header.logoLink ? config.header.logoLink : '/', image: config.header.logo }, // backwards compatible
// headerTitle: config.header.title,
footer: config.footer,
Expand All @@ -18,6 +19,25 @@ module.exports = {
'gatsby-image',
'gatsby-plugin-styled-components',
`gatsby-plugin-smoothscroll`,
{
resolve: `gatsby-plugin-sitemap`,
options: {
sitemapSize: 5000
}
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
env: {
development: {
policy: [{ userAgent: '*', disallow: ['/'] }]
},
production: {
policy: [{ userAgent: '*', allow: '/' }]
}
}
}
},
// 'gatsby-plugin-offline', // it causes infinite loop issue with workbox
{
resolve: `gatsby-plugin-mdx`,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@mdx-js/mdx": "^1.5.5",
"@mdx-js/react": "^1.5.5",
"@philpl/buble": "^0.19.7",
"@reach/router": "^1.3.3",
"algoliasearch": "^4.1.0",
"babel-plugin-styled-components": "^1.10.0",
"downshift": "^5.0.5",
Expand All @@ -17,7 +18,9 @@
"gatsby-plugin-mdx": "^1.0.73",
"gatsby-plugin-offline": "^2.0.25",
"gatsby-plugin-react-helmet": "^3.0.9",
"gatsby-plugin-robots-txt": "^1.5.0",
"gatsby-plugin-sharp": "^2.4.5",
"gatsby-plugin-sitemap": "^2.3.1",
"gatsby-plugin-smoothscroll": "^1.1.0",
"gatsby-plugin-styled-components": "^3.0.7",
"gatsby-plugin-typescript": "^2.0.11",
Expand Down
2 changes: 1 addition & 1 deletion src/components/customMdx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ export default {
code: Code,
details: CollapseBox,
table: Table,
ButtonLink
ButtonLink,
};
35 changes: 30 additions & 5 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ const LinkList = styled.ul`
a {
text-decoration: none;
color: #a0aec0 !important;
&:hover {
color: #718096 !important;
.tag {
transform: scale(1.05);
}
}

.tag {
display: inline-block;
border-radius: 6px;
margin-left: 8px;
padding: 0 8px;
background: #48bb78;
font-size: 12px;
font-weight: bold;
color: white;
transition: transform 0.1s ease-in;
}
}
&:first-of-type {
line-height: 3rem;
Expand Down Expand Up @@ -98,6 +116,10 @@ const NewsLetter = styled.div`
margin-top: 10px;
a {
margin-right: 24px;

&: hover {
color: #718096 !important;
}
}
}
&-text {
Expand Down Expand Up @@ -166,21 +188,24 @@ const Footer = ({ footerProps }: FooterViewProps) => {
<li>COMPANY</li>
{company.map((item: any, index: number) => (
<li key={index}>
<a href={item.link}>{item.name}</a>
<a href={item.link}>
{item.name}
{item.name === 'Jobs' && <span className="tag">We're Hiring</span>}
</a>
</li>
))}
</LinkList>
</div>

<NewsLetter>
<h4>NEWSLETTER</h4>
<p>{newsletter.text}</p>
{/* <h4>NEWSLETTER</h4>
<p>{newsletter.text}</p> */}

<div className="email">
{/* <div className="email">
<Email style={{ position: 'absolute', top: '30px', left: '24px' }} />
<input type="text" placeholder="your@email.com" />
<ArrowEmail style={{ position: 'absolute', top: '24px', right: '24px' }} />
</div>
</div> */}
<div className="social">
<h4>FIND US</h4>
<div className="social-links">
Expand Down
6 changes: 3 additions & 3 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Header = ({ headerProps }: HeaderViewProps) => (
))}
</NavLinks>
<Link
to={'/'}
to={'https://github.com/prisma'}
style={{
color: 'white',
textDecoration: 'none',
Expand All @@ -131,10 +131,10 @@ const Header = ({ headerProps }: HeaderViewProps) => (
<Github style={{ height: '24px' }} />
</Link>
</HeaderNav>
<div style={{ position: 'relative', marginTop: ' 27px' }}>
{/* <div style={{ position: 'relative', marginTop: ' 27px' }}>
<Search style={{ position: 'absolute', top: '12px', left: '12px' }} />
<SearchInput type="text" placeholder="Search" />
</div>
</div> */}
</div>
</HeaderWrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/articleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ArticleLayout = ({ data, ...props }: ArticleLayoutProps) => {
/>
</section>
<MDXRenderer>{body}</MDXRenderer>
<PageBottom />
{/* <PageBottom /> */}
</Layout>
);
};
Expand Down
19 changes: 17 additions & 2 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import * as React from 'react';
import Layout from '../components/layout';
import styled from 'styled-components';

const NotFoundWrapper = styled.div`
font-family: 'Open Sans';
margin-top: 200px;
padding: 40px;
display: flex;
flex-direction: column;
align-items: center;
h1 {
font-weight: bold;
}
`;

const NotFoundPage = () => (
<Layout>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
<NotFoundWrapper>
<h1>404 | NOT FOUND</h1>
You just hit a route that doesn&#39;t exist!
</NotFoundWrapper>
</Layout>
);

Expand Down
29 changes: 0 additions & 29 deletions src/pages/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/utils/algolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ const queries = [
},
];

module.exports = queries;
module.exports = queries;
Loading