Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,7 @@ export default defineConfig({
prefetch: {
prefetchAll: false,
},
devToolbar: {
enabled: false,
},
});
Binary file added public/media/speakers/social-abhik-sarkar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-adam-gorgon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-aleksander.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-alenka-frim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-anwesha-das.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-ariel-ortiz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-cheuk-ting-ho.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-claudiu-belu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-cody-fincher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-damian-wysocki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-daniel-vahla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-daria-korsakova.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-david-rousset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-david-vaz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-dawn-wages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-deb-nicholson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-diego-russo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/media/speakers/social-domagoj-maric.png
Binary file added public/media/speakers/social-eleni-tokmaktsi.png
Binary file added public/media/speakers/social-emmanuel-ugwu.png
Binary file added public/media/speakers/social-evan-kohilas.png
Binary file added public/media/speakers/social-farhaan-bukhsh.png
Binary file added public/media/speakers/social-filip-makraduli.png
Binary file added public/media/speakers/social-florian-freitag.png
Binary file added public/media/speakers/social-freya-bruhin.png
Binary file added public/media/speakers/social-fridtjof-stoldt.png
Binary file added public/media/speakers/social-gleb-khmyznikov.png
Binary file added public/media/speakers/social-goutam-tiwari.png
Binary file added public/media/speakers/social-gracjan-adamus.png
Binary file added public/media/speakers/social-grzegorz-bokota.png
Binary file added public/media/speakers/social-grzegorz-kocjan.png
Binary file added public/media/speakers/social-ivan-markeev.png
Binary file added public/media/speakers/social-ivana-kellyer.png
Binary file added public/media/speakers/social-jan-bjorge.png
Binary file added public/media/speakers/social-jan-koprowski.png
Binary file added public/media/speakers/social-jan-musilek.png
Binary file added public/media/speakers/social-jan-smitka.png
Binary file added public/media/speakers/social-jenny-vega.png
Binary file added public/media/speakers/social-johannes-kolbe.png
Binary file added public/media/speakers/social-jon-nordby.png
Binary file added public/media/speakers/social-jukka-lehtosalo.png
Binary file added public/media/speakers/social-julien-courtes.png
Binary file added public/media/speakers/social-kamil-kulig.png
Binary file added public/media/speakers/social-karen-jex.png
Binary file added public/media/speakers/social-katie-bickford.png
Binary file added public/media/speakers/social-ken-jin.png
Binary file added public/media/speakers/social-koudai-aono.png
Binary file added public/media/speakers/social-kuldeep-pisda.png
Binary file added public/media/speakers/social-larry-hastings.png
Binary file added public/media/speakers/social-laura-summers.png
Binary file added public/media/speakers/social-maciej-sobczak.png
Binary file added public/media/speakers/social-mai-gimenez.png
Binary file added public/media/speakers/social-malcolm-smith.png
Binary file added public/media/speakers/social-marco-grossi.png
Binary file added public/media/speakers/social-maria-ashna.png
Binary file added public/media/speakers/social-mario-garcia.png
Binary file added public/media/speakers/social-mateusz-sokol.png
Binary file added public/media/speakers/social-michael-seifert.png
Binary file added public/media/speakers/social-mike-fiedler.png
Binary file added public/media/speakers/social-mike-muller.png
Binary file added public/media/speakers/social-nathan-goldbaum.png
Binary file added public/media/speakers/social-nikita-karamov.png
Binary file added public/media/speakers/social-nikita-smirnov.png
Binary file added public/media/speakers/social-nitish.png
Binary file added public/media/speakers/social-olha-poliuliakh.png
Binary file added public/media/speakers/social-petr-viktorin.png
Binary file added public/media/speakers/social-piotr-gredowski.png
Binary file added public/media/speakers/social-piotr-rybak.png
Binary file added public/media/speakers/social-reuven-m-lerner.png
Binary file added public/media/speakers/social-sangarshanan.png
Binary file added public/media/speakers/social-sergi-porta.png
Binary file added public/media/speakers/social-stefanie-molin.png
Binary file added public/media/speakers/social-thomas-wouters.png
Binary file added public/media/speakers/social-tobias-wrigstad.png
Binary file added public/media/speakers/social-tomas-roun.png
Binary file added public/media/speakers/social-vladimir-slavov.png
Binary file added public/media/speakers/social-will-vincent.png
Binary file removed public/media/sponsors/social-1password.png
Diff not rendered.
Binary file removed public/media/sponsors/social-anaconda.png
Diff not rendered.
Binary file removed public/media/sponsors/social-apify.png
Diff not rendered.
Binary file modified public/media/sponsors/social-arm.png
Binary file removed public/media/sponsors/social-ataccama.png
Diff not rendered.
Binary file added public/media/sponsors/social-backmarket.png
Binary file modified public/media/sponsors/social-bloomberg.png
Binary file added public/media/sponsors/social-clug.png
Binary file removed public/media/sponsors/social-cultrepo.png
Diff not rendered.
Binary file removed public/media/sponsors/social-djangocon.png
Diff not rendered.
Binary file removed public/media/sponsors/social-dsf.png
Diff not rendered.
Binary file modified public/media/sponsors/social-eps.png
Binary file added public/media/sponsors/social-euroscipy.png
Binary file removed public/media/sponsors/social-evolabel.png
Diff not rendered.
Binary file added public/media/sponsors/social-fsfe.png
Binary file removed public/media/sponsors/social-gel.png
Diff not rendered.
Binary file modified public/media/sponsors/social-google-cloud.png
Binary file modified public/media/sponsors/social-hablemospython.png
Binary file added public/media/sponsors/social-hrt.png
Binary file modified public/media/sponsors/social-jetbrains.png
Binary file removed public/media/sponsors/social-junior-guru.png
Diff not rendered.
Binary file removed public/media/sponsors/social-lwn-net.png
Diff not rendered.
Binary file added public/media/sponsors/social-manychat.png
Binary file modified public/media/sponsors/social-microsoft.png
Binary file modified public/media/sponsors/social-numberly.png
Binary file added public/media/sponsors/social-optiver.png
Binary file removed public/media/sponsors/social-picnic.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pretalx.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pretix.png
Diff not rendered.
Binary file removed public/media/sponsors/social-prusa.png
Diff not rendered.
Binary file modified public/media/sponsors/social-psf.png
Binary file removed public/media/sponsors/social-pycon-at.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pycon-fi.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pycon-fr.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pycon-gr.png
Diff not rendered.
Binary file added public/media/sponsors/social-pycon-greece.png
Binary file removed public/media/sponsors/social-pycon-it.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pycon-pt.png
Diff not rendered.
Binary file added public/media/sponsors/social-pyconwro.png
Binary file removed public/media/sponsors/social-pydantic.png
Diff not rendered.
Binary file added public/media/sponsors/social-pydatabydgoszcz.png
Binary file added public/media/sponsors/social-pydatakrk.png
Binary file added public/media/sponsors/social-pygda.png
Binary file added public/media/sponsors/social-pykonik.png
Binary file removed public/media/sponsors/social-pyladies.png
Diff not rendered.
Binary file modified public/media/sponsors/social-pyladiescon.png
Binary file added public/media/sponsors/social-pystok.png
Binary file added public/media/sponsors/social-python-ankara.png
Binary file removed public/media/sponsors/social-python-institute.png
Diff not rendered.
Binary file added public/media/sponsors/social-pythonlodz.png
Binary file added public/media/sponsors/social-pythonpizza.png
Binary file removed public/media/sponsors/social-pyvec.png
Diff not rendered.
Binary file removed public/media/sponsors/social-pyvo.png
Diff not rendered.
Binary file added public/media/sponsors/social-pywaw.png
Binary file removed public/media/sponsors/social-qt.png
Diff not rendered.
Binary file removed public/media/sponsors/social-radio-beat.png
Diff not rendered.
Binary file removed public/media/sponsors/social-rossum.png
Diff not rendered.
Binary file removed public/media/sponsors/social-sema.png
Diff not rendered.
Binary file removed public/media/sponsors/social-sentry.png
Diff not rendered.
Binary file removed public/media/sponsors/social-snowflake.png
Diff not rendered.
Binary file removed public/media/sponsors/social-startup.png
Diff not rendered.
Binary file removed public/media/sponsors/social-travelperk.png
Diff not rendered.
Binary file added public/social/partner_card.png
Binary file added public/social/speaker_card.png
Binary file added public/social/sponsor_card.png
80 changes: 80 additions & 0 deletions scripts/download_social_speakers.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const puppeteer = require("puppeteer");

