Skip to content

Commit 7c644cb

Browse files
committed
docs(website): advertise the new guide on the home page
1 parent a052286 commit 7c644cb

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-0
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ const config: Config = {
7171
high-quality, business-focused test scenarios that interact with any interface of your system
7272
and produce comprehensive test reports that build trust between delivery teams and the business.
7373
`,
74+
banner: {
75+
text: 'New Playwright Test guide is out!',
76+
link: '/handbook/test-runners/playwright-test',
77+
}
7478
},
7579

7680
url: 'https://serenity-js.org',
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Link from '@docusaurus/Link';
2+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3+
4+
import styles from './styles.module.css';
5+
import React from 'react';
6+
7+
export default function TopBanner(): React.JSX.Element {
8+
const banner = useDocusaurusContext().siteConfig.customFields?.banner as { text: string, link: string };
9+
10+
return banner && (
11+
<div className={styles.topBanner}>
12+
<div className={styles.topBannerTitle}>
13+
{'🎉\xa0'}
14+
<Link
15+
to={ banner.link }
16+
className={styles.topBannerTitleText}>
17+
{ banner.text }
18+
</Link>
19+
{'\xa0🥳'}
20+
</div>
21+
</div>
22+
);
23+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.topBanner {
2+
font-size: 20px;
3+
padding: 30px 20px;
4+
max-width: 900px;
5+
margin: 0 auto;
6+
text-align: center;
7+
display: flex;
8+
flex-direction: column;
9+
align-items: center;
10+
}
11+
12+
.topBannerTitle {
13+
font-size: 42px;
14+
font-weight: bold;
15+
margin-bottom: 0.4rem;
16+
}
17+
18+
@media only screen and (max-width: 768px) {
19+
.topBannerTitle {
20+
font-size: 32px;
21+
}
22+
}
23+
24+
.topBannerTitleText {
25+
background: linear-gradient(
26+
90deg,
27+
rgb(131 58 180 / 100%) 0%,
28+
rgb(253 29 29 / 100%) 50%,
29+
rgb(252 176 69 / 100%) 100%
30+
);
31+
background-clip: text;
32+
-webkit-text-fill-color: transparent;
33+
}
34+
35+
.topBannerTitleText:hover {
36+
border-bottom: solid 2px;
37+
border-color: rgb(152 0 255);
38+
}

src/components/Home/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import Recommendations from './Recommendations';
88
import Welcome from './Welcome';
99

1010
import styles from './index.module.css';
11+
import TopBanner from './TopBanner';
1112

1213
export default function Home(): React.JSX.Element {
1314
return (
1415
<>
16+
<TopBanner />
1517
<Hero />
1618
<main>
1719
<Features className={clsx(styles.section)} />

src/docs/handbook/test-runners/playwright-test.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ To start testing immediately, consider using:
4040
- [**Serenity/JS GitPods**](/handbook/project-templates/#serenityjs-gitpods) - Ready-to-use cloud-based development environments.
4141
- [**Serenity/JS reference implementations**](https://github.com/serenity-js/serenity-js/tree/main/examples) on GitHub.
4242

43+
:::info New to Serenity/JS? ⏱️ Check out the tutorials!
44+
See what Serenity/JS is capable of without installing anything on your machine - start
45+
with our [15-minute web testing tutorial](/handbook/tutorials/your-first-web-scenario/)!
46+
:::
47+
4348
To see Serenity/JS reporting in action, explore the live reports generated by the [Serenity/JS Playwright Test Template](https://github.com/serenity-js/serenity-js-playwright-test-template):
4449
- [Live Serenity BDD report](https://serenity-js.github.io/serenity-js-playwright-test-template/serenity/)
4550
- [Live Playwright Test report](https://serenity-js.github.io/serenity-js-playwright-test-template/playwright/)

0 commit comments

Comments
 (0)