Skip to content

Commit b05dd26

Browse files
authored
Improve prague section. (#1119)
1 parent 0aceaf0 commit b05dd26

File tree

8 files changed

+80
-60
lines changed

8 files changed

+80
-60
lines changed

astro.config.mjs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import path, { dirname } from "path";
2-
import { fileURLToPath } from "url";
1+
import path from "path";
32
import { defineConfig } from "astro/config";
43
import mdx from "@astrojs/mdx";
5-
import { h } from "hastscript";
64
import sitemap from "@astrojs/sitemap";
75
import react from "@astrojs/react";
86
import tailwind from "@astrojs/tailwind";
@@ -13,9 +11,6 @@ import metaTags from "astro-meta-tags";
1311
import pagefind from "astro-pagefind";
1412
import deleteUnusedImages from "astro-delete-unused-images";
1513

16-
const __filename = fileURLToPath(import.meta.url);
17-
const __dirname = dirname(__filename); // @type-check enabled!
18-
1914
// https://astro.build/config
2015
export default defineConfig({
2116
vite: {
@@ -24,6 +19,7 @@ export default defineConfig({
2419
},
2520
resolve: {
2621
alias: {
22+
"@data": path.resolve("./src/data"),
2723
"@components": path.resolve("./src/components"),
2824
"@sections": path.resolve("./src/components/sections"),
2925
"@layouts": path.resolve("./src/layouts"),
@@ -80,4 +76,7 @@ export default defineConfig({
8076
build: {
8177
minify: true,
8278
},
79+
experimental: {
80+
svg: true,
81+
},
8382
});
File renamed without changes.

src/assets/prague.svg

Lines changed: 13 additions & 0 deletions
Loading

src/components/hero-section/prague.astro

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/components/sections/prague.astro

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,63 @@
11
---
2-
import PragueComponent from "@components/hero-section/prague.astro";
3-
import * as venue from "../../data/home/prague.mdx";
2+
import Button from "@ui/Button.astro";
3+
import { Title } from "@components/typography/title";
4+
import { Image } from "astro:assets";
5+
import pragueImage from "@assets/prague.png";
6+
import Logo from "@assets/prague.svg";
47
---
5-
<div class="mt-12 px-6 pb-32 overflow-visible">
6-
<PragueComponent title={venue.frontmatter.title}>
7-
<venue.Content />
8-
</PragueComponent>
9-
</div>
8+
9+
<div class="mt-12 px-6 pb-32 overflow-visible">
10+
<article class="lg:grid gap-12 grid-cols-2">
11+
<div class="relative hidden lg:block">
12+
<Image
13+
src={pragueImage}
14+
class="w-full h-auto border-4 border-white rounded-lg shadow-lg"
15+
alt="Beautiful view of Prague"
16+
width={1200}
17+
height={900}
18+
/>
19+
</div>
20+
<div class="flex flex-col justify-center">
21+
<Title level={2}>Prague</Title>
22+
<div
23+
class:list={[
24+
"mb-4 prose prose-xl",
25+
"prose-h1:text-text prose-headings:font-title",
26+
"prose-headings:text-text",
27+
]}
28+
>
29+
While we are getting the conference ready for you,
30+
why don't you take a look at the beautiful city of Prague?
31+
</div>
32+
<div class="space-x-4 mb-5">
33+
<Button url="/where"> Where is EuroPython? </Button>
34+
</div>
35+
<div class="space-x-12">
36+
<Button url="/explore"> Explore Prague </Button>
37+
</div>
38+
</div>
39+
</article>
40+
</div>
41+
42+
<div class="city full-bleed" id="one">
43+
<Logo />
44+
</div>
45+
46+
<style>
47+
article {
48+
position: relative;
49+
top: 20vh;
50+
margin-top: -20vh;
51+
}
52+
.city {
53+
position: relative;
54+
top:0;
55+
width: 100vw;
56+
}
57+
.city svg {
58+
width: 100vw;
59+
position: relative;
60+
bottom: -4px;
61+
z-index: -1;
62+
}
63+
</style>

src/data/home/prague.mdx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/pages/index.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import Prague from "@sections/prague.astro";
1616
<Updates />
1717

1818
<KeynotersComponent />
19-
2019
<Prague />
2120

2221
<Sponsors />

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"jsx": "react-jsx",
66
"jsxImportSource": "react",
77
"paths": {
8+
"@data/*": ["src/data/*"],
89
"@components/*": ["src/components/*"],
910
"@sections/*": ["src/components/sections/*"],
1011
"@ui/*": ["src/components/ui/*"],

0 commit comments

Comments
 (0)