Skip to content

Commit f1ecf67

Browse files
committed
Reimplement the community page
1 parent e4b4850 commit f1ecf67

File tree

16 files changed

+135
-196
lines changed

16 files changed

+135
-196
lines changed

src/components/PromoCallout.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/components/pages/CommunityPage/CommunityPage.module.css

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,59 @@
3131
.Paragraph {
3232
max-width: var(--max-readable-content-width);
3333
}
34+
35+
.PromoCallout {
36+
display: flex;
37+
flex-direction: column;
38+
align-items: flex-start;
39+
}
40+
41+
.SectionWithBackground {
42+
position: relative;
43+
}
44+
45+
.SectionWithBackground:after {
46+
content: "";
47+
background-color: #fff;
48+
background-image: radial-gradient(var(--text-color) 1px, #fff 1px);
49+
background-size: 1.2rem 1.2rem;
50+
bottom: 0;
51+
height: 100%;
52+
opacity: 0.8;
53+
position: absolute;
54+
right: 0;
55+
width: 30%;
56+
z-index: -1;
57+
}
58+
59+
.StatTables {
60+
display: grid;
61+
grid-template-columns: 1fr 1fr;
62+
gap: 2rem;
63+
margin-top: 3rem;
64+
}
65+
66+
@media (max-width: 1150px) {
67+
.SectionWithBackground:after {
68+
width: 20%;
69+
}
70+
}
71+
72+
@media (max-width: 1000px) {
73+
.SectionWithBackground:after {
74+
display: none;
75+
}
76+
77+
.StatTables {
78+
grid-template-columns: 1fr;
79+
}
80+
81+
.PromoCallout {
82+
align-items: center;
83+
}
84+
85+
.PromoCallout > * {
86+
flex: 1;
87+
width: 100%;
88+
}
89+
}

src/components/pages/CommunityPage/CommunityPage.tsx

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import Layout from "@theme/Layout";
33
import s from "./CommunityPage.module.css";
44
import useBaseUrl from "@docusaurus/useBaseUrl";
55
import TeamTable from "@site/src/components/pages/CommunityPage/TeamTable";
6-
import PromoCallout from "@site/src/components/PromoCallout";
7-
import WavySeparatorFive from "@site/static/img/separator-5.svg";
86
import team from "@site/data/team";
97
import DiscussionPlatforms from "./sections/discussions/DiscussionPlatforms";
108
import HowToContribute from "./sections/how-to-contribute/HowToContribute";
@@ -13,6 +11,7 @@ import ProjectGovernance from "./sections/project-governance/ProjectGovernance";
1311
import Slider from '@site/src/components/ui/Slider/Slider';
1412
import Page from "@site/src/components/ui/Page/Page";
1513
import BrowserOnly from "@docusaurus/BrowserOnly";
14+
import Button from "@site/src/components/ui/Button/Button";
1615

1716
export default function CommunityPage(): JSX.Element {
1817
return (
@@ -125,26 +124,25 @@ export default function CommunityPage(): JSX.Element {
125124
</div>
126125
</section>
127126

128-
<WavySeparatorFive />
129-
130127
<Section title="Discussions" anchor="section-discussions">
131128
<DiscussionPlatforms />
132129
</Section>
133130

134-
<Section title="Project Governance" anchor="section-governance">
135-
<ProjectGovernance />
136-
</Section>
131+
<div className={s.SectionWithBackground}>
132+
<Section title="Project Governance" anchor="section-governance">
133+
<ProjectGovernance />
134+
</Section>
137135

138-
<Section title="How to Contribute" anchor="section-contribute">
139-
<HowToContribute />
140-
</Section>
136+
<Section title="How to Contribute" anchor="section-contribute">
137+
<HowToContribute />
138+
</Section>
139+
</div>
141140

142141
<Section anchor="section-community" title="Meet the Community">
143142
<p>
144143
Pulsar community consists of PMC members, committers and
145144
contributors.{" "}
146-
</p>
147-
<p>
145+
<br />
148146
For the complete and up-to-date list, see{" "}
149147
<a
150148
className="secondary-cta"
@@ -155,21 +153,19 @@ export default function CommunityPage(): JSX.Element {
155153
</a>
156154
.
157155
</p>
158-
<h3>PMC members</h3>
156+
<br />
157+
<h3>PMC members ({team.pmc.length})</h3>
159158
<div>
160-
<TeamTable data={team.pmc.slice(0, (team.pmc.length + 1) / 2)} />
161-
<TeamTable data={team.pmc.slice((team.pmc.length + 1) / 2)} />
159+
<TeamTable data={team.pmc} />
162160
</div>
163-
<h3>Committers</h3>
161+
<br />
162+
<h3>Committers ({team.committers.length})</h3>
164163
<div>
165164
<TeamTable
166-
data={team.committers.slice(0, (team.committers.length + 1) / 2)}
167-
/>
168-
<TeamTable
169-
data={team.committers.slice((team.committers.length + 1) / 2)}
165+
data={team.committers}
170166
/>
171167
</div>
172-
<div>
168+
<div className={s.StatTables}>
173169
<img
174170
src="https://contributor-overtime-api.git-contributor.com/contributors-svg?chart=contributorOverTime&repo=apache/pulsar"
175171
alt={"Contributors over time"}
@@ -181,11 +177,14 @@ export default function CommunityPage(): JSX.Element {
181177
</div>
182178
</Section>
183179

184-
<PromoCallout
185-
url="/blog"
186-
linkText="Read Now"
187-
text="Get up-to-date Pulsar insights on the blog"
188-
/>
180+
<div className={s.PromoCallout}>
181+
<h3>Get up-to-date Pulsar insights on the blog.</h3>
182+
<Button
183+
title="Read Now"
184+
variant="action"
185+
href={`${useBaseUrl("blog")}`}
186+
/>
187+
</div>
189188
</Page>
190189
</Layout>
191190
);

src/components/pages/CommunityPage/TeamTable.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ import TableBody from "@mui/material/TableBody";
44
import TableCell from "@mui/material/TableCell";
55
import TableHead from "@mui/material/TableHead";
66
import TableRow from "@mui/material/TableRow";
7-
// import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
8-
import Translate, { translate } from "@docusaurus/Translate";
97

108
export default function VersionsTable(props) {
11-
// const { siteConfig } = useDocusaurusContext();
129
return (
1310
<Table size="small">
1411
<TableHead>
1512
<TableRow>
1613
{["Name", "Apache Id"].map(header => (
17-
<TableCell className="font-bold" sx={{ border: 0, color: "inherit" }} key={header}>
18-
<Translate>{header}</Translate>
14+
<TableCell sx={{ border: 0, color: "inherit" }} key={header}>
15+
<strong>{header}</strong>
1916
</TableCell>
2017
))}
2118
</TableRow>

src/components/pages/CommunityPage/sections/how-to-contribute/HowToContribute.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ const HowToContribute: React.FC = () => {
2929
type: "normal",
3030
},
3131
],
32-
image: {
33-
src: useBaseUrl("img/contribute.svg"),
34-
size: "big",
35-
},
3632
},
3733
{
3834
title: "Reporting Bugs",
@@ -49,10 +45,6 @@ const HowToContribute: React.FC = () => {
4945
running and on which environment.
5046
</>
5147
),
52-
image: {
53-
src: useBaseUrl("img/report-bugs.svg"),
54-
size: "big",
55-
},
5648
},
5749
{
5850
title: "Reporting a Vulnerability",
@@ -78,10 +70,6 @@ const HowToContribute: React.FC = () => {
7870
This is a private mailing list.
7971
</>
8072
),
81-
image: {
82-
src: useBaseUrl("img/report-vulnerability.svg"),
83-
size: "big",
84-
},
8573
},
8674
];
8775

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
11
.ContentCard {
22
display: flex;
3+
max-width: var(--max-readable-content-width);
34
}
45

56
.NormalImage {
6-
flex: 0 0 96px;
7-
width: 96px;
8-
height: 96px;
7+
flex: 0 0 6rem;
8+
width: 6rem;
9+
height: 6rem;
910
display: block;
10-
margin-right: 24px;
11+
margin-right: 1.5rem;
1112
}
1213

1314
.BigImage {
14-
flex: 0 0 192px;
15-
width: 192px;
16-
height: 192px;
15+
flex: 0 0 12rem;
16+
width: 12rem;
17+
height: 12rem;
1718
display: block;
18-
margin-right: 24px;
19+
margin-right: 1.5rem;
1920
}
2021

2122
.Actions {
22-
margin-top: 18px;
23+
margin-top: 1rem;
2324
display: flex;
25+
gap: 1rem;
2426
}
2527

2628
.ActionButton {
27-
margin-right: 1rem;
2829
}
30+
31+
@media (max-width: 640px) {
32+
.ContentCard {
33+
flex-direction: column;
34+
gap: 1rem;
35+
align-items: center;
36+
}
37+
38+
.Actions {
39+
justify-content: space-between;
40+
flex-wrap: wrap;
41+
}
42+
43+
.ActionButton {
44+
flex: 1;
45+
}
46+
47+
.ActionButton > * {
48+
width: 100%;
49+
}
50+
}
51+
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
.Section {
2-
padding: 36px 0;
3-
margin-bottom: 24px;
2+
padding: 2rem 0;
3+
margin-bottom: 1.5rem;
44
}
55

66
.Content {
7-
max-width: 1200px;
87
margin: auto;
9-
padding: 0 32px;
108
}
119

1210
h2.Title {
13-
text-align: center;
14-
margin-bottom: 48px;
15-
}
16-
17-
.Separator {
18-
margin-top: 48px;
11+
margin-bottom: 2rem;
1912
}

src/components/pages/CommunityPage/shared/Section/Section.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from "react";
22
import s from "./Section.module.css";
3-
import WavySeparatorSix from "@site/static/img/separator-6.svg";
43

54
export type SectionProps = {
65
title: string;
76
children: React.ReactNode;
87
anchor?: string;
9-
isHideSeparator?: boolean;
108
};
119

1210
const Section: React.FC<SectionProps> = (props) => {
@@ -16,11 +14,6 @@ const Section: React.FC<SectionProps> = (props) => {
1614
<h2 className={s.Title}>{props.title}</h2>
1715
{props.children}
1816
</div>
19-
{!props.isHideSeparator && (
20-
<div className={s.Separator}>
21-
<WavySeparatorSix />
22-
</div>
23-
)}
2417
</section>
2518
);
2619
};

src/components/pages/ResourcesPage/Cards/Cards.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
color: var(--primary-color);
1919
}
2020

21+
.AdditionalInfo {
22+
margin-bottom: 1rem;
23+
}
24+
2125
@media (max-width: 800px) {
2226
.Cards {
2327
grid-template-columns: 1fr;

src/components/pages/ResourcesPage/Cards/Cards.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const Card: React.FC<data.Resource> = (props) => {
99
<a className={s.ForumLink} target="_blank" href={props.forum_link}><strong>{props.forum}</strong></a>
1010
</p>
1111
<h3><a href={props.link}>{props.title}</a></h3>
12-
<p>
12+
<div className={s.AdditionalInfo}>
1313
{props.date && <div><small className={s.Date}>{props.date}</small></div>}
1414
{props.tags && <div><small>Tags: {props.tags}</small></div>}
15-
</p>
15+
</div>
1616
{props.presenter && <p>Presented by <strong>{props.presenter}</strong></p>}
1717
<a href={props.link} target="_blank">Learn more</a>
1818
</div>

0 commit comments

Comments
 (0)