Skip to content

Commit

Permalink
Merge branch 'main' of github.com:redwoodjs/redwood into fix/subdirec…
Browse files Browse the repository at this point in the history
…tory-routing

* 'main' of github.com:redwoodjs/redwood:
  Update comment-form.md (#4990)
  update details css (#4991)
  Fix issues in rbac.md (#4989)
  fix(deps): update storybook monorepo to v6.4.20 (#4979)
  fix(deps): update dependency @graphql-tools/schema to v8.3.6 (#4977)
  Reduce spacing (#4976)
  add 10 contribs
  Make docs styling a little more consistent (#4981)
  docs: Rename "Serverless.com" menu (#4975)
  Change block quote colours to make it standout more (#4925)
  fix(deps): update docusaurus monorepo to v2.0.0-beta.18 (#4928)
  • Loading branch information
dac09 committed Apr 2, 2022
2 parents d2d09a0 + 4bf62a3 commit 49670f9
Show file tree
Hide file tree
Showing 12 changed files with 1,045 additions and 911 deletions.
2 changes: 1 addition & 1 deletion docs/docs/deploy/serverless.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Deploy to Serverless.com
# Deploy to AWS with Serverless Framework

>The following instructions assume you have read the [General Deployment Setup](#general-deployment-setup) section above.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorial/chapter6/comment-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ Next we need to let GraphQL know that it should expect a `postId` to be passed f
```graphql title="api/src/graphql/comments.sdl.js"
type Query {
// highlight-next-line
comments(postId: Int!): [Comment!]!
comments(postId: Int!): [Comment!]! @skipAuth
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/tutorial/chapter7/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ export const getCurrentUser = async (session) => {
### Restricting Access via Routes
The easiest way to prevent access to an entire URL is via the Router. The `<Private>` component takes a prop `role` in which you can give a list of only those role(s) that should have access:
The easiest way to prevent access to an entire URL is via the Router. The `<Private>` component takes a prop `roles` in which you can give a list of only those role(s) that should have access:
```jsx title="web/src/Routes.js"
// highlight-next-line
<Private unauthenticated="home" role="admin">
<Private unauthenticated="home" roles="admin">
<Set wrap={PostsLayout}>
<Route path="/admin/posts/new" page={PostNewPostPage} name="newPost" />
<Route path="/admin/posts/{id:Int}/edit" page={PostEditPostPage} name="editPost" />
Expand All @@ -108,7 +108,7 @@ yarn rw c
Now we can update our user with a single command:
```bash
> db.user.update({ where: { id: 1 } }, data: { roles: 'admin' } })
> db.user.update({ where: { id: 1 } , data: { roles: 'admin' } })
```
Which should return the new content of the user:
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
]
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.17",
"@docusaurus/plugin-content-docs": "2.0.0-beta.17",
"@docusaurus/preset-classic": "2.0.0-beta.17",
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/plugin-content-docs": "2.0.0-beta.18",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@mdx-js/react": "1.6.22",
"clsx": "1.1.1",
"react": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
{ type: 'doc', label: 'Flightcontrol', id: 'deploy/flightcontrol' },
{ type: 'doc', label: 'Netlify', id: 'deploy/netlify' },
{ type: 'doc', label: 'Render', id: 'deploy/render' },
{ type: 'doc', label: 'Serverless.com', id: 'deploy/serverless' },
{ type: 'doc', label: 'Serverless Framework', id: 'deploy/serverless' },
{ type: 'doc', label: 'Vercel', id: 'deploy/vercel' },
],
},
Expand Down
222 changes: 199 additions & 23 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,118 @@
/* IMPORTANT: use class substring matching for classes that include "@docusaurus". This prevents styling build failures in production */
/* ex: [class^='docTitle'] instead of .docTitle_node_modules-\@docusaurus-theme-classic-lib-next-theme-DocItem- */
:root {
/*
------------------------
Design tokens
------------------------
*/
--yellow: hsl(38, 72%, 66%);
--yellow-lightest: hsl(38deg 72% 86%);
--yellow-lighter: hsl(38deg 72% 76%);
--yellow-light: hsl(38deg 73% 73%);
--yellow-dark: hsl(38deg 72% 59%);
--yellow-darker: hsl(38deg 72% 59%);
--yellow-darkest: hsl(38deg 72% 46%);

/* stylelint-disable docusaurus/copyright-header */
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
--green: hsl(85deg 55% 54%);
--green-lightest: hsl(85deg 55% 90%);
--green-lighter: hsl(85deg 55% 62%);
--green-light: hsl(85deg 55% 59%);
--green-dark: hsl(85deg 55% 49%);
--green-darker: hsl(85deg 55% 46%);
--green-darkest: hsl(85deg 55% 38%);

/* You can override the default Infima variables here. */
:root {
--forest: hsl(144deg 61% 20%);

--blue: hsl(184, 49%, 76%);
--blue-lightest: hsl(200deg 60% 99%);
--blue-lighter: hsl(184deg 50% 87%);
--blue-light: hsl(184deg 49% 84%);
--blue-dark: hsl(184deg 49% 68%);
--blue-darker: hsl(184deg 49% 65%);
--blue-darkest: hsl(184deg 49% 53%);

--red: hsl(14, 70%, 44%);
--red-lightest: hsl(15deg 62% 94%);
--red-lighter: hsl(14deg 70% 51%);
--red-light: hsl(14deg 70% 48%);
--red-dark: hsl(14deg 69% 40%);
--red-darker: hsl(14deg 70% 37%);
--red-darkest: hsl(14deg 70% 31%);

--teal: hsl(175deg 84% 32%);
--teal-dark: hsl(175deg 84% 28%);

--black: hsl(0deg 0% 9%);

/*
------------------------
Docusaurus overrides
------------------------
*/
--ifm-color-primary: var(--red);

/*
Increase the space between the sidebar and the main content.
*/
--ifm-spacing-horizontal: 2rem;
--tw-text-opacity: 1;
--ifm-color-primary: rgb(124 45 18 / var(--tw-text-opacity));
--ifm-link-color: rgb(13 148 136 / var(--tw-text-opacity));

/*
Links.
*/
--ifm-link-color: var(--teal-dark);

/*
Stop the navbar title from changing color on hover.
*/
--ifm-navbar-link-hover-color: inherit;

/*
When hovering "Previous" or "Next", match the link color.
*/
--ifm-pagination-nav-color-hover: var(--teal-dark);

/*
Remove the left border on blockquotes.
*/
--ifm-blockquote-border-left-width: 0px;
}

.row .col--6 {
padding: 0 0 0 2rem;
/*
------------------------
Dark mode
------------------------
So far just lighten links a little for a11y.
*/
[data-theme="dark"] {
--ifm-link-color: var(--teal);
}

/*
------------------------
Breadcrumbs
------------------------
Correct the color on hover and increase the font weight.
*/
.theme-doc-breadcrumbs{
--ifm-link-hover-color: var(--red);
font-weight: var(--ifm-font-weight-semibold)
}

/*
------------------------
Increase the font weight of links in the main content.
------------------------
*/
article a {
font-weight: var(--ifm-font-weight-semibold);
}

/*
------------------------
Decrease the size of the headers.
------------------------
*/
h1 {
margin-top: 1.5rem;
font-size: 2rem;
Expand All @@ -34,33 +127,68 @@ h3 {
font-size: 1.25rem;
}

/*
------------------------
Add some padding to the bottom of the sidebar
------------------------
Without this, when you scroll all the way down,
the content's too close to the bottom.
*/
.menu {
padding: 0.5rem 0.5rem 2rem !important;
padding-bottom: 2rem !important;
}

/*
------------------------
Blockquotes
------------------------
*/
blockquote {
background-color: var(--ifm-color-secondary-lighter);
padding: 2rem;
background-color: var(--red-lightest);
border-radius: 0.5rem;
border-left: none;
padding: 2rem;
}

html[data-theme="dark"] blockquote {
background-color: #242526;
[data-theme="light"] blockquote code {
--ifm-code-background: hsl(14deg 70% 84%);
}

[data-theme="dark"] blockquote {
background-color: hsl(210deg 3% 15%);
}

/*
------------------------
Codeblock highlights
------------------------
*/
.docusaurus-highlight-code-line {
display: block;
background-color: rgba(238, 249, 253, 0.1);
margin: 0 calc(var(--ifm-pre-padding)*-1);
background-color: hsl(196deg 79% 96% / 10%);
margin: 0 calc(var(--ifm-pre-padding) * -1);
padding: 0 var(--ifm-pre-padding);
}

[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: hsl(0deg 0% 0% / 30%);
}

/*
------------------------
Images
------------------------
*/
.markdown img {
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: var(--ifm-global-radius);
}

/*
------------------------
Video embeds
------------------------
*/
.video-container {
position: relative;
padding-bottom: 56.25%;
Expand All @@ -72,3 +200,51 @@ html[data-theme="dark"] blockquote {
width: 100%;
height: 100%;
}

/*
------------------------
For the GitHub logo in the navbar
------------------------
*/
.github-logo::before {
content: '';
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}

.github-logo:hover {
opacity: 0.6;
}

[data-theme='dark'] .github-logo::before {
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}

/*
------------------------
For the generated index pages (e.g. docs/index)
------------------------
*/
.row .col--6 {
padding: 0 0 0 2rem;
}

/*
------------------------
Details
------------------------
*/
.alert {
--ifm-alert-background-color: var(--green-lightest) !important;
--ifm-alert-border-color: transparent !important;
--docusaurus-details-decoration-color: var(--black) !important;
}

[data-theme="dark"] .alert {
--ifm-alert-background-color: hsl(210deg 3% 15%) !important;
--docusaurus-details-decoration-color: hsl(210deg 11% 96%) !important;
}
Loading

0 comments on commit 49670f9

Please sign in to comment.