Skip to content

Commit 09b5ed9

Browse files
committed
Communities page WIP
1 parent f846f94 commit 09b5ed9

5 files changed

Lines changed: 95 additions & 1 deletion

File tree

backend/api/cms/page/blocks/dynamic_content_display_section.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class DynamicContentDisplaySectionSource(enum.Enum):
99
speakers = "speakers"
1010
keynoters = "keynoters"
1111
proposals = "proposals"
12+
local_communities = "local_communities"
1213

1314

1415
@register_page_block()

backend/cms/components/page/blocks/dynamic_content_display_section.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ class DynamicContentDisplaySection(blocks.StructBlock):
77
("speakers", "Speakers"),
88
("keynoters", "Keynoters"),
99
("proposals", "Proposals"),
10+
("local_communities", "Local Communities"),
1011
],
1112
)

frontend/src/components/blocks/dynamic-content-display-section/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
queryKeynotesSection,
66
} from "~/types";
77
import { KeynotersContent } from "./keynoters-content";
8+
import { LocalCommunitiesContent } from "./local-communities-content";
89
import { ProposalsContent } from "./proposals-content";
910
import { SpeakersContent } from "./speakers-content";
1011

@@ -24,6 +25,9 @@ export const DynamicContentDisplaySection = ({
2425
{source === DynamicContentDisplaySectionSource.Proposals && (
2526
<ProposalsContent />
2627
)}
28+
{source === DynamicContentDisplaySectionSource.LocalCommunities && (
29+
<LocalCommunitiesContent />
30+
)}
2731
</Fragment>
2832
);
2933
};
@@ -56,6 +60,9 @@ DynamicContentDisplaySection.dataFetching = (client, language, block) => {
5660
}),
5761
];
5862
}
63+
case DynamicContentDisplaySectionSource.LocalCommunities: {
64+
return [];
65+
}
5966
}
6067

6168
return [];
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import {
2+
CardPart,
3+
Grid,
4+
Heading,
5+
MultiplePartsCard,
6+
MultiplePartsCardCollection,
7+
SocialLinks,
8+
Spacer,
9+
Text,
10+
VerticalStack,
11+
} from "@python-italia/pycon-styleguide";
12+
import { Section } from "@python-italia/pycon-styleguide";
13+
14+
export const LocalCommunitiesContent = () => {
15+
return (
16+
<Section>
17+
<Grid cols={3} mdCols={2}>
18+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((item) => (
19+
<MultiplePartsCard>
20+
<CardPart shrink={false} size="none">
21+
<img
22+
style={{
23+
objectFit: "cover",
24+
}}
25+
alt="test"
26+
src="https://live.staticflickr.com/65535/54571831519_ed2daa51c6_k.jpg?s=eyJpIjo1NDU3MTgzMTUxOSwiZSI6MTc3MDQ5MjM3NCwicyI6ImE4NjVmZTkwZDAxZTIzMzY4MWM3NDM1OGNmYWYxOGQ3MTYyMDk0NDkiLCJ2IjoxfQ"
27+
/>
28+
</CardPart>
29+
30+
<CardPart>
31+
<Heading size={4}>Python Bari</Heading>
32+
</CardPart>
33+
<CardPart background="milk">
34+
<VerticalStack alignItems="center" gap="small">
35+
<img
36+
src="https://cdn.pycon.it/images/pythonvarese.width-500.png"
37+
alt="Python Bari"
38+
/>
39+
</VerticalStack>
40+
<Spacer size="small" />
41+
<Text size={3}>
42+
Python Bari è una community di Python che si occupa di
43+
sviluppare software per la città di Bari.
44+
</Text>
45+
</CardPart>
46+
<CardPart background="milk">
47+
<VerticalStack alignItems="center" gap="small">
48+
<SocialLinks
49+
hoverColor="green"
50+
socials={[
51+
{
52+
icon: "mastodon",
53+
link: "https://social.python.it/@pycon",
54+
rel: "me",
55+
},
56+
{
57+
icon: "facebook",
58+
link: "https://www.facebook.com/pythonitalia",
59+
rel: "me",
60+
},
61+
{
62+
icon: "instagram",
63+
link: "https://www.instagram.com/pycon.it",
64+
rel: "me",
65+
},
66+
{
67+
icon: "linkedin",
68+
link: "https://www.linkedin.com/company/pycon-italia",
69+
rel: "me",
70+
},
71+
{
72+
icon: "twitter",
73+
link: "https://twitter.com/pyconit",
74+
rel: "me",
75+
},
76+
]}
77+
/>
78+
</VerticalStack>
79+
</CardPart>
80+
</MultiplePartsCard>
81+
))}
82+
</Grid>
83+
</Section>
84+
);
85+
};

frontend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"moduleResolution": "node",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
16-
"jsx": "preserve",
16+
"jsx": "react-jsx",
1717
"baseUrl": ".",
1818
"paths": {
1919
"~/*": ["./src/*"],

0 commit comments

Comments
 (0)