@@ -20,9 +20,11 @@ type Speaker = CollectionEntry<"speakers">;
2020 <body class =" overflow-auto" >
2121{
2222 speakers .map ((entry : Speaker ) => (
23+ <a href =`/media/card/${entry.data.slug}`>
2324 <div class = " social relative w-[900px] h-[900px] overflow-hidden" data-slug = { entry .data .slug } >
2425 <SocialMediaCard entry = { entry } />
2526 </div >
27+ < / a >
2628 ))
2729}
2830
@@ -78,49 +80,3 @@ fitAllText();
7880
7981window.addEventListener('resize', fitAllText);
8082</script >
81-
82-
83- <script >
84- document.addEventListener('DOMContentLoaded', () => {
85- document.querySelectorAll('.social').forEach((socialDiv, index) => {
86-
87- socialDiv.addEventListener('click', () => {
88- const svgs = socialDiv.querySelectorAll('svg');
89-
90- if (svgs.length === 0) {
91- alert('No SVGs found!');
92- return;
93- }
94-
95- const xmlns = "http://www.w3.org/2000/svg";
96- const combinedSvg = document.createElementNS(xmlns, "svg");
97- combinedSvg.setAttribute("xmlns", xmlns);
98- combinedSvg.setAttribute("width", "900");
99- combinedSvg.setAttribute("height", "900");
100- combinedSvg.setAttribute("viewBox", "0 0 900 900");
101-
102- svgs.forEach(svg => {
103- const g = document.createElementNS(xmlns, "g");
104- g.innerHTML = svg.innerHTML;
105- combinedSvg.appendChild(g);
106- });
107-
108- const serializer = new XMLSerializer();
109- const svgString = serializer.serializeToString(combinedSvg);
110-
111- const blob = new Blob([svgString], {type: "image/svg+xml"});
112- const url = URL.createObjectURL(blob);
113-
114- const a = document.createElement('a');
115- a.href = url;
116- a.download = `social_media_${index +1}.svg`;
117- a.style.display = "none";
118- document.body.appendChild(a);
119- a.click();
120-
121- URL.revokeObjectURL(url);
122- document.body.removeChild(a);
123- });
124- });
125- });
126- </script >
0 commit comments