(async () => {
const browser = await puppeteer.launch({
executablePath: process.env.CHROME_BIN,
args: ["--no-sandbox", "--disable-setuid-sandbox"],
});
const page = await browser.newPage();
await page.goto("http://localhost:4321/media/speakers", {
waitUntil: "domcontentloaded",
timeout: 60000,
});

// Wait for all images to finish loading (both <img> and SVG <image> elements)
await page.evaluate(() =>
Promise.all([
// HTML img elements
...Array.from(document.images)
.filter((img) => !img.complete)
.map(
(img) =>
new Promise((resolve) => {
img.onload = resolve;
img.onerror = resolve;
})
),
// SVG <image> elements loaded via href
...Array.from(document.querySelectorAll("svg image[href]")).map(
(svgImg) =>
new Promise((resolve) => {
const url = svgImg.getAttribute("href");
if (!url) return resolve();
const img = new Image();
img.onload = resolve;
img.onerror = resolve;
img.src = url;
})
),
])
);

// Hide the Astro dev toolbar and any other overlays before screenshotting
await page.addStyleTag({
content: `
astro-dev-toolbar,
astro-dev-toolbar-window,
[data-astro-dev-toolbar],
#astro-dev-toolbar { display: none !important; }
`,
});

// Unwrap .social divs from their <a> parent to prevent the browser's
// link toolbar overlay from appearing in screenshots
await page.evaluate(() => {
document.querySelectorAll("a > .social").forEach((el) => {
el.parentElement.replaceWith(el);
});
});

// Move mouse away from any element to avoid hover states
await page.mouse.move(0, 0);

const elements = await page.$$(".social");

for (let i = 0; i < elements.length; i++) {
const el = elements[i];

// Get the slug from the element
const slug = await page.evaluate((el) => el.getAttribute("data-slug"), el);

// Fallback if slug is missing
const filename = slug ? `social-${slug}.png` : `social-${i}.png`;

await el.screenshot({ path: filename });
console.log(`Saved ${filename}`);
}

console.log(`Done. ${elements.length} cards generated.`);
await browser.close();
})();
File renamed without changes.
75 changes: 37 additions & 38 deletions src/components/SocialMediaCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,33 @@ const { entry } = Astro.props;
const sessions: CollectionEntry<"sessions">[]= await getEntries(entry.data.submissions);
---
<svg class="bg" width="900" height="900" class="h-full w-full -z-10">
<image href="/social/bg.png" width="900" height="900" />
<image href="/social/speaker_card.png" width="900" height="900" />
</svg>
{
entry.data.avatar ? (
<svg class="avatar" width="900" height="900">
<defs>
<clipPath id="curvedCornerClip">
<path
d="
m 885 885 l -240 0 a 240 240 0 0 1 -240 -240 a 240 240 0 0 1 240 -240 a 240 240 0 0 1 240 240 z
"
/>
<circle cx="645" cy="645" r="230" />
</clipPath>
</defs>
<image
href={entry.data.avatar}
x="400"
y="400"
width="500"
height="560"
x="415"
y="415"
width="460"
height="460"
clip-path="url(#curvedCornerClip)"
preserveAspectRatio="xMidYMid slice"
/>
</svg>
<p
class="box fit-text"
>
{sessions.map((session) => <>{session.data.title} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</>)}
{sessions.map((session) => <>{session.data.title}</>)}
</p>

<p lang="en" class="box2 fit-text">
<p lang="en" class="box2 fit-text" data-max-font="60">
{entry.data.name}
</p>

Expand All @@ -45,7 +41,7 @@ const sessions: CollectionEntry<"sessions">[]= await getEntries(entry.data.submi
<p
class="box3 fit-text"
>
{sessions.map((session) => <>{session.data.title} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</>)}
{sessions.map((session) => <>{session.data.title}</>)}
</p>

<p lang="en" class="box4 fit-text">
Expand All @@ -58,56 +54,59 @@ const sessions: CollectionEntry<"sessions">[]= await getEntries(entry.data.submi


<style>
/* With avatar: text occupies the left ~half of the card */
.box {
margin-top:240px;
width: 430px;
height: 300px;
position: absolute;
left: 0;
top: 200px;
width: 450px;
height: 320px;
font-size: 100px;
color: rgb(239, 215, 123);
padding: 1rem;
position:relative;
}

.box2 {

width: 420px;
height: 200px;
position: absolute;
left: 0;
top: 540px;
width: 450px;
height: 160px;
font-size: 70px;
color:white;
padding: 2rem;
position:relative;
color: white;
padding: 1rem 3rem;
}

/* No avatar: text spans the full width */
.box3 {
margin-top:280px;
width: 800px;
height: 300px;
position: absolute;
left: 0;
top: 220px;
width: 900px;
height: 320px;
font-size: 100px;
color: rgb(239, 215, 123);
padding: 1rem;
position:relative;
}

.box4 {

width: 580px;
position: absolute;
left: 0;
top: 540px;
width: 900px;
height: 200px;
font-size: 70px;
color:white;
padding: 2rem;
position:relative;
color: white;
padding: 1rem;
}


.box, .box2, .box3, .box4 {
box-sizing: border-box;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
display: block;
text-align: center;
font-family: Inter, sans-serif !important;
font-weight: bold;
line-height: 1em;
}
line-height: 1.1em;
}
</style>
4 changes: 2 additions & 2 deletions src/components/SocialMediaSponsorCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const tiers = [
"Patron",
] as const;
const bg_url = tiers.includes(tier)? '/social/bg4.png' : '/social/bg5.png';
const bg_url = tiers.includes(tier)? '/social/sponsor_card.png' : '/social/partner_card.png';
// Function to parse CSS padding values
Expand Down Expand Up @@ -76,7 +76,7 @@ if (height > availableHeight) {
// Calculate position with padding offset
const x = 450 - (width + padding.left + padding.right) / 2 + padding.left;
const y = 650 - (height + padding.top + padding.bottom) / 2 + padding.top;
const y = 670 - (height + padding.top + padding.bottom) / 2 + padding.top;
---

<svg class="bg" width="900" height="900" class="h-full w-full -z-10">
Expand Down
Loading
Loading