|
1 | 1 | --- |
2 | | -import CommonLayout from '../layouts/CommonLayout.astro'; |
3 | | -import '../styles/index.scss'; |
4 | | -import Button from '../components/Button.astro'; |
5 | | -import Person from '../components/people/Person.astro'; |
6 | | -import Divider from '../components/Divider.astro'; |
| 2 | +import CommonLayout from "../layouts/CommonLayout.astro"; |
| 3 | +import "../styles/index.scss"; |
| 4 | +import Button from "../components/Button.astro"; |
| 5 | +import Person from "../components/people/Person.astro"; |
| 6 | +import Divider from "../components/Divider.astro"; |
7 | 7 |
|
8 | 8 | const { frontmatter } = Astro.props; |
9 | | -const { talkTitle, talkLevel, url, tracks = [], day = "tuesday" } = |
10 | | - frontmatter; |
| 9 | +const { talkTitle, talkLevel, url, tracks = [], day = "tuesday" } = frontmatter; |
11 | 10 |
|
12 | 11 | const sep = /\/\/\/\/\/\/.*/; |
13 | | -const content = await Astro.slots.render('default'); |
| 12 | +const content = await Astro.slots.render("default"); |
14 | 13 | const abstract = content.split(sep)[0]; |
15 | | -const bio = content.split(sep)[1].replace(/^\n|\n$/g, ''); |
| 14 | +const bio = content.split(sep)[1].replace(/^\n|\n$/g, ""); |
16 | 15 |
|
17 | | -function list(names: string[]){ |
| 16 | +function list(names: string[]) { |
18 | 17 | const finalName = names.pop(); |
19 | | - return names.length |
20 | | - ? names.join(', ') + ' & ' + finalName |
21 | | - : finalName; |
| 18 | + return names.length ? names.join(", ") + " & " + finalName : finalName; |
22 | 19 | } |
23 | 20 |
|
24 | 21 | const speaker_names = list(frontmatter.speakers.map((s: any) => s.name)); |
25 | | -
|
26 | 22 | --- |
27 | 23 |
|
28 | 24 | <CommonLayout title={talkTitle} withLogo> |
@@ -52,84 +48,79 @@ const speaker_names = list(frontmatter.speakers.map((s: any) => s.name)); |
52 | 48 | frontmatter.speakers.map((speaker: any) => ( |
53 | 49 | <Person description={bio} {...speaker} /> |
54 | 50 | )) |
55 | | - } |
| 51 | + } |
| 52 | + </div> |
| 53 | + <div class="py-6"> |
56 | 54 | <div class="buttons"> |
57 | | - { |
58 | | - !tracks.includes("industry")?( |
59 | | - <Button |
60 | | - link="https://www.eventbrite.nl/e/rustweek-2025-tickets-1001676961757?aff=oddtdtcreator" |
61 | | - > |
62 | | - Get your ticket |
63 | | - </Button> |
64 | | - ):( |
65 | | - |
66 | | - <Button |
67 | | - link="https://www.eventbrite.nl/e/industry-track-rustweek-2025-tickets-1115250035879" |
68 | | - > |
69 | | - Get your ticket |
70 | | - </Button> |
71 | | - ) |
72 | | - } |
73 | | - <Button |
74 | | - link=`/schedule/${day}/#${url.split('/').pop()}` |
75 | | - > |
76 | | - Find in timetable |
77 | | - </Button> |
| 55 | + { |
| 56 | + !tracks.includes("industry") ? ( |
| 57 | + <Button link="https://www.eventbrite.nl/e/rustweek-2025-tickets-1001676961757?aff=oddtdtcreator"> |
| 58 | + Get your ticket |
| 59 | + </Button> |
| 60 | + ) : ( |
| 61 | + <Button link="https://www.eventbrite.nl/e/industry-track-rustweek-2025-tickets-1115250035879"> |
| 62 | + Get your ticket |
| 63 | + </Button> |
| 64 | + ) |
| 65 | + } |
| 66 | + <Button link=`/schedule/${day}/#${url.split('/').pop()}`> |
| 67 | + Find in timetable |
| 68 | + </Button> |
78 | 69 | </div> |
79 | 70 | </div> |
80 | 71 | </div> |
81 | 72 | </section> |
82 | 73 | </CommonLayout> |
83 | 74 |
|
84 | 75 | <style is:global> |
85 | | -.bio p { |
| 76 | + .bio p { |
86 | 77 | margin: 0; |
87 | 78 | padding: 0; |
88 | 79 | min-height: 0; |
89 | | -} |
| 80 | + } |
90 | 81 | </style> |
91 | 82 |
|
92 | 83 | <style lang="scss"> |
93 | | -@use '../styles/variables.scss'; |
94 | | -@use '../styles/breakpoint.scss'; |
| 84 | + @use "../styles/variables.scss"; |
| 85 | + @use "../styles/breakpoint.scss"; |
95 | 86 |
|
96 | | -.bio { |
| 87 | + .bio { |
97 | 88 | grid-area: bio; |
98 | | -} |
99 | | -.name { |
| 89 | + } |
| 90 | + .name { |
100 | 91 | padding: 0; |
101 | 92 | margin: 0; |
102 | 93 | grid-area: name; |
103 | 94 | font-size: variables.$font-size-lg; |
104 | | -} |
105 | | -.picture { |
| 95 | + } |
| 96 | + .picture { |
106 | 97 | grid-area: picture; |
107 | | -} |
| 98 | + } |
108 | 99 |
|
109 | | -.kicker { |
110 | | - color: variables.$color-red-400; |
111 | | - font-weight: 700; |
112 | | - text-transform: uppercase; |
113 | | -} |
| 100 | + .kicker { |
| 101 | + color: variables.$color-red-400; |
| 102 | + font-weight: 700; |
| 103 | + text-transform: uppercase; |
| 104 | + } |
114 | 105 |
|
115 | | -h1 { |
116 | | - padding: 0; |
117 | | - text-decoration: none; |
118 | | -} |
| 106 | + h1 { |
| 107 | + padding: 0; |
| 108 | + text-decoration: none; |
| 109 | + } |
119 | 110 |
|
120 | | -h2 { |
121 | | - text-decoration: none; |
122 | | -} |
| 111 | + h2 { |
| 112 | + text-decoration: none; |
| 113 | + } |
123 | 114 |
|
124 | | -.buttons { |
| 115 | + .buttons { |
125 | 116 | display: flex; |
126 | 117 | flex-direction: row; |
127 | 118 | align-items: center; |
128 | 119 | justify-content: center; |
129 | 120 | gap: 1em; |
130 | 121 |
|
131 | 122 | @include breakpoint.smaller_than(lg) { |
132 | | - flex-direction: column; |
| 123 | + flex-direction: column; |
133 | 124 | } |
134 | | -} |
| 125 | + } |
135 | 126 | </style> |
0 commit comments