|
1 | 1 | --- |
2 | | -import { Image } from "astro:assets"; |
| 2 | +import Icon from "@ui/Icon.astro"; |
3 | 3 | import links from "@data/links.json"; |
4 | 4 | import EPSLogo from "../../public/eps-logo.svg"; |
5 | 5 |
|
6 | 6 | const buildTimestamp = __TIMESTAMP__; |
7 | 7 | 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 | +
|
8 | 21 | --- |
9 | 22 |
|
10 | 23 | <div |
@@ -53,11 +66,65 @@ const gitVersion = __GIT_VERSION__; |
53 | 66 | <div |
54 | 67 | class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end" |
55 | 68 | > |
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"> |
57 | 70 | <p>Excited about our mission? Want to collaborate or contribute? Let's connect! |
58 | 71 | We're open to partnership opportunities and would love to hear your ideas. |
59 | 72 | <a class="text-white" href="mailto:helpdesk@europython.eu">helpdesk@europython.eu</a> |
60 | 73 | </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 | + |
61 | 128 | </div> |
62 | 129 | <div class="flex text-white/40 w-full lg:w-1/3 text-start"> |
63 | 130 | <div> |
|
0 commit comments