Skip to content

Commit f7fdcb0

Browse files
committed
Fix spacing in talk detail page
1 parent 6adf98a commit f7fdcb0

File tree

1 file changed

+52
-61
lines changed

1 file changed

+52
-61
lines changed

src/layouts/TalkLayout.astro

+52-61
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
---
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";
77
88
const { frontmatter } = Astro.props;
9-
const { talkTitle, talkLevel, url, tracks = [], day = "tuesday" } =
10-
frontmatter;
9+
const { talkTitle, talkLevel, url, tracks = [], day = "tuesday" } = frontmatter;
1110
1211
const sep = /\/\/\/\/\/\/.*/;
13-
const content = await Astro.slots.render('default');
12+
const content = await Astro.slots.render("default");
1413
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, "");
1615
17-
function list(names: string[]){
16+
function list(names: string[]) {
1817
const finalName = names.pop();
19-
return names.length
20-
? names.join(', ') + ' & ' + finalName
21-
: finalName;
18+
return names.length ? names.join(", ") + " & " + finalName : finalName;
2219
}
2320
2421
const speaker_names = list(frontmatter.speakers.map((s: any) => s.name));
25-
2622
---
2723

2824
<CommonLayout title={talkTitle} withLogo>
@@ -52,84 +48,79 @@ const speaker_names = list(frontmatter.speakers.map((s: any) => s.name));
5248
frontmatter.speakers.map((speaker: any) => (
5349
<Person description={bio} {...speaker} />
5450
))
55-
}
51+
}
52+
</div>
53+
<div class="py-6">
5654
<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>
7869
</div>
7970
</div>
8071
</div>
8172
</section>
8273
</CommonLayout>
8374

8475
<style is:global>
85-
.bio p {
76+
.bio p {
8677
margin: 0;
8778
padding: 0;
8879
min-height: 0;
89-
}
80+
}
9081
</style>
9182

9283
<style lang="scss">
93-
@use '../styles/variables.scss';
94-
@use '../styles/breakpoint.scss';
84+
@use "../styles/variables.scss";
85+
@use "../styles/breakpoint.scss";
9586

96-
.bio {
87+
.bio {
9788
grid-area: bio;
98-
}
99-
.name {
89+
}
90+
.name {
10091
padding: 0;
10192
margin: 0;
10293
grid-area: name;
10394
font-size: variables.$font-size-lg;
104-
}
105-
.picture {
95+
}
96+
.picture {
10697
grid-area: picture;
107-
}
98+
}
10899

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+
}
114105

115-
h1 {
116-
padding: 0;
117-
text-decoration: none;
118-
}
106+
h1 {
107+
padding: 0;
108+
text-decoration: none;
109+
}
119110

120-
h2 {
121-
text-decoration: none;
122-
}
111+
h2 {
112+
text-decoration: none;
113+
}
123114

124-
.buttons {
115+
.buttons {
125116
display: flex;
126117
flex-direction: row;
127118
align-items: center;
128119
justify-content: center;
129120
gap: 1em;
130121

131122
@include breakpoint.smaller_than(lg) {
132-
flex-direction: column;
123+
flex-direction: column;
133124
}
134-
}
125+
}
135126
</style>

0 commit comments

Comments
 (0)