Skip to content

Commit

Permalink
Fix image on abount conf screen
Browse files Browse the repository at this point in the history
  • Loading branch information
JSMonk committed May 17, 2024
1 parent 9ae5d2c commit 1c197d3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@ package org.jetbrains.kotlinconf.ui

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.MaterialTheme
Expand Down Expand Up @@ -65,6 +57,8 @@ import org.jetbrains.kotlinconf.ui.theme.greyGrey20
import org.jetbrains.kotlinconf.ui.theme.greyWhite
import org.jetbrains.kotlinconf.ui.theme.orange
import org.jetbrains.kotlinconf.ui.theme.whiteGrey
import org.jetbrains.kotlinconf.utils.Screen
import org.jetbrains.kotlinconf.utils.isTooWide

@OptIn(ExperimentalResourceApi::class)
@Composable
Expand All @@ -84,7 +78,7 @@ fun AboutConfScreen(
val secondDaySpeaker = speakers.all.filter {
it.name == stringResource(Res.string.second_day_keynote_speaker)
}

val screenSizeIsTooWide = Screen.isTooWide()
val time by service.time.collectAsState()
val timeString =
"${time.month.name} ${time.dayOfMonth} ${time.hours}:${time.minutes}:${time.seconds}"
Expand All @@ -100,7 +94,17 @@ fun AboutConfScreen(
Column(
Modifier.fillMaxWidth().verticalScroll(rememberScrollState())
) {
AboutConfTopBanner()
Column(
Modifier.run {
if (Screen.isTooWide()) {
width(800.dp).align(Alignment.CenterHorizontally)
} else {
fillMaxWidth()
}
}
) {
AboutConfTopBanner()
}
AboutConfSchedule()
AboutConfDescription()
AboutConfKeynoteSection(keynoteSpeakers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clipToBounds
import androidx.compose.ui.geometry.Offset
Expand Down Expand Up @@ -52,7 +53,7 @@ enum class Room(

@OptIn(ExperimentalResourceApi::class)
@Composable
fun RoomMap(room: Room) {
fun ColumnScope.RoomMap(room: Room) {
val screenSizeIsTooWide = Screen.isTooWide()
var svg: Svg? by remember { mutableStateOf(null) }

Expand All @@ -65,8 +66,9 @@ fun RoomMap(room: Room) {
Modifier
.run {
if (screenSizeIsTooWide) {
width(900.dp)
width(1000.dp)
.height(500.dp)
.align(Alignment.CenterHorizontally)
} else {
fillMaxWidth()
.height(343.dp)
Expand Down
2 changes: 1 addition & 1 deletion shared/src/webMain/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
.github-link {
position: absolute;
right: 0;
right: 80px;
width: 37px;
height: 37px;
margin-left: 0;
Expand Down

0 comments on commit 1c197d3

Please sign in to comment.