in shared/src/commonMain/kotlin/org/jetbrains/kotlinconf/screens/AboutConference.kt [51:126]
fun AboutConference(
onPrivacyNotice: () -> Unit,
onGeneralTerms: () -> Unit,
onWebsiteLink: () -> Unit,
onBack: () -> Unit,
onSpeaker: (SpeakerId) -> Unit,
viewModel: AboutConferenceViewModel = koinViewModel(),
) {
val scrollState = rememberScrollState()
ScrollToTopHandler(scrollState)
ScreenWithTitle(
title = stringResource(Res.string.about_conference_title),
onBack = onBack,
contentScrollState = scrollState,
) {
Column(
modifier = Modifier.padding(top = 24.dp),
verticalArrangement = Arrangement.spacedBy(24.dp),
) {
Text(
text = stringResource(Res.string.about_conference_header),
style = KotlinConfTheme.typography.h1,
modifier = Modifier.semantics { heading() }
)
Text(text = stringResource(Res.string.about_conference_description))
}
Spacer(modifier = Modifier.height(48.dp))
Column(
verticalArrangement = Arrangement.spacedBy(48.dp),
) {
val events by viewModel.events.collectAsStateWithLifecycle()
for (event in events) {
EventCard(
month = event.month,
day = event.day,
line1 = event.title1,
line2 = event.title2,
description = event.description ?: "",
speakers = event.speakers ?: emptyList(),
location = event.sessionCard?.locationLine ?: "",
time = event.sessionCard?.shortTimeline ?: "",
onSpeaker = onSpeaker,
)
}
}
Image(
painter = painterResource(Res.drawable.kotlinconf_by_jetbrains),
contentDescription = stringResource(Res.string.kotlinconf_by_jetbrains_description),
modifier = Modifier.align(Alignment.CenterHorizontally)
.padding(vertical = 64.dp)
.widthIn(max = 360.dp)
)
Column(
modifier = Modifier.padding(bottom = 24.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
PageMenuItem(
label = stringResource(Res.string.about_conference_privacy_notice_link),
onClick = onPrivacyNotice,
)
PageMenuItem(
label = stringResource(Res.string.about_conference_general_terms_link),
onClick = onGeneralTerms,
)
PageMenuItem(
label = stringResource(Res.string.about_conference_website_link),
drawableEnd = Res.drawable.arrow_up_right_24,
onClick = onWebsiteLink,
)
}
}
}