Skip to content

Commit 90be0ac

Browse files
committed
Add socials.
1 parent 78caff5 commit 90be0ac

File tree

4 files changed

+140
-60
lines changed

4 files changed

+140
-60
lines changed

src/components/Footer.astro

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
---
2-
import { Image } from "astro:assets";
2+
import Icon from "@ui/Icon.astro";
33
import links from "@data/links.json";
44
import EPSLogo from "../../public/eps-logo.svg";
55
66
const buildTimestamp = __TIMESTAMP__;
77
const gitVersion = __GIT_VERSION__;
8+
9+
const socialLinks = [
10+
{ key: "website", icon: "globe", label: "Website" },
11+
{ key: "blog", icon: "rss", label: "Blog" },
12+
{ key: "linkedin", icon: "linkedin", label: "LinkedIn" },
13+
{ key: "github", icon: "github", label: "GitHub" },
14+
{ key: "mastodon", icon: "mastodon", label: "Mastodon" },
15+
{ key: "bluesky", icon: "bluesky", label: "Bluesky" },
16+
{ key: "twitter", icon: "x-twitter", label: "Twitter" },
17+
{ key: "instagram", icon: "instagram", label: "Instagram" },
18+
{ key: "youtube", icon: "youtube", label: "YouTube" }
19+
];
20+
821
---
922

1023
<div
@@ -53,11 +66,65 @@ const gitVersion = __GIT_VERSION__;
5366
<div
5467
class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end"
5568
>
56-
<div class="flex text-white/40 w-full lg:w-2/3 px-6 items-center">
69+
<div class="flex flex-col text-white/40 w-full lg:w-2/3 px-6 items-center">
5770
<p>Excited about our mission? Want to collaborate or contribute? Let's connect!
5871
We're open to partnership opportunities and would love to hear your ideas.
5972
<a class="text-white" href="mailto:[email protected]">[email protected]</a>
6073
</p>
74+
<div class="social-links flex justify-center space-x-4 pt-4">
75+
{socialLinks
76+
.filter((link) => links.socials?.[link.key])
77+
.map((link) => {
78+
if (!links.socials) return;
79+
const url = links.socials[link.key];
80+
let iconColor:string;
81+
82+
switch(link.key) {
83+
case "facebook":
84+
iconColor = "facebook";
85+
break;
86+
case "twitter":
87+
iconColor = "twitter";
88+
break;
89+
case "linkedin":
90+
iconColor = "linkedin";
91+
break;
92+
case "github":
93+
iconColor = "github";
94+
break;
95+
case "instagram":
96+
iconColor = "instagram";
97+
break;
98+
case "discord":
99+
iconColor = "discord";
100+
break;
101+
case "mastodon":
102+
iconColor = "mastodon";
103+
break;
104+
case "bluesky":
105+
iconColor = "bluesky";
106+
break;
107+
default:
108+
iconColor = "";
109+
break;
110+
}
111+
112+
return (
113+
<a
114+
href={url}
115+
target="_blank"
116+
rel="noopener noreferrer"
117+
aria-label={link.label}
118+
class={`social-icon ${iconColor}`}
119+
>
120+
<span class="social-icon-inner">
121+
<Icon name={link.icon} style="brands" size="fa-lg" />
122+
</span>
123+
</a>
124+
);
125+
})}
126+
</div>
127+
61128
</div>
62129
<div class="flex text-white/40 w-full lg:w-1/3 text-start">
63130
<div>

src/components/SponsorCard.astro

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -185,64 +185,6 @@ const socialLinks = [
185185
</div>
186186

187187
<style>
188-
.social-icon {
189-
display: inline-flex;
190-
align-items: center;
191-
justify-content: center;
192-
width: 36px;
193-
height: 36px;
194-
transition: transform 0.3s ease, color 0.3s ease;
195-
}
196-
197-
.social-icon:hover {
198-
transform: scale(1.2) rotate(6deg);
199-
}
200-
201-
.social-icon-inner {
202-
display: flex;
203-
align-items: center;
204-
justify-content: center;
205-
width: 100%;
206-
height: 100%;
207-
}
208-
209-
/* Platform-specific colors */
210-
.social-icon.facebook {
211-
color: #1877f2;
212-
}
213-
214-
.social-icon.twitter {
215-
color: #1da1f2;
216-
}
217-
218-
.social-icon.linkedin {
219-
color: #0a66c2;
220-
}
221-
222-
.social-icon.github {
223-
color: #333333;
224-
}
225-
226-
.social-icon.instagram {
227-
color: #e4405f;
228-
}
229-
230-
.social-icon.discord {
231-
color: #5865F2;
232-
}
233-
234-
.social-icon.mastodon {
235-
color: #6364FF;
236-
}
237-
238-
.social-icon.bluesky {
239-
color: #0085FF;
240-
}
241-
242-
.social-icon.website {
243-
color: #0077b5;
244-
}
245-
246188
/* Website button styles */
247189
.website-btn-container {
248190
display: flex;

src/data/links.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@
247247
]
248248
}
249249
],
250+
"socials": {
251+
"website": "https://europython-society.org",
252+
"blog": "https://blog.europython.eu",
253+
"mastodon": "https://fosstodon.org/@europython",
254+
"linkedin": "https://linkedin.com/company/europython",
255+
"github": "https://github.com/europython",
256+
"bluesky": "https://bsky.app/profile/europython.eu",
257+
"twitter": "https://x.com/europython",
258+
"instagram": "https://instagram.com/europython/",
259+
"youtube": "https://youtube.com/channel/UC98CzaYuFNAA_gOINFB0e4Q"
260+
},
250261
"terms": [
251262
{
252263
"name": "Contacts",

src/styles/global.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,63 @@ main a[href^="#"]::before {
270270
background-size: 65%;
271271
background-color: white;
272272
}
273+
274+
/* Platform-specific colors */
275+
.social-icon.facebook {
276+
color: #1877f2;
277+
}
278+
279+
.social-icon.twitter {
280+
color: #1da1f2;
281+
}
282+
283+
.social-icon.linkedin {
284+
color: #0a66c2;
285+
}
286+
287+
.social-icon.github {
288+
color: #333333;
289+
}
290+
291+
.social-icon.instagram {
292+
color: #e4405f;
293+
}
294+
295+
.social-icon.discord {
296+
color: #5865f2;
297+
}
298+
299+
.social-icon.mastodon {
300+
color: #6364ff;
301+
}
302+
303+
.social-icon.bluesky {
304+
color: #0085ff;
305+
}
306+
307+
.social-icon.website {
308+
color: #0077b5;
309+
}
310+
311+
.social-icon {
312+
display: inline-flex;
313+
align-items: center;
314+
justify-content: center;
315+
width: 36px;
316+
height: 36px;
317+
transition:
318+
transform 0.3s ease,
319+
color 0.3s ease;
320+
}
321+
322+
.social-icon:hover {
323+
transform: scale(1.2) rotate(6deg);
324+
}
325+
326+
.social-icon-inner {
327+
display: flex;
328+
align-items: center;
329+
justify-content: center;
330+
width: 100%;
331+
height: 100%;
332+
}

0 commit comments

Comments
 (0)