Skip to content

Commit 9a168bf

Browse files
committed
Merge branch 'ep2025' into ep2025-cleanup2
2 parents 9bab566 + 5eb0088 commit 9a168bf

File tree

11 files changed

+551
-122
lines changed

11 files changed

+551
-122
lines changed

astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import deleteUnusedImages from "astro-delete-unused-images";
1212
import preload from "astro-preload";
1313
import { execSync } from "node:child_process";
1414

15+
import compress from "astro-compress";
16+
1517
let gitVersion = String(process.env.GIT_VERSION ?? "").slice(0, 7);
1618

1719
if (!gitVersion) {
@@ -87,6 +89,7 @@ export default defineConfig({
8789
metaTags(),
8890
pagefind(),
8991
deleteUnusedImages(),
92+
compress(),
9093
],
9194
output: "static",
9295
build: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@fortawesome/fontawesome-free": "^6.7.2",
2121
"@tailwindcss/typography": "^0.5.16",
2222
"astro": "^5.7.5",
23+
"astro-compress": "^2.3.8",
2324
"astro-delete-unused-images": "^1.0.3",
2425
"astro-meta-tags": "^0.3.1",
2526
"astro-pagefind": "^1.8.3",

pnpm-lock.yaml

Lines changed: 423 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Map.astro

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1-
<Fragment is:raw>
2-
<iframe
3-
src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d10245.064741908278!2d14.4290206!3d50.0625764!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x4d26855708eb61f7!2sPrague%20Congress%20Centre!5e0!3m2!1sen!2suk!4v1676555813425!5m2!1sen!2suk"
4-
title="Map"
5-
class="w-full aspect-video max-w-[800px] border-4 border-white rounded-lg shadow-lg"
6-
allowFullScreen="true"
7-
loading="lazy"
8-
referrerPolicy="no-referrer-when-downgrade"
9-
></iframe>
10-
</Fragment>
1+
---
2+
interface Props {
3+
location?: string;
4+
lat?: number;
5+
lng?: number;
6+
zoom?: number;
7+
title?: string;
8+
}
9+
10+
const {
11+
location,
12+
lat,
13+
lng,
14+
zoom = 14,
15+
title = "Map",
16+
} = Astro.props;
17+
18+
let src = "";
19+
if (lat && lng) {
20+
src = `https://maps.google.com/maps?q=${lat},${lng}&z=${zoom}&t=m&output=embed`;
21+
}
22+
else if (location) {
23+
src = `https://maps.google.com/maps?q=${encodeURIComponent(location)}&t=m&z=${zoom}&output=embed&iwloc=near`;
24+
}
25+
---
26+
<div class="map-container w-full aspect-video max-w-[800px] border-4 border-white rounded-lg shadow-lg">
27+
{src && (
28+
<iframe
29+
src={src}
30+
title={title}
31+
class="w-full aspect-video"
32+
allowfullscreen={true}
33+
loading="lazy"
34+
referrerpolicy="no-referrer-when-downgrade"
35+
style="border:0;"
36+
></iframe>
37+
)}
38+
</div>

src/components/Modal.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const { id = 'modal', open = false, closeOnOutsideClick = false } = Astro.props;
2525
<slot />
2626
</div>
2727
</div>
28-
<script is:inline>
28+
<script >
2929
document.addEventListener('DOMContentLoaded', () => {
3030
// Function to toggle body scroll
3131
const toggleBodyScroll = (disable) => {

src/components/SponsorLogo.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const logo = sponsorLogos[sponsor.id];
2222
---
2323

2424
<div
25-
class="lg:max-w-[400px] flex flex-col gap-6 p-6 rounded-lg shadow-md bg-white text-black"
25+
class="lg:max-w-[400px] flex flex-col p-6 bg-white"
2626
>
2727
<div class="w-full flex justify-center items-center md:items-center">
2828
{

src/components/sponsors/sponsor-tier.astro

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import { getCollection } from "astro:content";
3+
import SponsorLogo from "@components/SponsorLogo.astro";
34
import { Image } from "astro:assets";
45
56
type Sponsor = Awaited<ReturnType<typeof getCollection<"sponsors">>>[0];
@@ -29,7 +30,7 @@ const { tier, top } = Astro.props;
2930
</h4>
3031
<div
3132
class:list={[
32-
"grid gap-6 lg:gap-12 ml-12 items-center justify-items-center",
33+
"grid ml-12 items-center justify-items-center",
3334
{
3435
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3": !top,
3536
"grid-cols-1 md:grid-cols-1": top,
@@ -43,14 +44,8 @@ const { tier, top } = Astro.props;
4344
href={sponsor.data.url}
4445
target="_blank"
4546
rel="noopener noreferrer"
46-
class="pb-8"
4747
>
48-
<Image
49-
src={sponsorLogos[sponsor.id]}
50-
alt={sponsor.data.name}
51-
width={500}
52-
class="max-w-[250px] max-h-[120px]"
53-
/>
48+
<SponsorLogo sponsor={sponsor.id} />
5449
</a>
5550
</div>
5651
))

src/components/sponsors/sponsors.astro

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,46 +45,50 @@ const sponsorTiers = tiers
4545
4646
const topTier = sponsorTiers.find((tier) => tier.name === "Keystone");
4747
---
48+
4849
<Section variant="secondary">
49-
<Headline id="sponsors" title="Sponsors & Partners" center=true />
50-
<div>
51-
{
52-
hasSponsors ? (
53-
<p class="text-center">
54-
EuroPython wouldn't be such an affordable event without the help
55-
of the sponsors and partners. We'd like to thank all of them for their
56-
support.
57-
</p>
58-
) : (
59-
<p class="text-center">
60-
Sponsoring EuroPython guarantees you highly targeted visibility
61-
and the opportunity to present yourself and your sponsor to one
62-
of the largest and most diverse Python communities in Europe and
63-
beyond.
64-
</p>
65-
)
66-
}
50+
<Headline id="sponsors" title="Sponsors & Partners" center="true" />
51+
<div class="mb-10">
52+
{
53+
hasSponsors ? (
54+
<p class="text-center">
55+
EuroPython wouldn't be such an affordable event without the help of
56+
the sponsors and partners. We'd like to thank all of them for their
57+
support.
58+
</p>
59+
) : (
60+
<p class="text-center">
61+
Sponsoring EuroPython guarantees you highly targeted visibility and
62+
the opportunity to present yourself and your sponsor to one of the
63+
largest and most diverse Python communities in Europe and beyond.
64+
</p>
65+
)
66+
}
6767

68-
<div class="mt-4 text-center">
69-
<Button url="/sponsor">Become a sponsor</Button>
70-
</div>
71-
{
72-
topTier && topTier.sponsors.length > 0 && (
73-
<SponsorTier tier={topTier} top={true} />
74-
)
75-
}
68+
<div class="mt-4 text-center">
69+
<Button url="/sponsor">Become a sponsor</Button>
7670
</div>
71+
{
72+
topTier && topTier.sponsors.length > 0 && (
73+
<SponsorTier tier={topTier} top={true} />
74+
)
75+
}
76+
</div>
7777

78-
{sponsorTiers.length > 0 && <Separator light />}
78+
{sponsorTiers.length > 0 && <hr />}
7979

80-
<div class="mb-20">
80+
<div class="">
8181
{
8282
sponsorTiers.map((tier, index) => (
8383
<Fragment>
8484
<SponsorTier tier={tier} top={tier.name === "Platinum"} />
85-
{index !== sponsorTiers.length - 1 && <Separator light />}
85+
{index !== sponsorTiers.length - 1 && <hr />}
8686
</Fragment>
8787
))
8888
}
89-
</div>
89+
</div>
9090
</Section>
91+
92+
<style>
93+
hr {margin: 10px 0;}
94+
</style>

src/content/pages/test.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,48 @@ Barking up the right tree
281281
<Accordion title="Finnish-speaking dogs" id="finnish">
282282
***Hau hau!***
283283
</Accordion>
284+
285+
## Maps
286+
<h2>Example 1: Map with Location</h2>
287+
<Map
288+
location="Empire State Building, New York"
289+
zoom={15}
290+
/>
291+
292+
<h2>Example 2: Map with Coordinates (Latitude & Longitude)</h2>
293+
<Map
294+
lat={48.8584}
295+
lng={2.2945}
296+
zoom={16}
297+
title="Eiffel Tower, Paris"
298+
/>
299+
300+
<h2>Example 3: Map with Default Zoom Level</h2>
301+
<Map
302+
location="Sydney Opera House"
303+
/>
304+
305+
<h2>Example 4: Map with Custom Title</h2>
306+
<Map
307+
lat={36.1069}
308+
lng={-112.1129}
309+
zoom={13}
310+
title="Grand Canyon"
311+
/>
312+
313+
<h2>Example 5: Map with All Default Values</h2>
314+
<Map
315+
location="Statue of Liberty, New York"
316+
/>
317+
318+
<h2>Usage in Layout</h2>
319+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
320+
<div>
321+
<h3>New York</h3>
322+
<Map location="New York, NY" />
323+
</div>
324+
<div>
325+
<h3>London</h3>
326+
<Map location="London, UK" />
327+
</div>
328+
</div>

src/content/pages/venue.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Vyšehrad station (on Line C of the Prague underground railway) is right next to
2323
the venue and offers convenient public transport from the airport and all major
2424
rail and bus stations.
2525

26-
<Map />
26+
<Map location="Prague Congress Centre" zoom={15} />
2727

2828
<address>
2929
**Entrance 5**

0 commit comments

Comments
 (0)