Skip to content

Commit 3ec9bd1

Browse files
jemgillambenjie
andauthored
Sponsor & Support pages update (#442)
Co-authored-by: Benjie Gillam <[email protected]>
1 parent e741af3 commit 3ec9bd1

File tree

6 files changed

+278
-81
lines changed

6 files changed

+278
-81
lines changed

src/components/Layout/index.scss

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,3 +1119,105 @@ svg.MarketingDivide {
11191119
.text-center2 {
11201120
text-align: center;
11211121
}
1122+
1123+
// ----------------------------------------
1124+
// Sponsor Page
1125+
1126+
.tier-row {
1127+
background-color: white;
1128+
padding: 2rem 1rem;
1129+
border-radius: 12px;
1130+
border: 4px solid #1b1b3d;
1131+
color: #1b3955;
1132+
}
1133+
1134+
.tier-item-container {
1135+
display: flex;
1136+
flex-direction: row;
1137+
gap: 1rem;
1138+
align-items: stretch;
1139+
}
1140+
1141+
.tier-break {
1142+
width: 1px;
1143+
background-color: #777;
1144+
align-self: stretch;
1145+
}
1146+
1147+
.tier {
1148+
display: flex;
1149+
flex-direction: column;
1150+
justify-items: space-between;
1151+
align-content: flex-start;
1152+
flex: 1 0 0;
1153+
}
1154+
.tier h3,
1155+
.tier .price-line {
1156+
text-align: center;
1157+
}
1158+
.tier .tc .button--solid {
1159+
width: 100%;
1160+
}
1161+
.tier h3:first-child {
1162+
padding-top: 0;
1163+
margin-top: 0;
1164+
}
1165+
.tier ul:last-child {
1166+
padding-bottom: 0;
1167+
margin-bottom: 0;
1168+
}
1169+
.tier {
1170+
h3 {
1171+
color: rgb(31, 76, 119);
1172+
}
1173+
.tc .button--solid {
1174+
background-color: rgb(31, 76, 119);
1175+
border-color: rgb(31, 76, 119);
1176+
color: white;
1177+
}
1178+
}
1179+
1180+
.tier a {
1181+
color: rgb(31, 76, 119);
1182+
}
1183+
1184+
.tier.highlight {
1185+
h3 {
1186+
color: #4a68b4;
1187+
color: #2d80d3;
1188+
}
1189+
a {
1190+
color: #4a68b4;
1191+
&:hover {
1192+
color: #4a68b4;
1193+
}
1194+
&:visited {
1195+
color: #4a68b4;
1196+
}
1197+
}
1198+
.tc .button--solid {
1199+
background-color: #2d80d3;
1200+
border-color: #2d80d3;
1201+
color: white;
1202+
}
1203+
}
1204+
1205+
@media screen and (max-width: 64rem) {
1206+
.tier-row {
1207+
background-color: transparent;
1208+
border: none;
1209+
padding: 0;
1210+
}
1211+
.tier-item-container {
1212+
display: block;
1213+
gap: 0;
1214+
}
1215+
.tier {
1216+
background-color: white;
1217+
padding: 1rem 1rem;
1218+
border-radius: 12px;
1219+
border: 4px solid #1b1b3d;
1220+
color: #1b3955;
1221+
margin: 1rem 0;
1222+
}
1223+
}

src/components/MarketingTier.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from "react";
2+
3+
export default function MarketingTiers({ children }) {
4+
return (
5+
<div className="tier-row">
6+
<div className="tier-item-container">
7+
{children.flatMap((c, i) =>
8+
i === 0 ? [c] : [<div className="tier-break" />, c]
9+
)}
10+
</div>
11+
</div>
12+
);
13+
}
14+
15+
export class Tier extends React.Component {
16+
render() {
17+
const { name, price, tagline, href, description, highlight } = this.props;
18+
19+
return (
20+
<div className={`tier ${highlight ? "highlight" : ""}`}>
21+
<h3>{name}</h3>
22+
<div className="price-line">
23+
<span style={{ fontSize: "1.5rem" }}>{price}</span>{" "}
24+
<span style={{ fontSize: "0.8rem" }}>/month</span>
25+
</div>
26+
<div className="tc">
27+
<a className="button--solid" href={href}>
28+
Join on GitHub Sponsors{" "}
29+
<span className="fas fa-fw fa-external-link-square-alt" />
30+
</a>
31+
</div>
32+
<h4>{tagline}</h4>
33+
<div>
34+
<span>{description}</span>
35+
</div>
36+
</div>
37+
);
38+
}
39+
}

src/pages/postgraphile/usage-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ from
133133
* `--no-ignore-rbac`
134134
[RECOMMENDED] set this to exclude fields, queries and mutations that are not available to any possible user (determined from the user in connection string and any role they can become); this will be enabled by default in v5
135135
* `--no-ignore-indexes`
136-
set this to exclude filters, orderBy, and relations that would be expensive to access due to missing indexes
136+
[RECOMMENDED] set this to exclude filters, orderBy, and relations that would be expensive to access due to missing indexes
137137
* `--include-extension-resources`
138138
by default, tables and functions that come from extensions are excluded; use this flag to include them (not recommended)
139139
* `--show-error-stack [json|string]`

src/pages/postgraphile/usage-library.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Next we need an adaptor to convert a generic PostGraphile route handler into a
117117
handler that's suitable for your given server framework. We provide the
118118
following out of the box:
119119

120-
- `PostGraphileResponseNode` - for Node, Express, Connect, Nest, Restify, and
120+
- `PostGraphileResponseNode` - for Node, Express, Connect, Nest, Restify, and
121121
Fastify v2 (NOT v3)
122122
- `PostGraphileResponseKoa` - for Koa
123123
- `PostGraphileResponseFastify3` - for Fastify v3
@@ -221,21 +221,25 @@ if (middleware.options.watchPg) {
221221
For Nest, this might look something like:
222222

223223
```js
224-
import { Controller, Get, Post, Req, Next, Res } from '@nestjs/common';
225-
import { Request, Response } from 'express';
226-
import { PostGraphileResponseNode } from 'postgraphile';
227-
import { middleware } from './postgraphile.middleware';
224+
import { Controller, Get, Post, Req, Next, Res } from "@nestjs/common";
225+
import { Request, Response } from "express";
226+
import { PostGraphileResponseNode } from "postgraphile";
227+
import { middleware } from "./postgraphile.middleware";
228228

229-
@Controller('/')
229+
@Controller("/")
230230
export class PostGraphileController {
231231
@Get(middleware.graphiqlRoute)
232-
graphiql (@Req() request: Request, @Res() response: Response, @Next() next) {
233-
middleware.graphiqlRouteHandler(new PostGraphileResponseNode(request, response, next));
232+
graphiql(@Req() request: Request, @Res() response: Response, @Next() next) {
233+
middleware.graphiqlRouteHandler(
234+
new PostGraphileResponseNode(request, response, next)
235+
);
234236
}
235237

236238
@Post(middleware.graphqlRoute)
237-
graphql (@Req() request: Request, @Res() response: Response, @Next() next) {
238-
middleware.graphqlRouteHandler(new PostGraphileResponseNode(request, response, next));
239+
graphql(@Req() request: Request, @Res() response: Response, @Next() next) {
240+
middleware.graphqlRouteHandler(
241+
new PostGraphileResponseNode(request, response, next)
242+
);
239243
}
240244
}
241245
```
@@ -316,10 +320,10 @@ The `postgraphile` middleware factory function takes three arguments, all of
316320
which are optional. The below options are valid for
317321
<tt>postgraphile@<!-- LIBRARY_VERSION_BEGIN -->4.12.3<!-- LIBRARY_VERSION_END --></tt>.
318322

319-
- **`pgConfig`**: Specifies the PostgreSQL database you wish to connect to.
320-
You may pass a PostgreSQL connection string, a configuration object to pass
321-
to the [`pg.Pool`][] constructor, or a [`pg.Pool`][] instance. Note: `pg.Pool`
322-
has a default pool size of 10, to increase this you use the configuration
323+
- **`pgConfig`**: Specifies the PostgreSQL database you wish to connect to. You
324+
may pass a PostgreSQL connection string, a configuration object to pass to the
325+
[`pg.Pool`][] constructor, or a [`pg.Pool`][] instance. Note: `pg.Pool` has a
326+
default pool size of 10, to increase this you use the configuration
323327
object/pg.Pool instance approach and pass a different value as `max`.
324328
- **`schemaName`**: A string, or array of strings, which specifies the
325329
PostgreSQL schema(s) you to expose via PostGraphile; defaults to 'public'
@@ -380,10 +384,11 @@ which are optional. The below options are valid for
380384
user in connection string and any role they can become); set this option
381385
true to skip these checks and create GraphQL fields and types for
382386
everything. The default is `true`, in v5 the default will change to `false`.
383-
- `ignoreIndexes`: Set false to exclude filters, orderBy, and
387+
- `ignoreIndexes`: Set false (recommended) to exclude filters, orderBy, and
384388
relations that would be expensive to access due to missing indexes. Changing
385-
this from true to false is a breaking change, but false to true is not. The
386-
default is `true`.
389+
this from true to false is a breaking change, but false to true is not, so
390+
we recommend you start with it set to `false`. The default is `true`, in v5
391+
the default may change to `false`.
387392
- `includeExtensionResources`: By default, tables and functions that come from
388393
extensions are excluded from the generated GraphQL schema as general
389394
applications don't need them to be exposed to the end user. You can use this
@@ -757,5 +762,5 @@ You can find
757762
[express]: https://www.npmjs.com/express
758763
[graphql/express-graphql#82]: https://github.com/graphql/express-graphql/pull/82
759764
[`pg`]: https://www.npmjs.com/pg
760-
[`pg.Pool`]: https://node-postgres.com/api/pool
765+
[`pg.pool`]: https://node-postgres.com/api/pool
761766
[morgan]: https://www.npmjs.com/morgan

0 commit comments

Comments
 (0)