Skip to content

Commit e6b77df

Browse files
Merge branch 'ep2025' into ep2025-issue-navbar
2 parents ff7e557 + 06fc6de commit e6b77df

File tree

13 files changed

+346
-85
lines changed

13 files changed

+346
-85
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ RUN corepack enable
88
RUN pnpm config set store-dir /home/node/.local/share/pnpm/store
99

1010
WORKDIR /app
11+
12+
COPY package.json pnpm-lock.yaml ./
13+
RUN pnpm install
14+
15+
RUN mkdir -p /app/src

astro.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ export default defineConfig({
9090
metaTags(),
9191
pagefind(),
9292
deleteUnusedImages(),
93-
compress(),
93+
(await import("astro-compress")).default({
94+
SVG: false,
95+
}),
9496
],
9597
output: "static",
9698
build: {

docker-compose.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ services:
33
build:
44
context: .
55
dockerfile: Dockerfile
6-
entrypoint: ["bash", "-c"]
7-
command: ["pnpm install && pnpm run dev --host 0.0.0.0"]
8-
volumes:
9-
- .:/app
6+
command: ["pnpm", "run", "dev", "--host", "0.0.0.0"]
107
ports:
118
- "4321:4321"
129
environment:
1310
- ASTRO_TELEMETRY_DISABLED=1
11+
- NODE_ENV=development
12+
volumes:
13+
- .:/app
14+
- node_modules:/app/node_modules
15+
- .pnpm-store:/app/.pnpm-store
16+
17+
volumes:
18+
node_modules:

public/social/bg2.png

45.4 KB
Loading

public/social/bg3.png

591 KB
Loading

public/social/bg4.png

423 KB
Loading

scripts/download_social.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const puppeteer = require("puppeteer");
66
args: ["--no-sandbox", "--disable-setuid-sandbox"],
77
});
88
const page = await browser.newPage();
9-
await page.goto("http://localhost:4321/media/social_media_cards");
9+
await page.goto("http://localhost:4321/media/speakers");
1010

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

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
import { getEntry } from "astro:content";
3+
import { sponsorLogos } from "@data/sponsorLogos";
4+
5+
const { sponsor } = Astro.props;
6+
7+
const {
8+
name: title,
9+
url: website,
10+
logo_padding = false,
11+
} = sponsor.data;
12+
13+
14+
const logo = sponsorLogos[sponsor.id];
15+
// Assuming logo.width and logo.height are known
16+
const targetWidth = 400;
17+
const originalWidth = logo.width;
18+
const originalHeight = logo.height;
19+
const aspectRatio = originalWidth / originalHeight;
20+
21+
let width = targetWidth;
22+
let height = width / aspectRatio;
23+
24+
const maxHeight = 220;
25+
if (height > maxHeight) {
26+
height = maxHeight;
27+
width = height * aspectRatio ;
28+
}
29+
30+
const x = 450 - width / 2;
31+
const y = 650 - height / 2;
32+
33+
---
34+
<svg width="900" height="900" class="h-full w-full -z-10">
35+
<image href="/social/bg4.png" width="900" height="900" />
36+
</svg>
37+
<svg width="900" height="900">
38+
39+
<image
40+
class="sponsor_logo"
41+
href={logo.src}
42+
x={x}
43+
y={y}
44+
width={width}
45+
height={height}
46+
style={{
47+
padding: logo_padding ? logo_padding : undefined,
48+
}}
49+
clip-path="url(#curvedCornerClip)"
50+
preserveAspectRatio="xMidYMid meet"
51+
/>
52+
</svg>
53+
54+
<p lang="en" class="box2 fit-text">
55+
{title}
56+
</p>
57+
58+
59+
<style>
60+
.box {
61+
margin-top:250px;
62+
width: 630px;
63+
height: 150px;
64+
font-size: 100px;
65+
color: rgb(239, 215, 123);
66+
padding: 1rem;
67+
opacity: 0;
68+
}
69+
70+
.box2 {
71+
margin-top:320px;
72+
margin-left:150px;
73+
width: 640px;
74+
height: 180px;
75+
font-size: 70px;
76+
color:white;
77+
padding: 2rem;
78+
}
79+
80+
.box3 {
81+
margin-top:280px;
82+
width: 800px;
83+
height: 300px;
84+
font-size: 100px;
85+
color: rgb(239, 215, 123);
86+
padding: 1rem;
87+
}
88+
89+
.box4 {
90+
91+
width: 580px;
92+
height: 200px;
93+
font-size: 70px;
94+
color:white;
95+
padding: 2rem;
96+
}
97+
98+
99+
.box, .box2, .box3, .box4 {
100+
box-sizing: border-box;
101+
overflow: hidden;
102+
display: flex;
103+
align-items: center;
104+
justify-content: center;
105+
text-align: center;
106+
font-family: Inter, sans-serif !important;
107+
font-weight: bold;
108+
line-height: 1em;
109+
}
110+
111+
.sponsor_logo {
112+
max-height:120px;
113+
}
114+
</style>

src/pages/media/social_media.csv.ts

Lines changed: 0 additions & 78 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)