Skip to content

Commit 0bc781a

Browse files
dmitryvinn-fbfacebook-github-bot
authored andcommitted
Adding a banner about Pyrefly to the website's home page
Summary: Importing pull request: #989 Dmitry: Adding a banner about using Pyrefly, Pyre v.2, to the home page Reviewed By: stroxler Differential Revision: D74661368 Pulled By: dluo fbshipit-source-id: ae37e900bf54e7a61b4af20938ab708a6422934e
1 parent f342638 commit 0bc781a

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

documentation/website/src/pages/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,32 @@ const features = [
6969
},
7070
];
7171

72+
function TopBanner() {
73+
return (
74+
<div className={styles.topBannerContainer}>
75+
<div className={styles.topBanner}>
76+
<div className={styles.topBannerTitle}>
77+
{'📣\xa0'}
78+
<Link
79+
to={`https://pyrefly.org/`}
80+
className={styles.topBannerTitleText}>
81+
{'Check out Pyrefly'}
82+
</Link>
83+
{'\xa0📣'}
84+
<br />
85+
<Link
86+
to={`https://pyrefly.org/`}
87+
className={styles.topBannerTitleText}>
88+
<span style={{fontSize: '0.8em'}}>
89+
The next iteration of Pyre!️
90+
</span>
91+
</Link>
92+
</div>
93+
</div>
94+
</div>
95+
);
96+
}
97+
7298
function Feature({imageUrl, title, description}) {
7399
const imgUrl = useBaseUrl(imageUrl);
74100
return (
@@ -91,6 +117,7 @@ function Home() {
91117
<Layout
92118
title={`${siteConfig.title}`}
93119
description="A performant type-checker for Python 3.">
120+
<TopBanner />
94121
<header className={classnames('hero hero--primary', styles.heroBanner)}>
95122
<div className="container">
96123
<img src="img/pyre.svg" alt="Pyre logo." width="100" />

documentation/website/src/pages/styles.module.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,44 @@
108108
width: 98%;
109109
}
110110
}
111+
112+
.topBannerContainer {
113+
background-color: rgb(15, 15, 15);
114+
}
115+
116+
.topBanner {
117+
display: flex;
118+
justify-content: center;
119+
align-items: center;
120+
}
121+
122+
.topBannerTitle {
123+
font-size: 54px;
124+
font-weight: bold;
125+
margin-bottom: 0.4rem;
126+
align-items: center;
127+
text-align:center;
128+
129+
}
130+
131+
@media only screen and (max-width: 768px) {
132+
.topBannerTitle {
133+
font-size: 40px;
134+
}
135+
}
136+
137+
.topBannerTitleText {
138+
background: linear-gradient(
139+
90deg,
140+
rgb(131 58 180 / 100%) 0%,
141+
rgb(253 29 29 / 100%) 50%,
142+
rgb(252 176 69 / 100%) 100%
143+
);
144+
background-clip: text;
145+
-webkit-text-fill-color: transparent;
146+
}
147+
148+
.topBannerTitleText:hover {
149+
text-decoration: underline;
150+
text-decoration-color: rgb(152 0 255);
151+
}

0 commit comments

Comments
 (0)