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

Q&A banner for website #6589

Merged
merged 6 commits into from
Sep 17, 2021
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
6 changes: 5 additions & 1 deletion docs/components/Announce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export function Announce({ children, ...props }: AnnounceProps) {
<div
css={{
'--focus': '#fff',
background: 'var(--brand-bg)',
// standard styling (blue)
// background: 'var(--brand-bg)',
// special styling (orange gradient)
backgroundColor: 'var(--grad4-2)',
backgroundImage: `linear-gradient(116.01deg, var(--grad4-2), var(--grad4-1))`,
color: 'var(--brand-text)',
padding: '1rem',
textAlign: 'center',
Expand Down
32 changes: 27 additions & 5 deletions docs/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { useRef, Fragment, ReactNode } from 'react';
import { useRouter } from 'next/router';
import { jsx } from '@emotion/react';
import Head from 'next/head';
import Link from 'next/link';

import { useMediaQuery } from '../lib/media';
import type { Heading } from '../lib/getHeadings';
import { Announce } from '../components/Announce';
import { TableOfContents } from './docs/TableOfContents';
import { Wrapper } from './primitives/Wrapper';
import { EditButton } from './primitives/EditButton';
import { Emoji } from './primitives/Emoji';
import { Breadcrumbs } from './Breadcrumbs';
import { Sidebar } from './docs/Sidebar';
import { Stack } from './primitives/Stack';
Expand All @@ -20,13 +20,35 @@ import { Footer } from './Footer';
function Announcement() {
return (
<Announce>
Keystone 6 is in <Link href="/updates/roadmap">Community Preview</Link>! For Keystone 5 docs
visit{' '}
<a href="https://v5.keystonejs.com" rel="noopener noreferrer" target="_blank">
v5.keystonejs.com
<Emoji symbol="🎤" alt="Microphone" />{' '}
<a
href="https://306ucv95ugh.typeform.com/to/TbFERbep"
rel="noopener noreferrer"
target="_blank"
>
Join us
</a>{' '}
for our first <strong>Community Q&A</strong> next{' '}
<strong>Tuesday Sep 21st @ 3–4pm AEST</strong> –{' '}
<a
href="https://306ucv95ugh.typeform.com/to/TbFERbep"
rel="noopener noreferrer"
target="_blank"
>
Register now
</a>
!
</Announce>
);
// return (
// <Announce>
// Keystone 6 is in <Link href="/updates/roadmap">Community Preview</Link>! For Keystone 5 docs
// visit{' '}
// <a href="https://v5.keystonejs.com" rel="noopener noreferrer" target="_blank">
// v5.keystonejs.com
// </a>
// </Announce>
// );
}

function OpenGraph({
Expand Down
23 changes: 23 additions & 0 deletions docs/components/docs/Keystone5DocsCTA.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** @jsxRuntime classic */
/** @jsx jsx */
import { jsx } from '@emotion/react';

import { Alert } from '../primitives/Alert';

export function Keystone5DocsCTA() {
return (
<Alert css={{ margin: '2rem 0' }}>
<span
css={{
display: 'inline-block',
margin: '0 1rem 0rem 0',
}}
>
Using <strong>Keystone 5</strong>? Find the docs at{' '}
<a href="https://v5.keystonejs.com/documentation" target="_blank">
v5.keystonejs.com
</a>
</span>
</Alert>
);
}
2 changes: 2 additions & 0 deletions docs/pages/docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
import Link from 'next/link';

import { CommunitySlackCTA } from '../../components/docs/CommunitySlackCTA';
import { Keystone5DocsCTA } from '../../components/docs/Keystone5DocsCTA';
import { Examples } from '../../components/docs/ExamplesList';
import { Walkthroughs } from '../../components/docs/WalkthroughsList';
import { Type } from '../../components/primitives/Type';
Expand Down Expand Up @@ -32,6 +33,7 @@ export default function Docs() {
Developer Docs
</Type>

<Keystone5DocsCTA />
<CommunitySlackCTA />

<Type as="h2" look="heading30" margin="0 0 1rem 0">
Expand Down