We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6039156 commit c5f0b14Copy full SHA for c5f0b14
src/pages/media/card/[slug].astro
@@ -84,8 +84,7 @@ fitAllText();
84
window.addEventListener('resize', fitAllText);
85
</script>
86
87
-
88
-<script>
+<script define:vars={{slug: entry.data.slug}}>
89
document.addEventListener('DOMContentLoaded', () => {
90
document.querySelectorAll('.social').forEach((socialDiv, index) => {
91
@@ -118,7 +117,7 @@ window.addEventListener('resize', fitAllText);
118
117
119
const a = document.createElement('a');
120
a.href = url;
121
- a.download = `social_media.svg`;
+ a.download = slug ? `social-${slug}.svg` : `social-${index +1}.svg`;
122
a.style.display = "none";
123
document.body.appendChild(a);
124
a.click();
0 commit comments